-
Notifications
You must be signed in to change notification settings - Fork 196
/
menu.hbs
57 lines (57 loc) · 2.39 KB
/
menu.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{{#if this._isOpen}}
{{#if (macroCondition (macroGetOwnConfig "isNotBS3"))}}
<EmberPopper
class="dropdown-menu {{this.alignClass}} {{if this.isOpen "show"}} {{@class}}"
@placement={{this.popperPlacement}}
@popperTarget={{this.toggleElement}}
@renderInPlace={{this._renderInPlace}}
@popperContainer={{this.destinationElement}}
@modifiers={{this.popperModifiers}}
@onCreate={{this.setFocus}}
tabindex="-1"
...attributes
{{did-insert @registerChildElement "menu"}}
{{will-destroy @unregisterChildElement "menu"}}
{{create-ref "menuElement"}}
>
{{yield
(hash
item=(bs-default @itemComponent (component "bs-dropdown/menu/item"))
link-to=(bs-default @linkToComponent (component "bs-link-to" class=(if (macroCondition (macroGetOwnConfig "isNotBS3")) "dropdown-item")))
linkTo=(bs-default @linkToComponent (component "bs-link-to" class=(if (macroCondition (macroGetOwnConfig "isNotBS3")) "dropdown-item")))
divider=(bs-default @dividerComponent (component "bs-dropdown/menu/divider"))
)
}}
</EmberPopper>
{{/if}}
{{#if (macroCondition (macroGetOwnConfig "isBS3"))}}
<EmberPopper
class="ember-bootstrap-dropdown-bs3-popper"
@placement={{this.popperPlacement}}
@popperTarget={{this.toggleElement}}
@renderInPlace={{this._renderInPlace}}
@popperContainer={{this.destinationElement}}
@modifiers={{this.popperModifiers}}
@onCreate={{this.setFocus}}
>
<ul
class="dropdown-menu {{this.alignClass}} {{if this.isOpen "show"}} {{@class}}"
role={{this.ariaRole}}
tabindex="-1"
...attributes
{{did-insert @registerChildElement "menu"}}
{{will-destroy @unregisterChildElement "menu"}}
{{create-ref "menuElement"}}
>
{{yield
(hash
item=(bs-default @itemComponent (component "bs-dropdown/menu/item"))
link-to=(bs-default @linkToComponent (component "bs-link-to" class=(if (macroCondition (macroGetOwnConfig "isNotBS3")) "dropdown-item")))
linkTo=(bs-default @linkToComponent (component "bs-link-to" class=(if (macroCondition (macroGetOwnConfig "isNotBS3")) "dropdown-item")))
divider=(bs-default @dividerComponent (component "bs-dropdown/menu/divider"))
)
}}
</ul>
</EmberPopper>
{{/if}}
{{/if}}