Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65c1301
commit b204549
Showing
3 changed files
with
90 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
ManageIQ.angular.app.component('dropdownMenu', { | ||
bindings: { | ||
id: '<', | ||
buttons: '@', | ||
}, | ||
controllerAs: 'vm', | ||
controller: function() { | ||
var vm = this; | ||
|
||
this.$onInit = function() { | ||
vm.dropdown_id = 'btn_' + vm.id; | ||
vm.buttons = JSON.parse(vm.buttons); | ||
}; | ||
}, | ||
template: [ | ||
'<div class="dropdown pull-right dropdown-kebab-pf">' + | ||
' <button aria-haspopup="true" class="btn btn-link dropdown-toggle" data-toggle="dropdown" id="{{vm.dropdown_id}}" type="button" aria-expanded="false">' + | ||
' <span class="fa fa-ellipsis-v">' + | ||
' </span>' + | ||
' </button>' + | ||
' <ul aria-labelledby="{{vm.dropdown_id}}" class="dropdown-menu dropdown-menu-right">' + | ||
' <li ng-repeat="button in vm.buttons">' + | ||
' <a id="{{button.id}}" title="{{button.title}}" data-method="{{button.dataMethod}}" data-remote="{{button.dataRemote}}" confirm="{{button.confirm}}" href="{{button.href}}" data-miq_spark_on="{{button.sparkleOn}}">' + | ||
' <span ng-class="{{button.fonticon}}"></span>' + | ||
'{{button.name}}' + | ||
' </a>' + | ||
' </li>' + | ||
' </ul>' + | ||
'</div>', | ||
].join("\n"), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters