Fix #3867: Add namespaces to all Javascript events.

This commit is contained in:
evazion
2018-09-04 11:58:09 -05:00
parent c03af7f563
commit 3bed5f3cf9
23 changed files with 121 additions and 119 deletions

View File

@@ -49,24 +49,24 @@ PostModeMenu.initialize_selector = function() {
$("#mode-box select").val(Cookie.get("mode"));
}
$("#mode-box select").change(function(e) {
$("#mode-box select").on("change.danbooru", function(e) {
PostModeMenu.change();
$("#tag-script-field:visible").focus().select();
});
}
PostModeMenu.initialize_preview_link = function() {
$(".post-preview a").click(PostModeMenu.click);
$(".post-preview a").on("click.danbooru", PostModeMenu.click);
}
PostModeMenu.initialize_edit_form = function() {
$("#quick-edit-div").hide();
$("#quick-edit-form input[value=Cancel]").click(function(e) {
$("#quick-edit-form input[value=Cancel]").on("click.danbooru", function(e) {
PostModeMenu.close_edit_form();
e.preventDefault();
});
$("#quick-edit-form").submit(function(e) {
$("#quick-edit-form").on("submit.danbooru", function(e) {
$.ajax({
type: "put",
url: $("#quick-edit-form").attr("action"),