summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/EventCtrl.js27
-rw-r--r--www/js/MonitorCtrl.js22
-rw-r--r--www/js/app.js19
3 files changed, 64 insertions, 4 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index 283ffa39..fadc9f65 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -56,6 +56,21 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', function ($ion
play: "2"
}
+ $scope.initLoadingImage = function()
+ {
+ console.log ("***Loading***");
+ /* $ionicLoading.show({
+ template: "loading, please wait...",
+ noBackdrop: true,
+ });*/
+ }
+
+
+ $scope.finishedLoadingImage = function()
+ {
+ $ionicLoading.hide();
+ // alert ("IMAGE LOADED");
+ }
$scope.eventCommands = eventCommands;
@@ -168,10 +183,18 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', function ($ion
})
.then(function (modal) {
$scope.modal = modal;
+
+ $ionicLoading.show({
+ template: "please wait...",
+ noBackdrop: true,
+ duration:10000
+ })
$scope.modal.show();
- });
- };
+ })
+ }
+
+
$scope.closeModal = function () {
console.log("Close & Destroy Modal");
$scope.modal.remove();
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js
index 69d190d0..def65266 100644
--- a/www/js/MonitorCtrl.js
+++ b/www/js/MonitorCtrl.js
@@ -20,6 +20,22 @@ $scope.reloadView = function ()
});
}
+$scope.initLoadingImage = function()
+ {
+ console.log ("***Loading***");
+ /* $ionicLoading.show({
+ template: "loading, please wait...",
+ noBackdrop: true,
+ });*/
+ }
+
+
+ $scope.finishedLoadingImage = function()
+ {
+ $ionicLoading.hide();
+ // alert ("IMAGE LOADED");
+ }
+
$scope.$on('$ionicView.loaded', function(){
console.log("**VIEW ** Monitor Ctrl Loaded");
});
@@ -50,6 +66,12 @@ $scope.reloadView = function ()
})
.then(function (modal) {
$scope.modal = modal;
+
+ $ionicLoading.show({
+ template: "please wait...",
+ noBackdrop: true,
+ duration:10000
+ })
$scope.modal.show();
});
diff --git a/www/js/app.js b/www/js/app.js
index 908f09bf..d4059074 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -5,12 +5,27 @@ angular.module('zmApp', [
])
+
+.directive('imageonload', function() {
+ return {
+ restrict: 'A',
+ link: function(scope, element, attrs) {
+ element.bind('load', function() {
+ //call the function that was passed
+ scope.$apply(attrs.imageonload);
+ });
+ }
+ };
+ })
+
.directive('img', function () {
+ // element[0].src = 'img/demo.gif';
+
return {
- restrict: 'AE',
+ restrict: 'E',
link: function (scope, element, attrs) {
console.log ("********** IMG DIRECTIVE ");
-
+ //console.log ("Attr ng-src="+attr.ngSrc);
// if (!attr.ngSrc)
// element[0].src = 'img/demo.gif';
// show an image-missing image