web/static/res/js/inchidebar.js
changeset 103 be6c1f9cc258
parent 78 8c3f0b94d056
child 124 8d2376eb825c
--- a/web/static/res/js/inchidebar.js	Thu Jan 24 16:28:04 2013 +0100
+++ b/web/static/res/js/inchidebar.js	Thu Jan 24 16:30:41 2013 +0100
@@ -3,6 +3,7 @@
 	this.timeoutBarPointer;
 	this.goUp;
 	this.canShowCursor;
+    this.callback;
 
     this.showBarPointer = function(state) {
     	if (state) {
@@ -33,7 +34,11 @@
                 setTimeout(function() {incHideBar.canShowCursor = true;}, 300);
             }
 		}
-    }
+
+        if (this.callback !== null) {
+            this.callback(state);
+        }
+    };
 
     this.hideBarPointerTimeout = function(time) {
     	this.timeoutBarPointer = setTimeout(function() {	
@@ -53,9 +58,10 @@
     	}
     };
 
-    this.init = function() {
+    this.init = function(callback) {
         this.goUp = false;
         this.canShowCursor = incPlayer.ipad;
+        this.callback = callback;
 
         if (!incPlayer.ipad) {
             // Hide bar and pointer in seconds
@@ -64,7 +70,9 @@
 
         if (incPlayer.ipad) {
             document.ontouchmove = function(e) {
-                e.preventDefault();
+                if (typeof( popupOn ) === "undefined" || !popupOn) {
+                    e.preventDefault();
+                }
             }; 
 
             document.ontouchstart = function() {