mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
@@ -49,6 +49,22 @@ Admin.prototype = {
|
||||
listen: function() {
|
||||
},
|
||||
|
||||
/**
|
||||
* Load a new page using an AJAX request.
|
||||
*
|
||||
* @this Admin
|
||||
* @param {Object} e - event object
|
||||
*/
|
||||
page_loader: function(e) {
|
||||
var $link = get_target(e);
|
||||
e.preventDefault();
|
||||
if ($link.hasClass("navigation")) {
|
||||
$(".sidebar li.active").removeClass("active");
|
||||
$link.parent().addClass("active");
|
||||
}
|
||||
this.navobj.baseurl($link.attr("href")).update();
|
||||
},
|
||||
|
||||
importform_cb: function() {
|
||||
$(".submit").one('click', function(e) {
|
||||
e.preventDefault();
|
||||
@@ -111,6 +127,14 @@ Domains.prototype = {
|
||||
this.register_tag_handler("dom");
|
||||
},
|
||||
|
||||
/**
|
||||
* Custom callbacks declaration.
|
||||
*/
|
||||
listen: function() {
|
||||
Admin.prototype.listen.call(this);
|
||||
$(document).on("click", "a.ajaxnav", $.proxy(this.page_loader, this));
|
||||
},
|
||||
|
||||
/**
|
||||
* Initialize the domain links embedded within a page.
|
||||
*
|
||||
@@ -270,16 +294,6 @@ Identities.prototype = {
|
||||
$(document).on("click", "a.ajaxcall", $.proxy(this.send_call, this));
|
||||
},
|
||||
|
||||
page_loader: function(e) {
|
||||
var $link = get_target(e);
|
||||
e.preventDefault();
|
||||
if ($link.hasClass("navigation")) {
|
||||
$(".sidebar li.active").removeClass("active");
|
||||
$link.parent().addClass("active");
|
||||
}
|
||||
this.navobj.baseurl($link.attr("href")).update();
|
||||
},
|
||||
|
||||
/**
|
||||
* Send an ajax call.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user