mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-08-15 09:48:08 +00:00
MailTracker: change default emptyText
by default show that the user first has to press search, and afterwards show the old emptyText Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
e8e332fe01
commit
23959bb0ff
@ -230,7 +230,7 @@ Ext.define('PMG.MailTracker', {
|
||||
|
||||
border: false,
|
||||
|
||||
emptyText: gettext('No data in database'),
|
||||
emptyText: gettext("Please enter your search parameters and press 'Search'."),
|
||||
disableSelection: true,
|
||||
|
||||
viewConfig: {
|
||||
@ -261,6 +261,7 @@ Ext.define('PMG.MailTracker', {
|
||||
|
||||
onSearch: function() {
|
||||
var view = this.getView();
|
||||
view.setEmptyText(gettext('No data in database'));
|
||||
var filter = this.lookupReference('filter');
|
||||
var status = this.lookupReference('status');
|
||||
var params = filter.getFilterParams();
|
||||
@ -315,6 +316,14 @@ Ext.define('PMG.MailTracker', {
|
||||
}
|
||||
},
|
||||
|
||||
// extjs has no method to dynamically change the emptytext on
|
||||
// grids, so we have to do it this way
|
||||
setEmptyText: function(emptyText) {
|
||||
let me = this;
|
||||
let tableview = me.getView();
|
||||
tableview.emptyText = `<div class="x-grid-empty">${emptyText || ""}</div>`;
|
||||
},
|
||||
|
||||
dockedItems: [
|
||||
{
|
||||
xtype: 'pmgMailTrackerFilter',
|
||||
|
Loading…
Reference in New Issue
Block a user