fixes #21: Unable to preview forum posts and wiki pages
This commit is contained in:
@@ -21,16 +21,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.ForumPost.initialize_preview_link = function() {
|
Danbooru.ForumPost.initialize_preview_link = function() {
|
||||||
$("#c-forum-topics #preview a[name=toggle-preview]").click(function() {
|
$("#c-forum-topics #preview a[name=toggle-preview]").click(function(e) {
|
||||||
$("#preview").toggle();
|
$("#preview").toggle();
|
||||||
$("#dtext-help").toggle();
|
$("#dtext-help").toggle();
|
||||||
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#c-forum-topics input[value=Preview]").click(function(e) {
|
$("#c-forum-topics input[value=Preview]").click(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
url: "/dtext/preview",
|
url: "/dtext_preview",
|
||||||
data: {
|
data: {
|
||||||
body: $("#forum_post_body").val()
|
body: $("#forum_post_body").val()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,16 +8,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.WikiPage.initialize_preview_link = function() {
|
Danbooru.WikiPage.initialize_preview_link = function() {
|
||||||
$("#c-wiki-pages #preview a[name=toggle-preview]").click(function() {
|
$("#c-wiki-pages #preview a[name=toggle-preview]").click(function(e) {
|
||||||
$("#preview").toggle();
|
$("#preview").toggle();
|
||||||
$("#dtext-help").toggle();
|
$("#dtext-help").toggle();
|
||||||
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#c-wiki-pages input[value=Preview]").click(function(e) {
|
$("#c-wiki-pages input[value=Preview]").click(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
url: "/dtext/preview",
|
url: "/dtext_preview",
|
||||||
data: {
|
data: {
|
||||||
body: $("#wiki_page_body").val()
|
body: $("#wiki_page_body").val()
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user