added missing files
This commit is contained in:
29
app/assets/javascripts/dmails.js
Normal file
29
app/assets/javascripts/dmails.js
Normal file
@@ -0,0 +1,29 @@
|
||||
(function() {
|
||||
Danbooru.Dmail = {};
|
||||
|
||||
Danbooru.Dmail.initialize_all = function() {
|
||||
$("#c-dmails #preview").hide();
|
||||
|
||||
this.initialize_preview_link();
|
||||
}
|
||||
|
||||
Danbooru.Dmail.initialize_preview_link = function() {
|
||||
$("#c-dmails #preview-button").click(function(e) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/dtext_preview",
|
||||
data: {
|
||||
body: $("#dmail_body").val()
|
||||
},
|
||||
success: function(data) {
|
||||
$("#preview").html(data).show();
|
||||
}
|
||||
});
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
||||
$(document).ready(function() {
|
||||
Danbooru.Dmail.initialize_all();
|
||||
});
|
||||
Reference in New Issue
Block a user