Commit 026c36dd675cc065023d6537af3a1f8b3061b054

Authored by Andrew Buss
1 parent 7e90e5aeac
Exists in master

only show results once inResultsModal == true

Showing 3 changed files with 7 additions and 8 deletions Side-by-side Diff

scripts/HelpController.js View file @ 026c36d
1 1 angular.module('flashy.HelpController', ['ui.router']).
2 2  
3   - controller('HelpController', function ($scope, $state, $http, $timeout) {
4   - $scope.toggleContent = function (event, index) {
  3 + controller('HelpController', function($scope, $state, $http, $timeout) {
  4 + $scope.toggleContent = function(event, index) {
5 5 console.log(event, index);
6 6  
7 7 if ($('#content-' + index).hasClass('open')) { // let's close it
... ... @@ -14,7 +14,7 @@
14 14 // event.currentTarget
15 15 };
16 16  
17   - $scope.closeContent = function (event) {
  17 + $scope.closeContent = function(event) {
18 18  
19 19 };
20 20  
... ... @@ -48,7 +48,7 @@
48 48 }];
49 49  
50 50 // Functions
51   - $scope.toggleContent = function (event, index) {
  51 + $scope.toggleContent = function(event, index) {
52 52 if ($('#content-' + index).hasClass('open')) { // let's close it
53 53 // Note: 250 is duration (ms) of animation
54 54 $('#content-' + index).slideUp(250).removeClass('open');
55 55  
... ... @@ -57,13 +57,13 @@
57 57 }
58 58 };
59 59  
60   - $scope.expandAllContent = function () {
  60 + $scope.expandAllContent = function() {
61 61 for (var i = 0; i < $scope.entries.length; i++) {
62 62 $('#content-' + i).slideDown(0).addClass('open');
63 63 }
64 64 };
65 65  
66   - $scope.collapseAllContent = function () {
  66 + $scope.collapseAllContent = function() {
67 67 for (var i = 0; i < $scope.entries.length; i++) {
68 68 $('#content-' + i).slideUp(0).removeClass('open');
69 69 }
scripts/StudyController.js View file @ 026c36d
... ... @@ -220,7 +220,6 @@
220 220 }
221 221 if ($scope.inQuestionsModal && !$scope.hasBlanks) {
222 222 if (keyed == 13) { // 'enter' keydown
223   - console.log('the KEY');
224 223 $scope.fetchQuiz();
225 224 }
226 225 }
templates/study.html View file @ 026c36d
... ... @@ -91,7 +91,7 @@
91 91  
92 92 <!-- Quiz results page that shows user answer and actual answer and allows
93 93 User to choose correctness -->
94   -<div id="quizup--result" class="quizup modal modal-fixed-footer">
  94 +<div id="quizup--result" class="quizup modal modal-fixed-footer" ng-show="inResultsModal">
95 95 <button class="btn grey lighten-2 exiter" ng-click="resultModalClose()"><i class="mdi-content-clear"></i></button>
96 96  
97 97 <form>