hotkeys: add E to edit, shift+D to delete to artists, pools, wiki, forum.

This commit is contained in:
evazion
2017-01-24 02:24:12 -06:00
parent c3fa653fc5
commit 7571cda640
8 changed files with 55 additions and 12 deletions

View File

@@ -3,6 +3,7 @@
Danbooru.Pool.initialize_all = function() {
if ($("#c-pools").length) {
this.initialize_shortcuts();
if (Danbooru.meta("enable-auto-complete") === "true") {
this.initialize_autocomplete_for("#search_name_matches,#quick_search_name_matches");
}
@@ -70,6 +71,18 @@
});
}
Danbooru.Pool.initialize_shortcuts = function() {
if ($("#c-pools #a-show").length) {
Danbooru.keydown("e", "edit", function(e) {
$("#pool-edit a")[0].click();
});
Danbooru.keydown("shift+d", "delete", function(e) {
$("#pool-delete a")[0].click();
});
}
};
Danbooru.Pool.initialize_simple_edit = function() {
$("#sortable").sortable({
placeholder: "ui-state-placeholder"