From c6b9e67c448c0b5619857af8e1431703fe15502e Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 24 Dec 2016 08:00:47 -0500 Subject: If API access errors, notify the user with a link to the FAQ #415 --- www/js/InvalidApiCtrl.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 www/js/InvalidApiCtrl.js (limited to 'www/js/InvalidApiCtrl.js') 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; + }; + +}]); -- cgit v1.2.3