0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Fix double-click & enter/o editing shortcuts

closes #5767

- readd action for double click
- use model for openEditor
This commit is contained in:
Hannah Wolfe 2015-08-31 10:56:57 +01:00
parent 720c421e8b
commit 88e6ca427c
2 changed files with 3 additions and 1 deletions

View file

@ -61,6 +61,8 @@ var PostsPostRoute = AuthenticatedRoute.extend(ShortcutsRoute, {
actions: {
openEditor: function (post) {
post = post || this.get('controller.model');
if (!post) {
return;
}

View file

@ -11,7 +11,7 @@
{{#gh-infinite-scroll-box tagName="section" classNames="content-list-content js-content-scrollbox" fetch="loadNextPage"}}
<ol class="posts-list">
{{#each sortedPosts key="id" as |post|}}
{{#gh-posts-list-item post=post active=(is-equal post currentPost) previewIsHidden=container.previewIsHidden as |component|}}
{{#gh-posts-list-item post=post active=(is-equal post currentPost) onDoubleClick="openEditor" previewIsHidden=container.previewIsHidden as |component|}}
{{#link-to component.viewOrEdit post.id class="permalink" title="Edit this post"}}
<h3 class="entry-title">{{post.title}}</h3>
<section class="entry-meta">