mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-16 04:08:34 +03:00
68eb6b67b0
Closes #4540 - Implements drag & drop to reorder navigation items - Adds a `sort` property to navigation items - Adds a tiny library to enable touch events for drag & drop. It hooks onto jQuery UI. - Sort nav items before being saved - Adds `settings-view-navigation` to route for body class
25 lines
880 B
Handlebars
25 lines
880 B
Handlebars
{{#unless navItem.last}}
|
|
<span class="navigation-item-drag-handle icon-grab">
|
|
<span class="hidden">Reorder</span>
|
|
</span>
|
|
{{/unless}}
|
|
<div class="navigation-inputs">
|
|
<span class="navigation-item-label">
|
|
{{gh-trim-focus-input focus=navItem.last placeholder="Label" value=navItem.label}}
|
|
</span>
|
|
<span class="navigation-item-url">
|
|
{{gh-navitem-url-input baseUrl=baseUrl url=navItem.url change="updateUrl"}}
|
|
</span>
|
|
</div>
|
|
<span class="navigation-item-action">
|
|
{{#if navItem.last}}
|
|
<button type="button" class="add-navigation-link icon-add" {{action "addItem"}}>
|
|
<span class="hidden">Add</span>
|
|
</button>
|
|
{{else}}
|
|
<button type="button" class="navigation-delete icon-trash" {{action "deleteItem" navItem}}>
|
|
<span class="hidden">Delete</span>
|
|
</button>
|
|
{{/if}}
|
|
</span>
|