Restore links_dropdown

This commit is contained in:
Maikel Linke
2016-03-11 16:39:07 +11:00
parent ac88817a34
commit 51f94119ff
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
angular.module("admin.dropdown").directive "linksDropdown", ($window)->
restrict: "C"
scope:
links: "="
templateUrl: "admin/links_dropdown.html"

View File

@@ -0,0 +1,10 @@
.ofn-drop-down
%span
%i.icon-check
Actions
%i{ 'ng-class' => "expanded && 'icon-caret-up' || !expanded && 'icon-caret-down'" }
%div.menu{ 'ng-show' => "expanded", style: 'width: 200px' }
%a.menu_item{ 'ng-repeat' => "link in links", href: '{{link.url}}', target: "{{link.target || '_self'}}", data: { method: "{{ link.method || 'get' }}", confirm: "{{link.confirm}}" }, style: 'display: inline-block; width: 100%' }
%span{ :style => 'text-align: center; display: inline-block; width: 20%'}
%i{ ng: { class: "link.icon" } }
%span{ style: "display: inline-block; width: auto"} {{ link.name }}