Add shortcut for deleting posts while in edit mode
This commit is contained in:
parent
795891767e
commit
d12f990320
2 changed files with 10 additions and 0 deletions
|
@ -33,6 +33,11 @@ shortcuts:</p>
|
||||||
<td><kbd>P</kbd></td>
|
<td><kbd>P</kbd></td>
|
||||||
<td>Focus first post in post list</td>
|
<td>Focus first post in post list</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><kbd>Delete</kbd></td>
|
||||||
|
<td>Delete post (while in edit mode)</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,11 @@ class PostMainView {
|
||||||
router.show(uri.formatClientLink('post', ctx.nextPostId));
|
router.show(uri.formatClientLink('post', ctx.nextPostId));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
keyboard.bind('del', (e) => {
|
||||||
|
if (ctx.editMode) {
|
||||||
|
this.sidebarControl._evtDeleteClick(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_installSidebar(ctx) {
|
_installSidebar(ctx) {
|
||||||
|
|
Loading…
Reference in a new issue