[merge] hotfix

This commit is contained in:
Rushabh Mehta 2017-08-22 15:48:19 +05:30
commit 3d78cabfe9
3 changed files with 15 additions and 2 deletions

View file

@ -127,6 +127,7 @@ frappe.views.ListView = frappe.ui.BaseList.extend({
return;
}
this.is_list_view = true;
this.page_name = 'List/' + this.doctype;
this.dirty = true;
this.tags_shown = false;

View file

@ -186,8 +186,10 @@ frappe.ui.BaseList = Class.extend({
if (this.meta) {
var filter_count = 1;
$(`<span class="octicon octicon-search text-muted small"></span>`)
.appendTo(this.page.page_form);
if(this.is_list_view) {
$(`<span class="octicon octicon-search text-muted small"></span>`)
.prependTo(this.page.page_form);
}
this.page.add_field({
fieldtype: 'Data',
label: 'ID',

View file

@ -365,6 +365,16 @@ frappe.views.QueryReport = Class.extend({
}
},
refresh: function() {
// throttle
// stop refresh from being called multiple times (from triggers ?)
if (!this.request_refresh) {
this.request_refresh = setTimeout(() => {
this._refresh();
this.request_refresh = null;
}, 300);
}
},
_refresh: function() {
// Run
var me = this;