posts/show: load flag/appeal/replacement dialogs via ajax (#3922).

This commit is contained in:
evazion
2018-09-26 17:17:46 -05:00
parent d1e9f9c3ce
commit f886f2fdb3
18 changed files with 74 additions and 148 deletions

View File

@@ -31,7 +31,6 @@ Post.initialize_all = function() {
this.initialize_post_image_resize_links();
this.initialize_post_image_resize_to_window_link();
this.initialize_similar();
this.initialize_replace_image_dialog();
this.initialize_gestures();
if ((Utility.meta("always-resize-images") === "true") || (Utility.meta("viewport") && (window.screen.width <= 660))) {
@@ -616,32 +615,6 @@ Post.initialize_saved_searches = function() {
});
}
Post.initialize_replace_image_dialog = function() {
$("#replace-image-dialog").dialog({
autoOpen: false,
width: 700,
modal: true,
buttons: {
"Submit": function() {
$("#replace-image-dialog form").submit();
$(this).dialog("close");
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#replace-image-dialog form').submit(function() {
$('#replace-image-dialog').dialog('close');
});
$("#replace-image").on("click.danbooru", function(e) {
e.preventDefault();
$("#replace-image-dialog").dialog("open");
});
};
$(document).ready(function() {
Post.initialize_all();
});