diff options
| author | PliablePixels <pliablepixels@gmail.com> | 2015-08-23 09:03:18 -0400 |
|---|---|---|
| committer | PliablePixels <pliablepixels@gmail.com> | 2015-08-23 09:03:18 -0400 |
| commit | 799075d63da6a424a32df6d397fc93ee564bd18d (patch) | |
| tree | cb06802df530df732fd232a58be12f221fc97e55 /www/js | |
| parent | 09a2f3ccfe1afd1de54ecc8bef52540279dcd641 (diff) | |
upgraded to ionic content 1.0.1
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/DataModel.js | 12 | ||||
| -rw-r--r-- | www/js/TimelineCtrl.js | 14 | ||||
| -rw-r--r-- | www/js/app.js | 16 |
3 files changed, 19 insertions, 23 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index b584fc0c..44992a3f 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -48,13 +48,15 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion var contentBannerInstance = $ionicContentBanner.show({ text: mytext || 'no text', interval: myinterval || 2000, + autoClose: mytimer || 6000, type: mytype || 'info', - transition: 'vertical' + transition: 'vertical', + cancelOnStateChange: false }); - $timeout (function() { + /*$timeout (function() { contentBannerInstance(); - },mytimer || 6000); + },mytimer || 6000);*/ } @@ -330,7 +332,7 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion $ionicLoading.show({ - template: 'Loading Monitors...', + template: 'loading monitors...', animation: 'fade-in', showBackdrop: true, duration: zm.loadingTimeout, @@ -467,7 +469,7 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion console.log("ZMData getEvents called with ID=" + monitorId + "and Page=" + pageId); if (!loadingStr) { - loadingStr = "Loading Events..."; + loadingStr = "loading events..."; } //if (loadingStr) loa diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js index f626ea32..894ce566 100644 --- a/www/js/TimelineCtrl.js +++ b/www/js/TimelineCtrl.js @@ -354,7 +354,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla - var maxItems = 200; // THAT magic # --> 300 and ZM on my m/c cries + var maxItems = zm.graphItemMax; // THAT magic # --> 300 and ZM on my m/c cries $scope.maxItems = maxItems; $scope.graphLoaded = false; @@ -575,7 +575,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla if (graphIndex > 200) { - ZMDataModel.zmLog ("Exiting page count graph - reached 200"); + ZMDataModel.zmLog ("Exiting page count graph - reached limit of " + zm.graphItemMax); break; } @@ -596,15 +596,15 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla myename: myevents[i].Event.Name, }); - console.log ("Added: Monitor:"+myevents[i].Event.MonitorId + - " Start:" + myevents[i].Event.StartTime + - " Stop:"+myevents[i].Event.EndTime); + //console.log ("Added: Monitor:"+myevents[i].Event.MonitorId + + // " Start:" + myevents[i].Event.StartTime + + // " Stop:"+myevents[i].Event.EndTime); graphIndex++; - if (graphIndex > 200) + if (graphIndex > zm.graphItemMax) { - ZMDataModel.zmLog ("Exiting event graph - reached 200"); + ZMDataModel.zmLog ("Exiting event graph - reached limit of " + zm.graphItemMax); break; } diff --git a/www/js/app.js b/www/js/app.js index 43873675..bbcc50a8 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -40,6 +40,7 @@ angular.module('zmApp', [ graphFillColor: 'rgba(151,187,205,0.5)', graphStrokeColor: 'rgba(151,187,205,0.8)', graphHighlightFill: 'rgba(0,163,124,0.5)', + graphItemMax: 200, monitorCheckingColor: '#03A9F4', monitorNotRunningColor: '#F44336', monitorPendingColor: '#FF9800', @@ -245,17 +246,10 @@ angular.module('zmApp', [ $rootScope.$on("auth-error", function () { console.log("**** ZM LOGIN ERROR INTERCEPT"); - - var contentBannerInstance = $ionicContentBanner.show({ - text: ['ZoneMinder authentication failed', 'Please check settings'], - interval: 2000, - type: 'error', - transition: 'vertical' - }); - - $timeout(function () { - contentBannerInstance(); - }, 6000); + + ZMDataModel.displayBanner ('error',['ZoneMinder authentication failed', 'Please check settings']); + + /*var alertPopup = $ionicPopup.alert( |
