diff --git a/scripts/CardListController.js b/scripts/CardListController.js index 34a856c..6eadeea 100644 --- a/scripts/CardListController.js +++ b/scripts/CardListController.js @@ -59,7 +59,7 @@ angular.module('flashy.CardListController', ['ui.router', 'angular.filter']). Materialize.toast('Added to Your Deck', 3000, 'rounded'); }). error(function(err) { - console.log('no hide for you'); + console.log('no pull for you'); }); }; @@ -74,11 +74,11 @@ angular.module('flashy.CardListController', ['ui.router', 'angular.filter']). Materialize.toast('Removed from Your Deck', 3000, 'rounded'); }). error(function(err) { - console.log('no hide for you'); + console.log('no unpull for you'); }); }; - // unpull card + // flag/report card $scope.flag = function(card) { $http.post('/api/flashcards/' + card.id + '/report/'). success(function(data) { @@ -88,7 +88,7 @@ angular.module('flashy.CardListController', ['ui.router', 'angular.filter']). Materialize.toast('Card Flagged', 3000, 'rounded'); }). error(function(err) { - console.log('no hide for you'); + console.log('no flag for you'); }); }; @@ -100,6 +100,7 @@ angular.module('flashy.CardListController', ['ui.router', 'angular.filter']). }); }); }); + $scope.$on('$destroy', function() { $rootScope.currentSection = {}; $(document).off('keydown'); @@ -119,9 +120,9 @@ angular.module('flashy.CardListController', ['ui.router', 'angular.filter']). } }); - jQuery('.back-to-top').click(function(event) { + $('.back-to-top').click(function(event) { event.preventDefault(); - jQuery('html, body').animate({scrollTop: 0}, duration); + $('html, body').animate({scrollTop: 0}, duration); return false; }); }); @@ -131,7 +132,7 @@ angular.module('flashy.CardListController', ['ui.router', 'angular.filter']). var date = new Date(item.material_date); switch (date.getDay()) { case 0: - return 'Su'; + return 'U'; case 1: return 'M'; case 2: @@ -143,7 +144,7 @@ angular.module('flashy.CardListController', ['ui.router', 'angular.filter']). case 5: return 'F'; case 6: - return 'Sa'; + return 'S'; } }; diff --git a/templates/cardlist.html b/templates/cardlist.html index dfa72ba..b463597 100644 --- a/templates/cardlist.html +++ b/templates/cardlist.html @@ -2,7 +2,7 @@