diff --git a/www/js/ApiService.js b/www/js/ApiService.js index aa47364..4657be7 100644 --- a/www/js/ApiService.js +++ b/www/js/ApiService.js @@ -89,7 +89,7 @@ starter.factory('ApiService', ['$http', '$ionicPopup', '$ionicModal', function ( console.log("[JCE] [INFO] : in update - Got Aguda from Facebook!"); if(grades === null){ window.localStorage['newAguda'] = "true"; - window.localStorage['newAguda'] = JSON.stringify(resp.data); + window.localStorage['agudaPosts'] = JSON.stringify(resp.data); }else if(grades === JSON.stringify(resp.data)){ console.log("[JCE] [INFO] : in update - no new newAguda"); }else{ diff --git a/www/js/controllers.js b/www/js/controllers.js index 387050d..8773a33 100644 --- a/www/js/controllers.js +++ b/www/js/controllers.js @@ -388,6 +388,15 @@ angular.module('starter.controllers', []) $location.path( "/app/jcenews" ); }; + $scope.goToAguda = function(){ + window.localStorage['newAguda'] = "false"; + $scope.newAguda = false; + $ionicViewService.nextViewOptions({ + disableBack: true + }); + $location.path( "/app/aguda" ); + }; + $scope.goToGrades = function(){ var localSettingsStr = window.localStorage['Settings'] || null; if (localSettingsStr !== null){ @@ -425,6 +434,12 @@ angular.module('starter.controllers', []) $scope.newNotes = false; } + if(window.localStorage['newAguda'] == "true"){ + $scope.newAguda = true; + }else{ + $scope.newAguda = false; + } + var userStr = window.localStorage['userInfo'] || null; if(userStr !== null) $scope.userData = JSON.parse(userStr); diff --git a/www/templates/home.html b/www/templates/home.html index c4ef4f9..b3d6bdb 100644 --- a/www/templates/home.html +++ b/www/templates/home.html @@ -39,6 +39,11 @@ יש עדכון בגיליון ציונים + + + פוסט חדש מהאגודה + +