diff --git a/modoboa/extensions/admin/static/admin/js/admin.js b/modoboa/extensions/admin/static/admin/js/admin.js index 9c596b78d..5200fc4c6 100644 --- a/modoboa/extensions/admin/static/admin/js/admin.js +++ b/modoboa/extensions/admin/static/admin/js/admin.js @@ -24,11 +24,25 @@ Admin.prototype = { }, list_cb: function(data) { - $("#listing").html(data.table); + $("#objects_table tbody").html(function(pos, oldhtml) { + return oldhtml + data.rows; + }); this.update_listing(data); $("a.filter").click($.proxy(this.filter_by_tag, this)); }, + /** + * A new page has been received, inject it. + * + * @param {Object} data - page content + * @param {string} direction - + */ + add_new_page: function(data, direction) { + $("#objects_table tbody").html(function(pos, oldhtml) { + return oldhtml + data.rows; + }); + }, + /** * Children must override this method. */ @@ -95,6 +109,14 @@ Domains.prototype = { this.register_tag_handler("dom", this.generic_tag_handler); }, + end_of_list_reached: function(element) { + $("#objects_table").after( + $("
| {% trans "Name" %} | -{% trans "Alias(es)" %} | -{% trans "Tags" %} | -{% trans "Actions" %} | -
|---|---|---|---|
| {% domain_modify_link domain %} | -{% domain_aliases domain %} | -{% render_tags domain.tags %} | -{% domain_actions user domain %} | -
| {% trans "Name" %} | -{% trans "Fullname/Recipient" %} | -{% trans "Tags" %} | -{% trans "Actions" %} | -
|---|---|---|---|
| {% identity_modify_link ident %} | -{{ ident.name_or_rcpt }} | -{% render_tags ident.tags %} | -{% identity_actions user ident %} | -