Home notification for Aguda #7 closed

This commit is contained in:
Sagi Dayan 2015-02-01 23:36:42 +02:00
parent 2dc7a7e297
commit a71267f7f9
3 changed files with 21 additions and 1 deletions

View file

@ -89,7 +89,7 @@ starter.factory('ApiService', ['$http', '$ionicPopup', '$ionicModal', function (
console.log("[JCE] [INFO] : in update - Got Aguda from Facebook!"); console.log("[JCE] [INFO] : in update - Got Aguda from Facebook!");
if(grades === null){ if(grades === null){
window.localStorage['newAguda'] = "true"; 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)){ }else if(grades === JSON.stringify(resp.data)){
console.log("[JCE] [INFO] : in update - no new newAguda"); console.log("[JCE] [INFO] : in update - no new newAguda");
}else{ }else{

View file

@ -388,6 +388,15 @@ angular.module('starter.controllers', [])
$location.path( "/app/jcenews" ); $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(){ $scope.goToGrades = function(){
var localSettingsStr = window.localStorage['Settings'] || null; var localSettingsStr = window.localStorage['Settings'] || null;
if (localSettingsStr !== null){ if (localSettingsStr !== null){
@ -425,6 +434,12 @@ angular.module('starter.controllers', [])
$scope.newNotes = false; $scope.newNotes = false;
} }
if(window.localStorage['newAguda'] == "true"){
$scope.newAguda = true;
}else{
$scope.newAguda = false;
}
var userStr = window.localStorage['userInfo'] || null; var userStr = window.localStorage['userInfo'] || null;
if(userStr !== null) if(userStr !== null)
$scope.userData = JSON.parse(userStr); $scope.userData = JSON.parse(userStr);

View file

@ -39,6 +39,11 @@
יש עדכון בגיליון ציונים יש עדכון בגיליון ציונים
</a> </a>
<a ng-click="goToAguda()" class="item item-icon-right" ng-if="newAguda">
<i class="icon ion-speakerphone"></i>
פוסט חדש מהאגודה
</a>
</div> </div>