summaryrefslogtreecommitdiff
path: root/www/js/app.js
diff options
context:
space:
mode:
authorARC <arjunrc@gmail.com>2015-05-01 14:52:22 -0400
committerARC <arjunrc@gmail.com>2015-05-01 14:52:22 -0400
commit9faf95be527b8b7c23e4ed4226c35bb771129f41 (patch)
tree6d5baa8fc0b2a06d2ccb46ad9be75cce64bc34e8 /www/js/app.js
parentbcdc2629d7b289c48776169c350d8da3b74f64d4 (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/app.js')
-rw-r--r--www/js/app.js25
1 files changed, 18 insertions, 7 deletions
diff --git a/www/js/app.js b/www/js/app.js
index d4059074..be83cd23 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -6,6 +6,10 @@ angular.module('zmApp', [
])
+// this directive will be load any time an image completes loading
+// via img tags where this directive is added (I am using this in
+// events and mionitor view to show a loader while the image is
+// downloading from ZM
.directive('imageonload', function() {
return {
restrict: 'A',
@@ -14,11 +18,14 @@ angular.module('zmApp', [
//call the function that was passed
scope.$apply(attrs.imageonload);
});
- }
+ },
+
+
};
})
-.directive('img', function () {
+/*
+ .directive('img', function () {
// element[0].src = 'img/demo.gif';
return {
@@ -34,14 +41,11 @@ angular.module('zmApp', [
// });
}
}
-})
+})*/
.run(function ($ionicPlatform, $ionicPopup, $rootScope, $state, ZMDataModel,$cordovaSplashscreen) {
- // generates and error in desktops but works fine
- setTimeout(function() {
- $cordovaSplashscreen.hide()
- }, 3000)
+
ZMDataModel.init();
var loginData = ZMDataModel.getLogin();
@@ -92,6 +96,13 @@ angular.module('zmApp', [
$ionicPlatform.ready(function () {
+
+ // generates and error in desktops but works fine
+ console.log ("**** DEVICE READY ***");
+ setTimeout(function() {
+ $cordovaSplashscreen.hide()
+ }, 3000)
+
var pixelRatio = window.devicePixelRatio || 1;
$rootScope.devWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width);
$rootScope.devHeight = ((window.innerHeight > 0) ? window.innerHeight : screen.height);