mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
da49dc4922
refs https://github.com/TryGhost/Team/issues/496 reqs https://github.com/TryGhost/Ghost/pull/12925 The publish menu was meant to default to matching post visibility but that wasn't working consistently and didn't make sense for sites which don't email every post to their members. A "Default newsletter recipients" option has been added to the "Email newsletter" settings screen and the publish menu updated to reflect the option. The free/paid toggles in the publish menu have also been swapped out for a multi-select style component that will cater to more complex member segmentation.
67 lines
2.5 KiB
Handlebars
67 lines
2.5 KiB
Handlebars
<SortableObjects
|
|
@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 @extra.tokenComponent "draggable-object")
|
|
tagName="li"
|
|
class=(concat "ember-power-select-multiple-option" (if opt.class (concat " token-" opt.class)))
|
|
select=@select
|
|
content=(readonly opt)
|
|
idx=idx
|
|
isSortable=true
|
|
mouseDown=this.handleOptionMouseDown
|
|
touchStart=this.handleOptionTouchStart
|
|
}}
|
|
{{#if @selectedItemComponent}}
|
|
{{component @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}}
|
|
{{on "mousedown" this.handleOptionMouseDown}}
|
|
>
|
|
{{svg-jar "close" data-selected-index=idx}}
|
|
</span>
|
|
{{/unless}}
|
|
{{/component}}
|
|
{{else}}
|
|
{{#if (and @placeholder (not @searchEnabled))}}
|
|
<span class="ember-power-select-placeholder">{{@placeholder}}</span>
|
|
{{/if}}
|
|
{{/each}}
|
|
|
|
{{#if @searchEnabled}}
|
|
<input
|
|
type="search"
|
|
class="ember-power-select-trigger-multiple-input"
|
|
autocomplete="off"
|
|
autocorrect="off"
|
|
autocapitalize="off"
|
|
spellcheck="false"
|
|
id="ember-power-select-trigger-multiple-input-{{@select.uniqueId}}"
|
|
value={{@select.searchText}}
|
|
aria-controls={{@listboxId}}
|
|
style={{this.triggerMultipleInputStyle}}
|
|
placeholder={{this.maybePlaceholder}}
|
|
disabled={{@select.disabled}}
|
|
tabindex={{@tabindex}}
|
|
{{on "focus" @onFocus}}
|
|
{{on "blur" @onBlur}}
|
|
{{on "input" this.handleInput}}
|
|
{{on "keydown" this.handleKeydown}}
|
|
{{did-insert this.storeInputStyles}}
|
|
>
|
|
{{/if}}
|
|
</SortableObjects>
|
|
<span class="ember-power-select-status-icon"></span>
|