mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-12-01 12:03:55 +01:00
* Some javascript improvements
* Fixed little issues into the admin app see #204
This commit is contained in:
+6
-2
@@ -28,7 +28,9 @@ function newaccount_cb() {
|
||||
function editaccount_cb() {
|
||||
accountform_init();
|
||||
$('#submit').click(function(e) {
|
||||
simple_ajax_form_post(e, editaccount_cb);
|
||||
simple_ajax_form_post(e, {
|
||||
error_cb: editaccount_cb
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -39,7 +41,9 @@ function dlistform_cb() {
|
||||
});
|
||||
$("#id_recipients").dynamic_input();
|
||||
$(".submit").one('click', function(e) {
|
||||
simple_ajax_form_post(e, dlistform_cb);
|
||||
simple_ajax_form_post(e, {
|
||||
error_cb: dlistform_cb
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
show: function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
|
||||
this.box = this.buildbox();
|
||||
this.box.modal();
|
||||
this.box.on('hidden', $.proxy(this.hidden_callback, this));
|
||||
@@ -85,6 +85,8 @@
|
||||
}
|
||||
if (data.status == "ok") {
|
||||
window.location.reload();
|
||||
} else {
|
||||
$("body").notify("error", data.respmsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -151,10 +151,10 @@ History.prototype = {
|
||||
},
|
||||
|
||||
getparam: function(name) {
|
||||
if (!this.params.has(name)) {
|
||||
if (this.params[name] === undefined) {
|
||||
return "";
|
||||
}
|
||||
return this.params.get(name);
|
||||
return this.params[name];
|
||||
},
|
||||
|
||||
baseurl: function(value, noreset) {
|
||||
|
||||
@@ -25,8 +25,11 @@
|
||||
},
|
||||
|
||||
listen: function() {
|
||||
$(document).on("click", "tbody>tr",
|
||||
$.proxy(this.toggle_select, this));
|
||||
|
||||
$(document)
|
||||
.off("click", "tbody>tr")
|
||||
.on("click", "tbody>tr",
|
||||
$.proxy(this.toggle_select, this));
|
||||
$(document).on("keydown", "body", $.proxy(this.keydown, this));
|
||||
$(document).on("keyup", "body", $.proxy(this.keyup, this));
|
||||
},
|
||||
@@ -66,6 +69,10 @@
|
||||
this._toggle_select($tr);
|
||||
},
|
||||
|
||||
is_selected: function($row) {
|
||||
return $row.hasClass(this.options.tr_selected_class);
|
||||
},
|
||||
|
||||
current_selection: function() {
|
||||
return $("tr[class*=" + this.options.tr_selected_class + "]");
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user