mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
New publish button markup implementation
This commit is contained in:
parent
2331572978
commit
fe7805c0cf
3 changed files with 18 additions and 22 deletions
|
@ -1,19 +1,17 @@
|
|||
<footer id="publish-bar">
|
||||
<nav>
|
||||
{{render 'post-tags-input'}}
|
||||
{{render 'post-tags-input'}}
|
||||
|
||||
<div class="right">
|
||||
<div class="right">
|
||||
|
||||
<section id="entry-controls" {{bind-attr class="isNew:unsaved"}}>
|
||||
{{#gh-popover-button popoverName="post-settings-menu" classNames="post-settings" title="Post Settings"}}
|
||||
<span class="hidden">Post Settings</span>
|
||||
{{/gh-popover-button}}
|
||||
{{#gh-popover name="post-settings-menu" classNames="post-settings-menu menu-right"}}
|
||||
{{render "post-settings-menu" model}}
|
||||
{{/gh-popover}}
|
||||
</section>
|
||||
<section id="entry-controls" {{bind-attr class="isNew:unsaved"}}>
|
||||
{{#gh-popover-button popoverName="post-settings-menu" classNames="post-settings" title="Post Settings"}}
|
||||
<span class="hidden">Post Settings</span>
|
||||
{{/gh-popover-button}}
|
||||
{{#gh-popover name="post-settings-menu" classNames="post-settings-menu menu-right"}}
|
||||
{{render "post-settings-menu" model}}
|
||||
{{/gh-popover}}
|
||||
</section>
|
||||
|
||||
{{view "editor-save-button" id="entry-actions"}}
|
||||
</div>
|
||||
</nav>
|
||||
{{view "editor-save-button" id="entry-actions"}}
|
||||
</div>
|
||||
</footer>
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<button type="button" {{action "save"}} {{bind-attr class="view.isDangerous:button-delete:button-save :js-publish-button" }}>
|
||||
{{view.save-text}}
|
||||
</button>
|
||||
{{#gh-popover-button popoverName="post-save-menu" classNameBindings="open:active :options :up" title="Post Settings"}}
|
||||
<span class="hidden">Post Settings</span>
|
||||
{{/gh-popover-button}}
|
||||
<button type="button" {{action "save"}} {{bind-attr class=":btn :btn-sm view.isDangerous:btn-red:btn-blue :js-publish-button" }}>{{view.save-text}}</button>
|
||||
{{#gh-popover-button popoverName="post-save-menu" classNameBindings=":btn :btn-sm view.isDangerous:btn-red:btn-blue btnopen:active :dropdown-toggle :up"}}
|
||||
<i class="options"></i>
|
||||
<span class="sr-only">Toggle Settings Menu</span>
|
||||
{{/gh-popover-button}}
|
||||
{{#gh-popover name="post-save-menu" closeOnClick="true" tagName="ul" classNames="editor-options overlay" publishTextBinding="view.publish-text" draftTextBinding="view.draft-text"}}
|
||||
<li {{bind-attr class="controller.willPublish:active" }}>
|
||||
<a {{action "setSaveType" "publish"}} href="#">{{view.publishText}}</a>
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
var EditorSaveButtonView = Ember.View.extend({
|
||||
templateName: 'editor-save-button',
|
||||
tagName: 'section',
|
||||
classNames: ['js-publish-splitbutton'],
|
||||
classNameBindings: ['isDangerous:splitbutton-delete:splitbutton-save'],
|
||||
classNames: ['splitbtn js-publish-splitbutton'],
|
||||
|
||||
//Tracks whether we're going to change the state of the post on save
|
||||
isDangerous: function () {
|
||||
|
|
Loading…
Add table
Reference in a new issue