From 240de58a5ccaa1a898f3a7daa1ef4f8fabda1b93 Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Sun, 18 Oct 2015 20:29:05 -0400 Subject: nits --- ionic.project | 2 +- package.json | 6 +++--- www/css/style.css | 3 ++- www/index.html | 12 +++++++++--- www/js/DataModel.js | 42 ++++++++++++++++++++++++++++++++++++------ 5 files changed, 51 insertions(+), 14 deletions(-) diff --git a/ionic.project b/ionic.project index 9fff8cd8..2e66403a 100644 --- a/ionic.project +++ b/ionic.project @@ -16,4 +16,4 @@ "www/**/*", "!www/lib/**/*" ] -} \ No newline at end of file +} diff --git a/package.json b/package.json index 1112ad06..e44f96af 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "phonegap-plugin-push" ], "cordovaPlatforms": [ - "ios", - "android" + "android", + "ios" ] -} \ No newline at end of file +} diff --git a/www/css/style.css b/www/css/style.css index 4b4beb46..29243005 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -484,11 +484,12 @@ input[type=range]::-webkit-slider-thumb { -webkit-animation-duration: 300ms; } + .content-banner.alarm { background-color: forestgreen; color:white; - opacity:1; + } /*.mySliderClass.jslider.sliderCSS div.jslider-pointer diff --git a/www/index.html b/www/index.html index e02139ec..2e3b3186 100644 --- a/www/index.html +++ b/www/index.html @@ -15,8 +15,12 @@ + + + + @@ -69,7 +73,8 @@ - + + @@ -77,7 +82,8 @@ - + + @@ -86,7 +92,7 @@ - + diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 440857be..3c0765c2 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -23,7 +23,9 @@ angular.module('zmApp.controllers') var montageSize = 3; var monitors = []; var oldevents = []; - var loginData = { + + + var loginData = { 'username': '', 'password': '', 'url': '', // This is the ZM portal path @@ -37,13 +39,19 @@ angular.module('zmApp.controllers') 'keepAwake':true, // don't dim/dim during live view 'isUseAuth':true, // true if user wants ZM auth 'isUseEventServer':false, // true if you configure the websocket event server + 'eventServerMonitors':'', + 'eventServerInterval':0, 'refreshSec':"2", // timer value for frame change in sec 'enableDebug':false, // if enabled with log messages with "debug" 'usePin':false, 'pinCode':'', 'canSwipeMonitors':true, 'persistMontageOrder':false, + }; + + + var configParams = { 'ZM_EVENT_IMAGE_DIGITS':'-1', 'ZM_PATH_ZMS':'' @@ -71,18 +79,22 @@ angular.module('zmApp.controllers') //-------------------------------------------------------------------------- function displayBanner (mytype, mytext, myinterval, mytimer) { - var contentBannerInstance = $ionicContentBanner.show({ + + console.log ("FACTORY DISPLAY: " + JSON.stringify(mytext)); + console.log ("FACTTORY DISPLAY: interval:" + myinterval + " timer:" + mytimer); + var contentBannerInstance = + $ionicContentBanner.show({ text: mytext || 'no text', interval: myinterval || 2000, - autoClose: mytimer || 6000, + //autoClose: mytimer || 6000, type: mytype || 'info', transition: 'vertical', - cancelOnStateChange: false + //cancelOnStateChange: false }); - /*$timeout (function() { + $timeout (function() { contentBannerInstance(); - },mytimer || 6000);*/ + },mytimer || 6000); } @@ -200,6 +212,18 @@ angular.module('zmApp.controllers') window.localStorage.getItem("eventServer"); } + + + + if (window.localStorage.getItem("eventServerMonitors") != undefined) { + loginData.eventServerMonitors = + window.localStorage.getItem("eventServerMonitors"); + } + + if (window.localStorage.getItem("eventServerInterval") != undefined) { + loginData.eventServerInterval = + window.localStorage.getItem("eventServerInterval"); + } if (window.localStorage.getItem("apiurl") != undefined) { loginData.apiurl = @@ -367,6 +391,12 @@ angular.module('zmApp.controllers') window.localStorage.setItem("apiurl", loginData.apiurl); window.localStorage.setItem("streamingurl", loginData.streamingurl); window.localStorage.setItem("eventServer", loginData.eventServer); + window.localStorage.setItem("eventServerMonitors", loginData.eventServerMonitors); + window.localStorage.setItem("eventServerInterval", loginData.eventServerInterval); + + + + window.localStorage.setItem("useSSL", loginData.useSSL?"1":"0"); window.localStorage.setItem("usePin", loginData.usePin?"1":"0"); window.localStorage.setItem("canSwipeMonitors", loginData.canSwipeMonitors?"1":"0"); -- cgit v1.2.3