Commit e52721a27d1dd15502d4aa64d594d2af2376cb1c

Authored by Melody
1 parent 87cd59bc2c

Attempt to fix 1, 10, 2 issue

Showing 2 changed files with 12 additions and 11 deletions Side-by-side Diff

scripts/CardListController.js View file @ e52721a
... ... @@ -59,7 +59,7 @@
59 59 Materialize.toast('Added to Your Deck', 3000, 'rounded');
60 60 }).
61 61 error(function(err) {
62   - console.log('no hide for you');
  62 + console.log('no pull for you');
63 63 });
64 64 };
65 65  
66 66  
... ... @@ -74,11 +74,11 @@
74 74 Materialize.toast('Removed from Your Deck', 3000, 'rounded');
75 75 }).
76 76 error(function(err) {
77   - console.log('no hide for you');
  77 + console.log('no unpull for you');
78 78 });
79 79 };
80 80  
81   - // unpull card
  81 + // flag/report card
82 82 $scope.flag = function(card) {
83 83 $http.post('/api/flashcards/' + card.id + '/report/').
84 84 success(function(data) {
... ... @@ -88,7 +88,7 @@
88 88 Materialize.toast('Card Flagged', 3000, 'rounded');
89 89 }).
90 90 error(function(err) {
91   - console.log('no hide for you');
  91 + console.log('no flag for you');
92 92 });
93 93 };
94 94  
... ... @@ -100,6 +100,7 @@
100 100 });
101 101 });
102 102 });
  103 +
103 104 $scope.$on('$destroy', function() {
104 105 $rootScope.currentSection = {};
105 106 $(document).off('keydown');
106 107  
... ... @@ -119,9 +120,9 @@
119 120 }
120 121 });
121 122  
122   - jQuery('.back-to-top').click(function(event) {
  123 + $('.back-to-top').click(function(event) {
123 124 event.preventDefault();
124   - jQuery('html, body').animate({scrollTop: 0}, duration);
  125 + $('html, body').animate({scrollTop: 0}, duration);
125 126 return false;
126 127 });
127 128 });
... ... @@ -131,7 +132,7 @@
131 132 var date = new Date(item.material_date);
132 133 switch (date.getDay()) {
133 134 case 0:
134   - return 'Su';
  135 + return 'U';
135 136 case 1:
136 137 return 'M';
137 138 case 2:
... ... @@ -143,7 +144,7 @@
143 144 case 5:
144 145 return 'F';
145 146 case 6:
146   - return 'Sa';
  147 + return 'S';
147 148 }
148 149 };
149 150  
templates/cardlist.html View file @ e52721a
... ... @@ -2,7 +2,7 @@
2 2 <div class="row">
3 3 <a class="btn" id="showHidden" ng-click="show = !show" style="margin-top: 15px">Show Hidden</a>
4 4  
5   - <div class="input-field col s4 right">
  5 + <div class="input-field col s6 right">
6 6 <i class="mdi-action-search prefix"></i>
7 7 <input id="search" type="text" class="validate" ng-model="searchText"/>
8 8 <label for="search">Search</label>
... ... @@ -60,7 +60,7 @@
60 60  
61 61 <div class="list" style="padding: 0px 15px">
62 62 <ul class="collection"
63   - ng-repeat="(weeknum, week_cards) in cards | filter:searchText | filter:filterByDate | groupBy: 'material_week_num'">
  63 + ng-repeat="(weeknum, week_cards) in cards | filter:searchText | filter:filterByDate | groupBy: 'material_week_num' | orderBy:min">
64 64 <li class="collection-header"><h3>Week {{weeknum}}</h3></li>
65 65 <li class="collection-item" ng-click="expand = !expand" ng-repeat="card in week_cards" ng-show="show || !card.is_hidden">
66 66 <div>{{card.text}}
... ... @@ -74,7 +74,7 @@
74 74 <i class="mdi-action-visibility-off small"></i></a>
75 75 <a href="" class="tooltipped" ng-click="unhide(card)" ng-show="card.is_hidden" data-position="bottom" data-delay="50" data-tooltip="Unhide">
76 76 <i class="mdi-action-visibility small"></i></a>
77   - <a href="" ng-click="flag(card)">
  77 + <a href="" ng-click="flag(card)" data-position="bottom" data-delay="50" data-tooltip="Flag">
78 78 <i class="mdi-content-flag small"></i></a>
79 79 </p>
80 80 </div>