Ghost/core/client/templates/editor-save-button.hbs
Matt Enlow 37fd17c084 Added popover component
Closes #2418, #2714
Ref #2446, #2565

- Added and injected `popover` service to globally control popovers
- Added `gh-popover-button` component
- Added `popover-mixin` for popover and popover-buttons to mixin
- Added body-event-listener mixin for popover service to watch for body
  clicks with
- Post settings and post save button both now use `gh-popover`
- Added hacks to `ember-hacks.css` to make popovers work until ghost-ui
  consolidates functionality
2014-05-31 17:23:41 -06:00

14 lines
841 B
Handlebars

<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}}
{{#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>
</li>
<li {{bind-attr class="controller.willPublish::active" }}>
<a {{action "setSaveType" "draft"}} href="#">{{view.draftText}}</a>
</li>
{{/gh-popover}}