summaryrefslogtreecommitdiff
path: root/www/js/DataModel.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2017-11-05 19:29:59 -0500
committerPliable Pixels <pliablepixels@gmail.com>2017-11-05 19:29:59 -0500
commit24677360c6364221e6701908734ad15f44e7a26e (patch)
tree7cef67af5b8846b6f9f9094086e02479adec18d3 /www/js/DataModel.js
parent6a55a1031809d84a2b0133a7246d131887461239 (diff)
#555 - make sure fingerprint auth is not called if auto montage reload
Diffstat (limited to 'www/js/DataModel.js')
-rwxr-xr-xwww/js/DataModel.js31
1 files changed, 27 insertions, 4 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 12e90ab3..57215c2c 100755
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -167,6 +167,8 @@ angular.module('zmApp.controllers')
'enableGIFMP4': false,
'enableStrictSSL': false,
'enableSlowLoading': false,
+ 'isFullScreen': false,
+ 'reloadInMontage': false,
};
@@ -370,22 +372,28 @@ angular.module('zmApp.controllers')
function setLogin(newLogin)
{
+ //var d = $q.defer();
+
loginData = angular.copy(newLogin);
serverGroupList[loginData.serverName] = angular.copy(loginData);
var ct = CryptoJS.AES.encrypt(JSON.stringify(serverGroupList), zm.cipherKey).toString();
+ return localforage.setItem("serverGroupList", ct)
+ .then (function() { return localforage.setItem("defaultServerName", loginData.serverName);})
+ .catch ( function (err) {log("localforage store error " + JSON.stringify(err));});
//console.log ("****serverLogin was encrypted to " + ct);
//$localstorage.setObject("serverGroupList", serverGroupList);
- localforage.setItem("serverGroupList", ct, function(err)
+ /* return localforage.setItem("serverGroupList", ct, function(err)
{
if (err) log("localforage store error " + JSON.stringify(err));
});
//$localstorage.set("defaultServerName", loginData.serverName);
- localforage.setItem("defaultServerName", loginData.serverName, function(err)
+ return localforage.setItem("defaultServerName", loginData.serverName, function(err)
{
if (err) log("localforage store error " + JSON.stringify(err));
- });
+ });*/
+ // return (d.promise);
}
@@ -920,6 +928,20 @@ angular.module('zmApp.controllers')
}
+ if (typeof loginData.isFullScreen == 'undefined')
+ {
+
+ loginData.isFullScreen = false;
+
+ }
+
+ if (typeof loginData.reloadInMontage == 'undefined')
+ {
+
+ loginData.reloadInMontage = false;
+
+ }
+
if (typeof loginData.soundOnPush == 'undefined')
{
debug("sound on push not found, setting to true");
@@ -1319,8 +1341,9 @@ angular.module('zmApp.controllers')
setLogin: function(newLogin)
{
- setLogin(newLogin);
$rootScope.showBlog = newLogin.enableBlog;
+ return setLogin(newLogin);
+
},