summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2020-10-17 17:43:46 -0400
committerPliable Pixels <pliablepixels@gmail.com>2020-10-17 17:43:46 -0400
commit17ed1221ab453a664470a25d6bb6b0d203f934b7 (patch)
tree53eaf99da5bb7dbae101c660c8bad002856906df
parent526572e49505d8f31865de14ef6c0437caca364d (diff)
apparently I forgot how to return promises #997
-rw-r--r--config.xml2
-rw-r--r--package.json2
-rw-r--r--www/js/EventCtrl.js27
-rw-r--r--www/js/WizardCtrl.js13
4 files changed, 28 insertions, 16 deletions
diff --git a/config.xml b/config.xml
index a0ad0129..6119eabe 100644
--- a/config.xml
+++ b/config.xml
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
-<widget android-packageName="com.pliablepixels.zmninja_pro" id="com.pliablepixels.zmninja_pro" ios-CFBundleIdentifier="com.pliablepixels.zmninja-pro" version="1.6.000" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget android-packageName="com.pliablepixels.zmninja_pro" id="com.pliablepixels.zmninja_pro" ios-CFBundleIdentifier="com.pliablepixels.zmninja-pro" version="1.6.002" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>zmNinja</name>
<description>
High performance ZoneMinder client
diff --git a/package.json b/package.json
index 10dacf01..b441236e 100644
--- a/package.json
+++ b/package.json
@@ -70,6 +70,7 @@
"ANDROID_GSON_VERSION": "2.8.6"
},
"cordova-plugin-advanced-http": {},
+ "cordova-plugin-ionic-webview": {},
"cordova-plugin-media-pp-fork": {}
}
},
@@ -97,6 +98,7 @@
"cordova-plugin-ignore-lint-translation": "0.0.1",
"cordova-plugin-insomnia": "^4.3.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
+ "cordova-plugin-ionic-webview": "git+https://github.com/pliablepixels/cordova-plugin-ionic-webview.git",
"cordova-plugin-media-pp-fork": "^1.0.2-dev",
"cordova-plugin-multi-window": "0.0.3",
"cordova-plugin-network-information": "^2.0.2",
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index fa1c25b8..a2d57ed3 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -605,7 +605,8 @@ angular.module('zmApp.controllers')
$state.go("app.login", {
"wizard": false
});
- return d.resolve(true);
+ d.resolve(true);
+ return d.promise;
}
$scope.events = [];
@@ -752,12 +753,13 @@ angular.module('zmApp.controllers')
NVR.debug("EventCtrl:loading one more page just in case we don't have enough to display");
loadMore()
.then (function () {
- return d.resolve(true);
+ d.resolve(true);
+ return d.promise;
});
} else {
- return d.resolve(true);
-
+ d.resolve(true);
+ return d.promise;
}
});
return (d.promise);
@@ -3090,16 +3092,19 @@ angular.module('zmApp.controllers')
// the events API does not return an error for anything
// except greater page limits than reported
- //console.log("***** LOADING MORE INFINITE SCROLL ****");
var d = $q.defer();
+
+
+
if ((currEventsPage >= maxEventsPage) && (pageLoaded)) {
moreEvents = false;
NVR.debug("No more - We have a total of " + maxEventsPage + " and are at page=" + currEventsPage);
// console.log("*** At Page " + currEventsPage + " of " + maxEventsPage + ", not proceeding");
$ionicLoading.hide();
- return d.resolve(true);
+ d.resolve(true);
+ return d.promise;
}
currEventsPage++;
@@ -3109,7 +3114,8 @@ angular.module('zmApp.controllers')
$scope.$broadcast('scroll.infiniteScrollComplete');
// console.log("**** LOADMORE ARTIFICALLY DISABLED");
- return d.resolve(true);
+ d.resolve(true);
+ return d.promise;
}
var loadingStr = "";
@@ -3200,7 +3206,8 @@ angular.module('zmApp.controllers')
//console.log("Got new page of events");
moreEvents = true;
$scope.$broadcast('scroll.infiniteScrollComplete');
- return d.resolve(true);
+ d.resolve(true);
+ return d.promise;
},
function (error) {
@@ -3208,8 +3215,8 @@ angular.module('zmApp.controllers')
moreEvents = false;
$ionicLoading.hide();
$scope.$broadcast('scroll.infiniteScrollComplete');
- return d.resolve(true);
-
+ d.resolve(true);
+ return (d.promise);
});
return d.promise;
}
diff --git a/www/js/WizardCtrl.js b/www/js/WizardCtrl.js
index 897ffa18..119089d8 100644
--- a/www/js/WizardCtrl.js
+++ b/www/js/WizardCtrl.js
@@ -782,12 +782,14 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$
.then(function (success) {
$ionicLoading.hide();
// return true here because we want to progress
- return d.resolve(true);
+ d.resolve(true);
+ return d.promise;
},
function (error) {
$ionicLoading.hide();
// return true here because we want to progress
- return d.resolve(true);
+ d.resolve(true);
+ return d.promise;
});
},
function (error) {
@@ -795,7 +797,8 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$
NVR.log("zmWizard: api failed");
// return true here because we want to progress
- return d.resolve(true);
+ d.resolve(true);
+ return d.promise;
});
},
@@ -806,8 +809,8 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$
NVR.log("zmWizard: login failed");
$scope.wizard.portalValidText = $translate.instant('kPortalLoginUnsuccessful');
$scope.wizard.portalColor = "#e74c3c";
- return d.resolve(true);
-
+ d.resolve(true);
+ return d.promise;
});
}); //finally