0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/templates/editor-save-button.hbs
Robert Jackson a1ed9adf92
Remove ObjectController proxying behavior.
Ember.ObjectController (and Ember.ArrayController) will be deprecated in
Ember 1.11 (and removed from core in Ember 2.0). The reasoning is
detailed in the Ember 2.0 RFC.

This PR does the following:

* Updates templates/controllers/views to explicitly reference model
  properties (instead of relying on proxying behavior).
* Clearly delineate where certain properties are being set or retrieved
  from (for example it was not clear exactly where `scratch` and
  `titleScratch` were stored).
* Remove usage of `Ember.ObjectController`.
* Add JSCS rule to prevent future PR's from adding regressions.
2015-01-01 21:51:20 -05:00

19 lines
1.1 KiB
Handlebars

<button type="button" {{action "save"}} {{bind-attr class=":btn :btn-sm view.isDangerous:btn-red:btn-blue :js-publish-button" }}>{{view.saveText}}</button>
{{#gh-dropdown-button dropdownName="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-dropdown-button}}
{{#gh-dropdown name="post-save-menu" closeOnClick="true" tagName="div" classNames="dropdown editor-options"}}
<ul class="dropdown-menu dropdown-triangle-bottom-right">
<li {{bind-attr class=":post-save-publish willPublish:active"}}>
<a {{action "setSaveType" "publish"}} href="#">{{view.publishText}}</a>
</li>
<li {{bind-attr class=":post-save-draft willPublish::active"}}>
<a {{action "setSaveType" "draft"}} href="#">{{view.draftText}}</a>
</li>
<li class="divider delete"></li>
<li class="delete">
<a {{action "openModal" "delete-post" this}} href="#">Delete Post</a>
</li>
</ul>
{{/gh-dropdown}}