mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-12-05 12:34:08 +01:00
@@ -1,6 +1,8 @@
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', 'a[data-toggle="ajaxmodal"]', modalbox);
|
||||
$(document).on('click', 'a[data-toggle="ajaxmodal-autowidth"]', modalbox_autowidth);
|
||||
$(document).on('click', 'a[name=sendspam]', simple_ajax_request);
|
||||
$(document).on('click', 'a[name=sendvirus]', simple_ajax_request);
|
||||
|
||||
//parse_menubar('#topmenubar');
|
||||
//parse_menubar('#menubar');
|
||||
|
||||
@@ -201,4 +201,23 @@ function chpasswordform_cb() {
|
||||
error_cb: chpasswordform_cb
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Send a simple AJAX request.
|
||||
*/
|
||||
function simple_ajax_request(e) {
|
||||
var $this = $(this);
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: $this.attr("herf"),
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.status == "ok") {
|
||||
$("body").notify("success", data.respmsg, 2000);
|
||||
} else {
|
||||
$("body").notify("error", data.respmsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user