Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ovh-angular-actions-menu

Package Overview
Dependencies
Maintainers
8
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ovh-angular-actions-menu - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

bower.json
{
"name": "ovh-angular-actions-menu",
"version": "1.0.3",
"version": "1.0.4",
"description": "An actions menu gives the opportunity to group a set of actions available for a specific context under a single menu",

@@ -5,0 +5,0 @@ "author": "OVH SAS",

@@ -1,2 +0,2 @@

/*! ovh-angular-actions-menu - 1.0.3 - 2017-06-29 */
/*! ovh-angular-actions-menu - 1.0.4 - 2017-07-06 */
!function(){"use strict";angular.module("ovh-angular-actions-menu",["pascalprecht.translate","ovh-angular-responsive-popover"])}(),angular.module("ovh-angular-actions-menu").directive("actionsMenuItem",function(){"use strict";return{restrict:"A",templateUrl:"ovh-angular-actions-menu-item/ovh-angular-actions-menu-item.html",scope:{actionsMenuItem:"=actionsMenuItem",onClick:"&actionsMenuItemOnClick"},bindToController:!0,controller:function(){},controllerAs:"$ctrl"}}),angular.module("ovh-angular-actions-menu").factory("ActionsMenuItem",function(){"use strict";function a(a){var b=this;this.title=a.title,this.icon=a.icon,!a.href||a.state||a.subItems?!a.state||a.href||a.subItems||(this.state=a.state,this.stateParams=a.stateParams||{}):(this.href=a.href,this.target=a.target||"_self",this.external=a.external||!1),this.subActions=[],a.subActions&&a.subActions.length&&angular.forEach(a.subActions,function(a){b.addSubAction(a)})}return a.prototype.getFullSref=function(){var a=this;return a.state+"("+JSON.stringify(a.stateParams)+")"},a.prototype.addSubAction=function(b){var c=this,d=new a(b);return c.subActions.push(d),d},a.prototype.hasSubActions=function(){var a=this;return a.subActions.length},a}),angular.module("ovh-angular-actions-menu").controller("ActionsMenuCtrl",["actionsMenu","ActionsMenu",function(a,b){"use strict";var c=this;c.actionsMenu=null,c.activeActionItem=null,c.onPageSwitch=angular.noop,c.loading={init:!1},c.status={move:!1},c.onItemClick=function(a){return a.hasSubActions()?(c.status.move=!0,c.activeActionItem=a,c.onPageSwitch()):c.popoverSettings.isOpen=!1,!0},c.onBackButtonClick=function(){return c.status.move=!1,c.onPageSwitch(),!0},c.$onInit=function(){return c.loading.init=!0,c.actionsMenu=new b({actionsMenuItems:c.actionsOptions}),a.loadTranslations()["finally"](function(){c.loading.init=!1})}}]),angular.module("ovh-angular-actions-menu").directive("actionsMenu",function(){"use strict";return{restrict:"E",transclude:!0,templateUrl:"ovh-angular-actions-menu.html",scope:{actionsOptions:"=actionsMenuOptions",popoverSettings:"=actionsMenuPopoverSettings"},controller:"ActionsMenuCtrl",controllerAs:"$ctrl",bindToController:!0,link:function(a,b,c,d){var e=function(){d.popoverSettings.isOpen=!1,a.$apply()};a.$watch("$ctrl.popoverSettings.isOpen",function(a,b){b&&!a?d.status.move=!1:a&&!b&&d.onPageSwitch()}),b.find("button.actions-menu-button").on("keydown",function(a){27===a.keyCode&&e()}),d.onPageSwitch=function(){var a=b.find(d.status.move?"div.secondary-page":"div.main-page"),c=a.find("a.focus-helper");c.length||(c=$("<a></a>"),c.attr({href:"#","class":"focus-helper",onClick:"return false;"}),a.append(c)),c.focus(),a.on("keydown",function(b){9===b.keyCode?b.shiftKey?$(b.target).is(a.find("a:not(.focus-helper), button").first())&&(a.find("a:not(.focus-helper), button").last().focus(),b.preventDefault()):($(b.target).is(a.find("a:not(.focus-helper), button").last())||$(b.target).is(c))&&(a.find("a:not(.focus-helper), button").first().focus(),b.preventDefault()):27===b.keyCode&&e()})}}}}),angular.module("ovh-angular-actions-menu").factory("ActionsMenu",["ActionsMenuItem",function(a){"use strict";function b(a){var b=this;this.actions=[],a.actionsMenuItems&&a.actionsMenuItems.length&&angular.forEach(a.actionsMenuItems,function(a){b.addActionItem(a)})}return b.prototype.addActionItem=function(b){var c=this,d=new a(b);return c.actions.push(d),d},b}]),angular.module("ovh-angular-actions-menu").provider("actionsMenu",function(){"use strict";var a=this,b="../bower_components/ovh-angular-actions-menu/dist/ovh-angular-actions-menu";a.setTranslationPath=function(a){return a&&(b=a),b},a.$get=["$translate","$translatePartialLoader",function(a,c){return{loadTranslations:function(){return c.addPart(b),a.refresh()}}}]}),angular.module("ovh-angular-actions-menu").run(["$templateCache",function(a){"use strict";a.put("ovh-angular-actions-menu-inner.html",'<div class=actions-menu-inner><!-- CLOSE BUTTON FOR MOBILE --> <button class="close-button visible-xs-block visible-sm-block no-style" type=button data-ng-click="$ctrl.popoverSettings.isOpen = false"><i class="ovh-font ovh-font-wrong bold"></i></button><!-- CLOSE BUTTON FOR MOBILE --><div class=actions-menu-pages data-ng-class="{ move: $ctrl.status.move }"><div class="actions-menu-page main-page"><ul class="actions-list list-unstyled no-space"><li class=actions-list-item data-ng-repeat="menuAction in $ctrl.actionsMenu.actions track by $index" data-actions-menu-item=menuAction data-actions-menu-item-on-click=$ctrl.onItemClick></li></ul></div><div class="actions-menu-page secondary-page"><ul class="sub-actions-list list-unstyled no-space"><li class=actions-list-item><button class="back-btn no-style" type=button data-ng-click=$ctrl.onBackButtonClick()><i class="ovh-font ovh-font-arrow-left right-space-m8"></i> <span class=bold data-translate=actions_menu_back_btn></span></button></li><li class=actions-list-item data-ng-repeat="menuAction in $ctrl.activeActionItem.subActions track by $index" data-actions-menu-item=menuAction data-actions-menu-item-on-click=$ctrl.onItemClick></li></ul></div></div></div>'),a.put("ovh-angular-actions-menu-item/ovh-angular-actions-menu-item.html",'<a class="actions-menu-item-link block full-width" data-ng-href="{{ $ctrl.actionsMenuItem.href }}" target="{{ $ctrl.actionsMenuItem.target }}" data-ng-if=$ctrl.actionsMenuItem.href data-ng-click=$ctrl.onClick()($ctrl.actionsMenuItem)><span class="inline-block item-icon" data-ng-if=$ctrl.actionsMenuItem.icon><i class=ovh-font data-ng-class="\'ovh-font-{{ $ctrl.actionsMenuItem.icon }}\'" aria-hidden></i> </span><span class="block item-title"><span class=item-title-text data-ng-bind=$ctrl.actionsMenuItem.title></span> <span class=external-link data-ng-if=$ctrl.actionsMenuItem.external><i class="ovh-font ovh-font-newtab"></i> </span></span></a><a class="actions-menu-item-link block full-width" data-ui-sref="{{ $ctrl.actionsMenuItem.getFullSref() }}" data-ng-if=$ctrl.actionsMenuItem.state data-ng-click=$ctrl.onClick()($ctrl.actionsMenuItem)><span class="inline-block item-icon" data-ng-if=$ctrl.actionsMenuItem.icon aria-hidden><i class=ovh-font data-ng-class="\'ovh-font-{{ $ctrl.actionsMenuItem.icon }}\'" aria-hidden></i> </span><span class="block item-title" data-ng-bind=$ctrl.actionsMenuItem.title></span> </a><button class="actions-menu-item-link no-style block full-width" type=button data-ng-if=$ctrl.actionsMenuItem.hasSubActions() data-ng-click=$ctrl.onClick()($ctrl.actionsMenuItem)><span class="inline-block item-icon" data-ng-if=$ctrl.actionsMenuItem.icon aria-hidden><i class=ovh-font data-ng-class="\'ovh-font-{{ $ctrl.actionsMenuItem.icon }}\'" aria-hidden></i> </span><span class="block item-title" data-ng-bind=$ctrl.actionsMenuItem.title></span></button>'),a.put("ovh-angular-actions-menu.html",'<button type=button class=actions-menu-button data-ng-class="{ \'menu-open\' : $ctrl.popoverSettings.isOpen }" data-responsive-popover="\'ovh-angular-actions-menu-inner.html\'" data-popover-class="{{ $ctrl.popoverSettings.class ? $ctrl.popoverSettings.class + \' ovh-angular-actions-menu\' : \'ovh-angular-actions-menu\' }}" data-popover-placement="{{ $ctrl.popoverSettings.placement }}" data-popover-trigger="{{ $ctrl.popoverSettings.trigger }}" data-popover-is-open=$ctrl.popoverSettings.isOpen data-ng-transclude></button>')}]);
{
"name": "ovh-angular-actions-menu",
"version": "1.0.3",
"version": "1.0.4",
"author": "OVH SAS",

@@ -8,3 +8,3 @@ "license": "BSD-3-Clause",

"scripts": {
"test" : "grunt test"
"test": "grunt test"
},

@@ -16,3 +16,3 @@ "keywords": [

"repository": "ovh-ux/ovh-angular-actions-menu",
"dependencies": { },
"dependencies": {},
"devDependencies": {

@@ -19,0 +19,0 @@ "eslint": "^4.1.1",

@@ -44,3 +44,3 @@

Then inject actionsMenu module in your module declaration:
```
```javascript
angular.module("myModule", [

@@ -88,3 +88,3 @@ ...

```
```javascript
angular.module("myManagerModule").controller("myTestController", function ($scope) {

@@ -110,3 +110,3 @@ $scope.popoverSettings = {

```
```html
<actions-menu data-ovh-angular-actions-menu-options="actionsOptions"

@@ -178,3 +178,3 @@ data-ovh-angular-actions-menu-popover-settings="popoverSettings">

```
```javascript
angular.module("myManagerApp").controller("MyTestCtrl", function (ActionsMenu) {

@@ -245,3 +245,3 @@ var actionMenu = new ActionsMenu({

```
```javascript
angular.module("myManagerApp").controller("MyTestCtrl", function (ActionsMenuItem) {

@@ -280,3 +280,3 @@ var actionMenuItem = new ActionsMenuItem({

```
```javascript
angular.module("myManagerApp").config(function (actionsMenuProvider) {

@@ -283,0 +283,0 @@ // set a new path for translations of the module

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc