From ec224285320d38b3007fb469c10fffbca1294c10 Mon Sep 17 00:00:00 2001 From: PliablePixels Date: Tue, 30 Jun 2015 19:43:10 -0400 Subject: set 50K limit for logs, separated my modifications for angular-circular-navigations --- www/js/angular-circular-navigation.js | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 www/js/angular-circular-navigation.js (limited to 'www/js/angular-circular-navigation.js') diff --git a/www/js/angular-circular-navigation.js b/www/js/angular-circular-navigation.js new file mode 100644 index 00000000..f3b9b0a0 --- /dev/null +++ b/www/js/angular-circular-navigation.js @@ -0,0 +1,54 @@ +// PP - Modified to show at right angles +(function () { + + 'use strict'; + + /*global define, module, exports, require */ + + /* 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 () { + $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