[minor] dont show paging footer if no results in list

This commit is contained in:
Rushabh Mehta 2016-12-15 16:19:13 +05:30
parent 1caf245673
commit 1aba76f4bb
5 changed files with 9 additions and 5 deletions

View file

@ -45,7 +45,7 @@ cur_frm.cscript.refresh = function(doc) {
}).always(function() {
cur_frm.reload_doc();
});
}, doc.disabled ? "fa fa-ok" : "fa fa-off");
}, doc.disabled ? "fa fa-check" : "fa fa-off");
}
cur_frm.cscript.report_type(doc);

View file

@ -289,7 +289,7 @@ frappe.RoleEditor = Class.extend({
for(key in perm) {
if(key!='parent' && key!='permlevel') {
if(perm[key]) {
perm[key] = '<i class="fa fa-ok"></i>';
perm[key] = '<i class="fa fa-check"></i>';
} else {
perm[key] = '';
}

View file

@ -25,7 +25,7 @@ frappe.ui.form.on("ToDo", {
// back to list
frappe.set_route("List", "ToDo");
});
}, "fa fa-ok", "btn-success");
}, "fa fa-check", "btn-success");
} else {
frm.add_custom_button(__("Re-open"), function() {
frm.set_value("status", "Open");

View file

@ -58,7 +58,7 @@ frappe.ui.form.AssignTo = Class.extend({
if(d[i].owner===user) {
me.primary_action = this.frm.page.add_menu_item(__("Assignment Complete"), function() {
me.remove(user);
}, "fa fa-ok", "btn-success")
}, "fa fa-check", "btn-success")
}
if(!(d[i].owner === user || me.frm.perm[0].write)) {

View file

@ -313,7 +313,9 @@ frappe.ui.Listing = Class.extend({
r.values = this.get_values_from_response(r.message);
}
if(r.values && r.values.length) {
if(!r.values) r.values = [];
if(r.values.length) {
this.data = this.data.concat(r.values);
this.render_list(r.values);
this.update_paging(r.values);
@ -333,6 +335,8 @@ frappe.ui.Listing = Class.extend({
}
}
this.wrapper.find('.list-paging-area').toggle(r.values.length || this.start > 0);
// callbacks
if(this.onrun) this.onrun();
if(this.callback) this.callback(r);