remove keymaster dependency

This commit is contained in:
albert
2012-09-19 16:53:36 -04:00
parent f15edff392
commit 858a8ed72a
6 changed files with 9 additions and 10 deletions

View File

@@ -1,6 +1,5 @@
//= require jquery-1.7.1.min.js
//= require jquery-ui-1.8.12.custom.min.js
//= require keymaster.min.js
//= require jquery.hotkeys.js
//= require jquery.timeout.js
//= require rails.js

View File

@@ -489,7 +489,7 @@ Danbooru.Note = {
$(function() {
if ($("#c-posts").length && $("#a-show").length) {
$("#translate").one("click", Danbooru.Note.TranslationMode.start);
key("n", Danbooru.Note.TranslationMode.start);
$(document).bind("keypress", "n", Danbooru.Note.TranslationMode.start);
Danbooru.Note.load_all();
$("#image").click(Danbooru.Note.Box.toggle_all);
}

View File

@@ -15,7 +15,7 @@
})();
$(function() {
key('right', function(){ Danbooru.Paginator.next_page() });
key('left', function(){ Danbooru.Paginator.prev_page() });
$(document).bind("keypress", 'right', function(){ Danbooru.Paginator.next_page() });
$(document).bind("keypress", 'left', function(){ Danbooru.Paginator.prev_page() });
});

View File

@@ -22,13 +22,13 @@
}
Danbooru.Post.initialize_shortcuts = function() {
key('/', function(e) {
$(document).bind("keypress", '/', function(e) {
$("#tags").trigger("focus");
e.preventDefault();
});
if ($("#a-show").length) {
key('e', function(e) {
$(document).bind("keypress", 'e', function(e) {
$("#post-edit-link").trigger("click");
$("#post_tag_string").trigger("focus");
e.preventDefault();