summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-12-05 15:44:27 -0500
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-12-05 15:44:27 -0500
commitc76ead47d1b4474e8cef477a918639fa44d835f1 (patch)
tree3e4c03e08590ce9d5d7e6a412d1a90f4f67229ff /www/js
parent3f9daea7bb0fa25eb894bbc068b8ccbc1397c8a5 (diff)
scoped all alerts to zmPopupalert so I can kill them if moved to background and resumed. show dialogs were already scoped
Former-commit-id: d32398cee403f515eb593921f266abf229aa3780
Diffstat (limited to 'www/js')
-rw-r--r--www/js/DataModel.js4
-rw-r--r--www/js/DevOptionsCtrl.js4
-rw-r--r--www/js/EventServer.js2
-rw-r--r--www/js/LoginCtrl.js8
-rw-r--r--www/js/MonitorCtrl.js2
-rw-r--r--www/js/MontageCtrl.js2
6 files changed, 11 insertions, 11 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 0a529365..ddbc65cb 100644
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -207,7 +207,7 @@ angular.module('zmApp.controllers')
if (typeof loginData.minAlarmCount === 'undefined')
{
- console.log ("MIN ALARM");
+ zmDebug ("minAlarmCount does not exist, setting to 1");
loginData.minAlarmCount = '1';
}
@@ -720,7 +720,7 @@ angular.module('zmApp.controllers')
console.log ("API:"+myurl);
$http.get(myurl /*,{timeout:15000}*/ )
.success(function (data) {
- console.log("HTTP success got " + JSON.stringify(data.monitors));
+ //console.log("HTTP success got " + JSON.stringify(data.monitors));
monitors = data.monitors;
monitors.sort(function(a,b)
{return parseInt(a.Monitor.Sequence)-parseInt(b.Monitor.Sequence);});
diff --git a/www/js/DevOptionsCtrl.js b/www/js/DevOptionsCtrl.js
index 57e694df..5dd604ba 100644
--- a/www/js/DevOptionsCtrl.js
+++ b/www/js/DevOptionsCtrl.js
@@ -57,7 +57,7 @@ angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope'
ZMDataModel.zmDebug("SaveDevOptions: called");
if (parseInt($scope.loginData.maxMontage) > zm.safeMontageLimit) {
- $ionicPopup.alert({
+ $rootScope.zmPopup= $ionicPopup.alert({
title: 'Note',
template: 'You have selected to view more than 10 monitors in the Montage screen. Note that this is very resource intensive and may load the server or cause issues in the application. If you are not sure, please consider limiting this value to 10'
});
@@ -99,7 +99,7 @@ angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope'
$scope.saveDevOptions = function () {
saveDevOptions();
- $ionicPopup.alert({
+ $rootScope.zmPopup= $ionicPopup.alert({
title: 'Settings Saved',
template: 'Please explore the menu and enjoy zmNinja!'
}).then(function (res) {
diff --git a/www/js/EventServer.js b/www/js/EventServer.js
index b9182b6f..352ff327 100644
--- a/www/js/EventServer.js
+++ b/www/js/EventServer.js
@@ -153,7 +153,7 @@ angular.module('zmApp.controllers')
if (str.version == undefined)
str.version = "0.1";
if (versionCompare(str.version, zm.minEventServerVersion) == -1) {
- $ionicPopup.alert({
+ $rootScope.zmPopup= $ionicPopup.alert({
title: 'Event Server version not supported',
template: 'You are running version ' + str.version + ". Please upgrade to " +
zm.minEventServerVersion
diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js
index 5616615d..7a58b43f 100644
--- a/www/js/LoginCtrl.js
+++ b/www/js/LoginCtrl.js
@@ -420,7 +420,7 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r
.success(function (data) {
ZMDataModel.zmDebug("Urk! cgi-path returned success, but it should not have come here");
loginStatus = "Login validated, but could not validate cgi-path. If live streams don't work please check your cgi-bin path";
- $ionicPopup.alert({
+ $rootScope.zmPopup = $ionicPopup.alert({
title: 'Login validated',
template: loginStatus
}).then(function (res) {
@@ -437,7 +437,7 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r
loginStatus = "The cgi-bin path you entered may be wrong. I can't make sure, but if your live views don't work, please review your cgi path.";
}
- $ionicPopup.alert({
+ $rootScope.zmPopup = $ionicPopup.alert({
title: 'Login validated',
template: loginStatus
}).then(function (res) {
@@ -456,7 +456,7 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r
.error(function (error) {
ZMDataModel.displayBanner('error', ['ZoneMinder API check failed', 'Please check API settings']);
ZMDataModel.zmLog("API login error " + JSON.stringify(error));
- $ionicPopup.alert({
+ $rootScope.zmPopup= $ionicPopup.alert({
title: 'Login validated but API failed',
template: 'Please check your API settings'
});
@@ -470,7 +470,7 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r
$scope.saveItems = function () {
if (!$scope.loginData.serverName) {
- $ionicPopup.alert({
+ $rootScope.zmPopup = $ionicPopup.alert({
title: 'Error',
template: 'Server Name cannot be empty',
})
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js
index 8aaa770f..dc24c4ae 100644
--- a/www/js/MonitorCtrl.js
+++ b/www/js/MonitorCtrl.js
@@ -23,7 +23,7 @@ angular.module('zmApp.controllers')
if ($scope.monitors.length == 0)
{
- $ionicPopup.alert({
+ $rootScope.zmPopup= $ionicPopup.alert({
title: "No Monitors found",
template: "Please check your credentials"
});
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index e260b373..69ff6129 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -42,7 +42,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
var tempMonitors = message;
if (tempMonitors.length == 0)
{
- $ionicPopup.alert({
+ $rootScope.zmPopup= $ionicPopup.alert({
title: "No Monitors found",
template: "Please check your credentials"
});