diff options
| author | ARC <arjunrc@gmail.com> | 2015-05-01 14:52:22 -0400 |
|---|---|---|
| committer | ARC <arjunrc@gmail.com> | 2015-05-01 14:52:22 -0400 |
| commit | 9faf95be527b8b7c23e4ed4226c35bb771129f41 (patch) | |
| tree | 6d5baa8fc0b2a06d2ccb46ad9be75cce64bc34e8 /www/js/DataModel.js | |
| parent | bcdc2629d7b289c48776169c350d8da3b74f64d4 (diff) | |
Made various tweaks to config files and code to make things work on Android. Using crosswalk for Android for better performance
Diffstat (limited to 'www/js/DataModel.js')
| -rw-r--r-- | www/js/DataModel.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 90830e73..b0ae8ca3 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -184,9 +184,10 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion getMonitors: function (forceReload) { console.log("** Inside ZMData getMonitors with forceReload=" + forceReload); $ionicLoading.show({ - template: 'Loading ZoneMinder Monitors...', + template: 'Loading Monitors...', animation: 'fade-in', showBackdrop: true, + duration:10000, maxWidth: 200, showDelay: 0 }); @@ -196,7 +197,7 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion console.log("ZMDataModel: Invoking HTTP get to load monitors"); var apiurl = loginData.apiurl; var myurl = apiurl + "/monitors.json"; - $http.get(myurl) + $http.get(myurl, {timeout:10000}) .success(function (data) { //console.log("HTTP success got " + JSON.stringify(data.monitors)); monitors = data.monitors; @@ -250,11 +251,12 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion console.log("ZMData getEvents called with ID=" + monitorId); $ionicLoading.show({ - template: 'Loading ZoneMinder Events...', + template: 'Loading Events...', animation: 'fade-in', showBackdrop: true, maxWidth: 200, - showDelay: 0 + showDelay: 0, + duration:10000, //specifically for Android - http seems to get stuck at times }); var d = $q.defer(); @@ -278,7 +280,7 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion return d.promise; } else { // not simulated - $http.get(myurl) + $http.get(myurl, {timeout:10000}) .success(function (data) { $ionicLoading.hide(); myevents = data.events.reverse(); |
