Add / remove query header tools

Contains tips for configurators working with Aware IM
Post Reply
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Add / remove query header tools

Post by hpl123 »

Hi all,
This is a tip on how to manually add / remove query header tools. In the advanced script of your query add / play with the following:

To remove all:
config.tools = []

To remove all + add help icon (or any other extjs icon) only which starts a process:
config.tools = [];config.tools.push ({ type: 'help',tooltip: 'Tooltip', handler:function () { AwareApp.startProcess('MyProcess') }});

To remove all and have the save state and restore state icons only:
config.collapsible=false;config.tools = [];config.tools.push ({ type: 'save',qtip:{text:this.strSaveSettingsTip}, handler:function (event, toolEl, panel) {AwareApp.saveState (this.m_grid);},scope:this});config.tools.push ({ type: 'restore',qtip:{text:this.strRestoreSettingsTip}, handler:function (event, toolEl, panel) {AwareApp.restoreStateDefaults (this.m_grid, this.getKeyForState ());},scope:this});
Henrik (V8 Developer Ed. - Windows)
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Add / remove query header tools

Post by hpl123 »

hpl123 wrote:Hi all,
This is a tip on how to manually add / remove query header tools. In the advanced script of your query add / play with the following:

To remove all:
config.tools = []

To remove all + add help icon (or any other extjs icon) only which starts a process:
config.tools = [];config.tools.push ({ type: 'help',tooltip: 'Tooltip', handler:function () { AwareApp.startProcess('MyProcess') }});

To remove all and have the save state and restore state icons only:
config.collapsible=false;config.tools = [];config.tools.push ({ type: 'save',qtip:{text:this.strSaveSettingsTip}, handler:function (event, toolEl, panel) {AwareApp.saveState (this.m_grid);},scope:this});config.tools.push ({ type: 'restore',qtip:{text:this.strRestoreSettingsTip}, handler:function (event, toolEl, panel) {AwareApp.restoreStateDefaults (this.m_grid, this.getKeyForState ());},scope:this});
In the last code segment, I have manually changed the gear icon of save query settings to the save icon. If you want to use the standard icon, this is the code to use:
To remove all and have the save state and restore state icons only:
config.collapsible=false;config.tools = [];config.tools.push ({ type: 'gear',qtip:{text:this.strSaveSettingsTip}, handler:function (event, toolEl, panel) {AwareApp.saveState (this.m_grid);},scope:this});config.tools.push ({ type: 'restore',qtip:{text:this.strRestoreSettingsTip}, handler:function (event, toolEl, panel) {AwareApp.restoreStateDefaults (this.m_grid, this.getKeyForState ());},scope:this});[
Henrik (V8 Developer Ed. - Windows)
kklosson
Posts: 1617
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Post by kklosson »

Is it possible to reference a System Settings value to determine whether to run the script?

IF SystemSetting.NoShowToolBar='Yes'

Script

END
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Script

Post by hpl123 »

If you know javascript then it can probably be done.
Henrik (V8 Developer Ed. - Windows)
Post Reply