summaryrefslogtreecommitdiff
path: root/www/js/InvalidApiCtrl.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2016-12-24 08:00:47 -0500
committerPliable Pixels <pliablepixels@gmail.com>2016-12-24 08:00:47 -0500
commitc6b9e67c448c0b5619857af8e1431703fe15502e (patch)
tree8beb76261397bc785259c1be2d7e680ebc31e2ad /www/js/InvalidApiCtrl.js
parentaf230a2c247f087ef13e4f3a8fbc18ae598089fc (diff)
If API access errors, notify the user with a link to the FAQ #415
Diffstat (limited to 'www/js/InvalidApiCtrl.js')
-rw-r--r--www/js/InvalidApiCtrl.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/www/js/InvalidApiCtrl.js b/www/js/InvalidApiCtrl.js
new file mode 100644
index 00000000..1c65b9fd
--- /dev/null
+++ b/www/js/InvalidApiCtrl.js
@@ -0,0 +1,37 @@
+/* jshint -W041 */
+/* jslint browser: true*/
+/* global cordova,StatusBar,angular,console */
+
+angular.module('zmApp.controllers').controller('zmApp.InvalidApiCtrl', ['$scope', '$ionicSideMenuDelegate', 'zm', '$stateParams', '$timeout', '$rootScope', function($scope, $ionicSideMenuDelegate, zm, $stateParams, $timeout, $rootScope)
+{
+ $scope.openMenu = function()
+ {
+ $ionicSideMenuDelegate.toggleLeft();
+ };
+
+ //-------------------------------------------------------------------------
+ // Controller Main
+ //------------------------------------------------------------------------
+ $scope.$on('$ionicView.enter', function()
+ {
+ console.log("**VIEW ** InvalidAPI Ctrl Entered");
+ $ionicSideMenuDelegate.canDragContent(true);
+ });
+
+ $scope.openMenu = function()
+ {
+ $timeout(function()
+ {
+ $rootScope.stateofSlide = $ionicSideMenuDelegate.isOpen();
+ }, 500);
+
+ $ionicSideMenuDelegate.toggleLeft();
+ };
+
+ $scope.readFAQ = function()
+ {
+ window.open('https://github.com/pliablepixels/zmNinja/wiki/Validating-if-APIs-work-on-ZM', '_blank', 'location=yes');
+ return false;
+ };
+
+}]);