Ghost/ghost/admin/app/templates/components/gh-token-input/trigger.hbs

46 lines
2.1 KiB
Handlebars
Raw Normal View History

{{#sortable-objects tagName="ul"
id=(concat "ember-power-select-multiple-options-" select.uniqueId)
class="ember-power-select-multiple-options"
sortableObjectList=select.selected
enableSort=true
useSwap=false
sortEndAction=(action "reorderItems")
}}
{{#each select.selected as |opt idx|}}
{{#component (or this.extra.tokenComponent "draggable-object")
tagName="li"
class="ember-power-select-multiple-option"
select=select
content=(readonly opt)
idx=idx
isSortable=true
mouseDown=(action "handleOptionMouseDown")
touchStart=(action "handleOptionTouchStart")
}}
{{#if this.selectedItemComponent}}
{{component this.selectedItemComponent option=(readonly opt) select=(readonly select)}}
{{else}}
{{yield opt select}}
{{/if}}
{{#unless select.disabled}}
<span role="button"
aria-label="remove element"
class="ember-power-select-multiple-remove-btn"
data-selected-index={{idx}}
>
{{svg-jar "close" data-selected-index=idx}}
</span>
{{/unless}}
{{/component}}
{{else}}
{{#if (and placeholder (not this.searchEnabled))}}
<span class="ember-power-select-placeholder">{{placeholder}}</span>
{{/if}}
{{/each}}
{{#if this.searchEnabled}}
<input type="search" class="ember-power-select-trigger-multiple-input" tabindex="0" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" id="ember-power-select-trigger-multiple-input-{{select.uniqueId}}" value={{select.searchText}} aria-controls={{this.listboxId}} style={{this.triggerMultipleInputStyle}} placeholder={{this.maybePlaceholder}} disabled={{select.disabled}} oninput={{action "onInput"}} onFocus={{this.onFocus}} onBlur={{this.onBlur}} tabindex={{this.tabindex}} onkeydown={{action "onKeydown"}}>
{{/if}}
{{/sortable-objects}}
<span class="ember-power-select-status-icon"></span>