summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-10-18 20:29:05 -0400
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-10-18 20:29:05 -0400
commit240de58a5ccaa1a898f3a7daa1ef4f8fabda1b93 (patch)
treea48033039a83b5f259e8d1cf8405a60f4f46c33c /www/js
parentced14a385a8606319e5d7d604f65c7a33c8e1476 (diff)
nits
Diffstat (limited to 'www/js')
-rw-r--r--www/js/DataModel.js42
1 files changed, 36 insertions, 6 deletions
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");