@@ -127,6 +127,7 @@ frappe.views.ListView = frappe.ui.BaseList.extend({ | |||||
return; | return; | ||||
} | } | ||||
this.is_list_view = true; | |||||
this.page_name = 'List/' + this.doctype; | this.page_name = 'List/' + this.doctype; | ||||
this.dirty = true; | this.dirty = true; | ||||
this.tags_shown = false; | this.tags_shown = false; | ||||
@@ -186,8 +186,10 @@ frappe.ui.BaseList = Class.extend({ | |||||
if (this.meta) { | if (this.meta) { | ||||
var filter_count = 1; | 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({ | this.page.add_field({ | ||||
fieldtype: 'Data', | fieldtype: 'Data', | ||||
label: 'ID', | label: 'ID', | ||||
@@ -365,6 +365,16 @@ frappe.views.QueryReport = Class.extend({ | |||||
} | } | ||||
}, | }, | ||||
refresh: function() { | 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 | // Run | ||||
var me = this; | var me = this; | ||||