Convert keyboard shortcuts to use data-shortcut.

This commit is contained in:
evazion
2018-08-11 16:39:45 -05:00
parent d369d38419
commit bbaadda1e3
25 changed files with 44 additions and 259 deletions

View File

@@ -1,12 +1,6 @@
import Utility from './utility'
let Pool = {};
Pool.initialize_all = function() {
if ($("#c-pools").length) {
this.initialize_shortcuts();
}
if ($("#c-posts").length && $("#a-show").length) {
this.initialize_add_to_pool_link();
}
@@ -30,18 +24,6 @@ Pool.initialize_add_to_pool_link = function() {
});
}
Pool.initialize_shortcuts = function() {
if ($("#c-pools #a-show").length) {
Utility.keydown("e", "edit", function(e) {
$("#pool-edit a")[0].click();
});
Utility.keydown("shift+d", "delete", function(e) {
$("#pool-delete a")[0].click();
});
}
};
Pool.initialize_simple_edit = function() {
$("#sortable").sortable({
placeholder: "ui-state-placeholder"