From 71114877e8e5409e37dc5a4c03015408f8e905fc Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sun, 31 Mar 2019 07:26:37 -0400 Subject: #801 rip out bower, move to unmanaged externals --- etc/js/angular-circular-navigation.js | 70 +++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 etc/js/angular-circular-navigation.js (limited to 'etc/js/angular-circular-navigation.js') diff --git a/etc/js/angular-circular-navigation.js b/etc/js/angular-circular-navigation.js new file mode 100644 index 00000000..17488768 --- /dev/null +++ b/etc/js/angular-circular-navigation.js @@ -0,0 +1,70 @@ +// PP - Modified to show at right angles +/* jshint -W041 */ +/* jslint browser: true*/ +/* global cordova,StatusBar,angular,console */ + +(function () { + + 'use strict'; + + /*global define, module, exports, require */ + // options.isOpen + + /* istanbul ignore next */ + var angular = window.angular ? window.angular : 'undefined' !== typeof require ? require('angular') : undefined; + + var circular = angular.module('angularCircularNavigation', []) + .directive('circular', ['$compile', function ($compile) { + + return { + restrict: 'EA', + scope: { + options: '=' + }, + template: '' + + '
', + controller: ['$scope', '$element', '$attrs', + function ($scope, $element, $attrs) { + + $scope.toggleMenu = function () { + //PP + if (typeof $scope.options.button.onclick === 'function') + { + // PP - console.log ("FUNCTION"); + //$scope.options.isOpen = !$scope.options.isOpen; + $scope.options.button.onclick(); + } + else + { + // console.log ("NO FUNCTION"); + $scope.options.isOpen = !$scope.options.isOpen; + } + }; + + $scope.perform = function (options, item) { + if (typeof item.onclick === 'function') { + item.onclick(options, item); + } + + if ($scope.options.toggleOnClick) { + $scope.toggleMenu(); + } + }; + + } + ] + }; + }]); + + /* istanbul ignore next */ + if (typeof define === 'function' && define.amd) { + define('circular', ['angular'], circular); + } else if ('undefined' !== typeof exports && 'undefined' !== typeof module) { + module.exports = circular; + } + +})(); -- cgit v1.2.3