summaryrefslogtreecommitdiff
path: root/www/js/ModalCtrl.js
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-10-11 16:47:00 -0400
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-10-11 16:47:00 -0400
commit144df72c5b65f076f48bab0b451c8dbc4ea2da9b (patch)
tree13c3e50a3bf7a4527949c279aee3fc4737a206e2 /www/js/ModalCtrl.js
parentd0d3aaf7af63afa041e9af145267b0bb04ee729f (diff)
https://github.com/pliablepixels/zmNinja/issues/41
Diffstat (limited to 'www/js/ModalCtrl.js')
-rw-r--r--www/js/ModalCtrl.js33
1 files changed, 31 insertions, 2 deletions
diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js
index c1ce47a9..9cba8697 100644
--- a/www/js/ModalCtrl.js
+++ b/www/js/ModalCtrl.js
@@ -303,8 +303,24 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
};
- // not being used anymore - using a dedicated menu instead
+ $scope.onTapLeft = function (m,d)
+ {
+ ZMDataModel.zmDebug("ModalCtrl:Left tap detected, moving to " + ZMDataModel.getNextMonitor(m, d));
+ $scope.monitorId = ZMDataModel.getNextMonitor(m, d);
+
+
+ $ionicLoading.hide();
+ $ionicLoading.show({
+ template: "please wait...",
+ noBackdrop: true,
+ duration: zm.loadingTimeout,
+ });
+ };
+
$scope.onSwipeLeft = function (m, d) {
+ var ld = ZMDataModel.getLogin();
+ if (!ld.canSwipeMonitors) return;
+
ZMDataModel.zmDebug("ModalCtrl:Left swipe detected, moving to " + ZMDataModel.getNextMonitor(m, d));
$scope.monitorId = ZMDataModel.getNextMonitor(m, d);
@@ -315,11 +331,24 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
noBackdrop: true,
duration: zm.loadingTimeout,
});
+
+
};
- // not being used anymore - using a dedicated menu instead
+ $scope.onTapRight = function (m,d)
+ {
+ ZMDataModel.zmDebug("ModalCtrl:Right tap detected, moving to " + ZMDataModel.getNextMonitor(m, d));
+ $scope.monitorId = ZMDataModel.getNextMonitor(m, d);
+
+ $ionicLoading.show({
+ template: "please wait...",
+ noBackdrop: true,
+ duration: zm.loadingTimeout,
+ });
+ };
$scope.onSwipeRight = function (m, d) {
+ if (!ld.canSwipeMonitors) return;
ZMDataModel.zmDebug("ModalCtrl:Right swipe detected, moving to " + ZMDataModel.getNextMonitor(m, d));
$scope.monitorId = ZMDataModel.getNextMonitor(m, d);