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,11 +1,8 @@
import Utility from "./utility";
let Artist = {};
Artist.initialize_all = function() {
if ($("#c-artists").length) {
Artist.initialize_check_name();
Artist.initialize_shortcuts();
}
}
@@ -29,18 +26,6 @@ Artist.initialize_check_name = function() {
});
}
Artist.initialize_shortcuts = function() {
if ($("#c-artists #a-show").length) {
Utility.keydown("e", "edit", function(e) {
$("#artist-edit a")[0].click();
});
Utility.keydown("shift+d", "delete", function(e) {
$("#artist-delete a")[0].click();
});
}
};
$(document).ready(function() {
Artist.initialize_all();
});