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
11
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 3.0.0 to 3.1.0

2

bower.json
{
"name": "ovh-angular-actions-menu",
"version": "3.0.0",
"version": "3.1.0",
"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",

@@ -12,4 +12,2 @@ /**

*
* `actionMenu` module follows the UX specification of the [ovh actions menu guidelines](https://interne.ovh.net/confluence/display/UXGuidelines/Actions+menu).
*
* ## TODO

@@ -81,2 +79,3 @@ *

* @param {String} [options.icon] The icon class of the actions menu item icon.
* @param {Function} [options.onClick=null] The function to called on click event. Has to return true if defined.
* @param {String} [options.svg] SVG code escaped by using $sce.trustAsHtml method.

@@ -113,2 +112,3 @@ * @param {String} [options.state] The state to be redirected when item is clicked. Has no effect if href option is defined or subItems option is defined.

this.external = options.external || false;
this.onClick = _.isFunction(options.onClick) ? options.onClick : null;
} else if (options.state && !options.href && !options.subItems) {

@@ -222,2 +222,5 @@ this.state = options.state;

self.popoverSettings.isOpen = false;
if (actionItem.onClick) {
return actionItem.onClick();
}
}

@@ -224,0 +227,0 @@

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

/*! ovh-angular-actions-menu - 3.0.0 - 2017-09-27 */
!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,a.svg?this.svg=a.svg:a.icon&&(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" type=button data-ng-click="$ctrl.popoverSettings.isOpen = false" data-translate-attr="{ \'title\': \'actions_menu_close_btn\' }"><i class="ovh-font ovh-font-wrong" aria-hidden=true></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"><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"><li class=actions-list-item><button class=back-btn type=button data-ng-click=$ctrl.onBackButtonClick()><i class="ovh-font ovh-font-arrow-left"></i> <strong data-translate=actions_menu_back_btn></strong></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 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=item-icon data-ng-if=$ctrl.actionsMenuItem.icon><i data-ng-class=$ctrl.actionsMenuItem.icon aria-hidden></i> </span><span class=item-icon data-ng-if=$ctrl.actionsMenuItem.svg data-ng-bind-html=$ctrl.actionsMenuItem.svg></span> <span class=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 data-ui-sref="{{ $ctrl.actionsMenuItem.getFullSref() }}" data-ng-if=$ctrl.actionsMenuItem.state data-ng-click=$ctrl.onClick()($ctrl.actionsMenuItem)><span class=item-icon data-ng-if=$ctrl.actionsMenuItem.icon aria-hidden><i data-ng-class=$ctrl.actionsMenuItem.icon aria-hidden></i> </span><span class=item-title data-ng-bind=$ctrl.actionsMenuItem.title></span> </a><button class=actions-menu-item-link type=button data-ng-if=$ctrl.actionsMenuItem.hasSubActions() data-ng-click=$ctrl.onClick()($ctrl.actionsMenuItem)><span class=item-icon data-ng-if=$ctrl.actionsMenuItem.icon aria-hidden><i data-ng-class=$ctrl.actionsMenuItem.icon aria-hidden></i> </span><span class=item-icon data-ng-if=$ctrl.actionsMenuItem.svg data-ng-bind-html=$ctrl.actionsMenuItem.svg></span> <span class=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>')}]);
/*! ovh-angular-actions-menu - 3.1.0 - 2018-04-10 */
!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,a.svg?this.svg=a.svg:a.icon&&(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.onClick=_.isFunction(a.onClick)?a.onClick:null),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){if(a.hasSubActions())c.status.move=!0,c.activeActionItem=a,c.onPageSwitch();else if(c.popoverSettings.isOpen=!1,a.onClick)return a.onClick();return!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" type=button data-ng-click="$ctrl.popoverSettings.isOpen = false" data-translate-attr="{ \'title\': \'actions_menu_close_btn\' }"><i class="ovh-font ovh-font-wrong" aria-hidden=true></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"><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"><li class=actions-list-item><button class=back-btn type=button data-ng-click=$ctrl.onBackButtonClick()><i class="ovh-font ovh-font-arrow-left"></i> <strong data-translate=actions_menu_back_btn></strong></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 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=item-icon data-ng-if=$ctrl.actionsMenuItem.icon><i data-ng-class=$ctrl.actionsMenuItem.icon aria-hidden></i> </span><span class=item-icon data-ng-if=$ctrl.actionsMenuItem.svg data-ng-bind-html=$ctrl.actionsMenuItem.svg></span> <span class=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 data-ui-sref="{{ $ctrl.actionsMenuItem.getFullSref() }}" data-ng-if=$ctrl.actionsMenuItem.state data-ng-click=$ctrl.onClick()($ctrl.actionsMenuItem)><span class=item-icon data-ng-if=$ctrl.actionsMenuItem.icon aria-hidden><i data-ng-class=$ctrl.actionsMenuItem.icon aria-hidden></i> </span><span class=item-title data-ng-bind=$ctrl.actionsMenuItem.title></span> </a><button class=actions-menu-item-link type=button data-ng-if=$ctrl.actionsMenuItem.hasSubActions() data-ng-click=$ctrl.onClick()($ctrl.actionsMenuItem)><span class=item-icon data-ng-if=$ctrl.actionsMenuItem.icon aria-hidden><i data-ng-class=$ctrl.actionsMenuItem.icon aria-hidden></i> </span><span class=item-icon data-ng-if=$ctrl.actionsMenuItem.svg data-ng-bind-html=$ctrl.actionsMenuItem.svg></span> <span class=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>')}]);

@@ -13,3 +13,4 @@ NG_DOCS={

"shortDescription": "An actions menu gives the opportunity to group a set of actions available for a specific context under a single menu.",
"keywords": "_an actionmenu actions actionsmenu animation confirmation context customizing docs group guidelines menu module net open opportunity overview ovh set single specific specification todo translate ux width"
"keywords": "_an actions actionsmenu animation confirmation context customizing docs group menu open opportunity overview set single specific todo translate width",
"isDeprecated": false
},

@@ -23,3 +24,4 @@ {

"shortDescription": "actionsMenuProvider allows developper to configure the path of the translation file.",
"keywords": "actionsmenu actionsmenuprovider allows angular change config configure configured default developper docs file location method module mymanagerapp path service set settranslationpath translation translations"
"keywords": "actionsmenu actionsmenuprovider allows angular change config configure configured default developper docs file location method module mymanagerapp path service set settranslationpath translation translations",
"isDeprecated": false
},

@@ -33,3 +35,4 @@ {

"shortDescription": "This is the main directive of the module. It&#39;s creating a popover with desired actions inside.",
"keywords": "$scope actions actions-menu-options actions-menu-popover-settings actionsmenu actionsmenuitem actionsoptions add angular beautiful bootstrap bottom-right button class controller creating data-actions-menu-options data-actions-menu-popover-settings desired directive displayed docs example factory feel filled-check filled-error free function github google href html http icon informations inside io isopen list main module my-custom-class my-font my-font-actions my-manager mymanagermodule mytestcontroller open options placement popover popover-class popover-placement popoversettings state1 supported title trigger view"
"keywords": "$scope actions actions-menu-options actions-menu-popover-settings actionsmenu actionsmenuitem actionsoptions add angular beautiful bootstrap bottom-right button class controller creating data-actions-menu-options data-actions-menu-popover-settings desired directive displayed docs example factory feel filled-check filled-error free function github google href html http icon informations inside io isopen list main module my-custom-class my-font my-font-actions my-manager mymanagermodule mytestcontroller open options placement popover popover-class popover-placement popoversettings state1 supported title trigger view",
"isDeprecated": false
},

@@ -43,3 +46,4 @@ {

"shortDescription": "This directive represent an item into an actions menu.",
"keywords": "action actionmenuitem actions actions-menu-item actions-menu-item-on-click actionsmenu callback called clicked directive docs function included instance item menu module offside parent represent scope"
"keywords": "action actionmenuitem actions actions-menu-item actions-menu-item-on-click actionsmenu callback called clicked directive docs function included instance item menu module offside parent represent scope",
"isDeprecated": false
},

@@ -53,3 +57,4 @@ {

"shortDescription": "Factory that describe an actions menu.",
"keywords": "action actionmenu actionmenuitemoptions actions actionsmenu actionsmenuitem actionsmenuitems add addactionitem angular array beautiful controller created creating describe directive docs factory filled-check function google href http icon instance item items list menu method module mymanagerapp mytestctrl object options title var"
"keywords": "action actionmenu actionmenuitemoptions actions actionsmenu actionsmenuitem actionsmenuitems add addactionitem angular array beautiful controller created creating describe directive docs factory filled-check function google href http icon instance item items list menu method module mymanagerapp mytestctrl object options title var",
"isDeprecated": false
},

@@ -63,3 +68,4 @@ {

"shortDescription": "Factory that describe an item into an actions menu.",
"keywords": "$sce action actionmenuitem actions actionsmenu actionsmenuitem add addsubaction anchor angular applied attribute beautiful check class clicked code controller created creating current defined describe details directive docs escaped example external factory false filled-check full function getfullsref google hassubactions href html http icon instance item items level levels link manage manager menu method module mymanagerapp mytestctrl object offside option options param2 params pass redirected representation sref stateparams string subactionoptions subactions subitems svg tag target title true trustashtml var"
"keywords": "$sce action actionmenuitem actions actionsmenu actionsmenuitem add addsubaction anchor angular applied attribute beautiful called check class click clicked code controller created creating current defined describe details directive docs escaped event example external factory false filled-check full function getfullsref google hassubactions href html http icon instance item items level levels link manage manager menu method module mymanagerapp mytestctrl object offside onclick option options param2 params pass redirected representation return sref stateparams string subactionoptions subactions subitems svg tag target title true trustashtml var",
"isDeprecated": false
},

@@ -73,3 +79,4 @@ {

"shortDescription": "This service enable you to load translation file.",
"keywords": "actionsmenu configured docs enable file load loaded method path service translation"
"keywords": "actionsmenu configured docs enable file load loaded method path service translation",
"isDeprecated": false
}

@@ -76,0 +83,0 @@ ],

{
"name": "ovh-angular-actions-menu",
"version": "3.0.0",
"version": "3.1.0",
"author": "OVH SAS",

@@ -5,0 +5,0 @@ "license": "BSD-3-Clause",

@@ -6,3 +6,3 @@

[![Maintenance](https://img.shields.io/maintenance/yes/2017.svg)]() [![Chat on gitter](https://img.shields.io/gitter/room/ovh/ux.svg)](https://gitter.im/ovh/ux) [![Build Status](https://travis-ci.org/ovh-ux/ovh-angular-actions-menu.svg)](https://travis-ci.org/ovh-ux/ovh-angular-actions-menu)
[![Maintenance](https://img.shields.io/maintenance/yes/2018.svg)]() [![Chat on gitter](https://img.shields.io/gitter/room/ovh/ux.svg)](https://gitter.im/ovh/ux) [![Build Status](https://travis-ci.org/ovh-ux/ovh-angular-actions-menu.svg)](https://travis-ci.org/ovh-ux/ovh-angular-actions-menu)

@@ -9,0 +9,0 @@ [![NPM](https://nodei.co/npm/ovh-angular-actions-menu.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/ovh-angular-actions-menu/)

@@ -24,2 +24,3 @@ /**

* @param {String} [options.icon] The icon class of the actions menu item icon.
* @param {Function} [options.onClick=null] The function to called on click event. Has to return true if defined.
* @param {String} [options.svg] SVG code escaped by using $sce.trustAsHtml method.

@@ -56,2 +57,3 @@ * @param {String} [options.state] The state to be redirected when item is clicked. Has no effect if href option is defined or subItems option is defined.

this.external = options.external || false;
this.onClick = _.isFunction(options.onClick) ? options.onClick : null;
} else if (options.state && !options.href && !options.subItems) {

@@ -58,0 +60,0 @@ this.state = options.state;

@@ -29,2 +29,5 @@ angular.module("ovh-angular-actions-menu").controller("ActionsMenuCtrl", function (actionsMenu, ActionsMenu) {

self.popoverSettings.isOpen = false;
if (actionItem.onClick) {
return actionItem.onClick();
}
}

@@ -31,0 +34,0 @@

@@ -12,4 +12,2 @@ /**

*
* `actionMenu` module follows the UX specification of the [ovh actions menu guidelines](https://interne.ovh.net/confluence/display/UXGuidelines/Actions+menu).
*
* ## TODO

@@ -16,0 +14,0 @@ *

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

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

Sorry, the diff of this file is too big to display

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