diff options
| author | pliablepixels <pliablepixels@gmail.com> | 2016-02-04 16:11:10 -0500 |
|---|---|---|
| committer | pliablepixels <pliablepixels@gmail.com> | 2016-02-04 16:11:10 -0500 |
| commit | e46933daa53ccf6745c795e5b3c8f1cc51be2403 (patch) | |
| tree | 644aa8ea8038ba376cfce993fd5a87fdbe031bbf /www | |
| parent | 1433c6e5c34c516d21e31b73917dc97f46418bd5 (diff) | |
only show blog notifications for critical posts
Former-commit-id: 1293779e9506d9c27ad6acdcb670512319273bd6
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/MontageHistoryCtrl.js | 4 | ||||
| -rw-r--r-- | www/js/app.js | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js index e4b2bbb5..2fd5b7de 100644 --- a/www/js/MontageHistoryCtrl.js +++ b/www/js/MontageHistoryCtrl.js @@ -285,7 +285,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc function controlEventStream(cmd, disp, connkey, ndx) { // console.log("Command value " + cmd); - + if (disp) { $ionicLoading.hide(); $ionicLoading.show({ @@ -358,7 +358,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc }); req.success(function (resp) { - //console.log("SUCCESS FOR: " + JSON.stringify(resp)); + console.log("SUCCESS FOR: " + JSON.stringify(resp)); if (resp.result=="Ok" && ndx != -1) { diff --git a/www/js/app.js b/www/js/app.js index 716104e7..d847eac9 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -441,6 +441,7 @@ angular.module('zmApp', [ var lastDate = $localstorage.get("latestBlogPostChecked"); if (!lastDate) { + $rootScope.newBlogPost="(new post)"; return; } @@ -451,8 +452,14 @@ angular.module('zmApp', [ if (mItemDate.diff(mLastDate) >0) { ZMDataModel.zmDebug("New post dated " + data[0].date + " found"); - $rootScope.newBlogPost = "(new post)"; - + if (data[0].level == "critical" ) + { + $rootScope.newBlogPost = "(new post)"; + } + else + { + ZMDataModel.zmDebug ("Not showing a notification in menu as this is not critical"); + } } else { |
