diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2009-09-22 18:55:36 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2009-09-22 18:55:36 +0000 |
| commit | d90a4f499b577ff15d88fb2f3d7ed11cce24367f (patch) | |
| tree | 06f1d08404acf30458eefaafa7c28cdf4e590416 | |
| parent | 63702c6379d5396ce437d6cc4c1088692e1047a1 (diff) | |
| download | xxv-d90a4f499b577ff15d88fb2f3d7ed11cce24367f.tar.gz xxv-d90a4f499b577ff15d88fb2f3d7ed11cce24367f.tar.bz2 | |
* jason update search fields placement
| -rw-r--r-- | skins/jason/files.lst | 8 | ||||
| -rw-r--r-- | skins/jason/now.js | 21 | ||||
| -rw-r--r-- | skins/jason/program.js | 6 | ||||
| -rw-r--r-- | skins/jason/ux/Multiselect.js (renamed from skins/jason/ux/multiselect.js) | 0 | ||||
| -rw-r--r-- | skins/jason/ux/Search.js (renamed from skins/jason/ux/filter.js) | 63 | ||||
| -rw-r--r-- | skins/jason/ux/SlideZone.js (renamed from skins/jason/ux/Ext.ux.SlideZone.js) | 2 | ||||
| -rw-r--r-- | skins/jason/ux/TabCloseMenu.js (renamed from skins/jason/ux/tabclosemenu.js) | 0 |
7 files changed, 38 insertions, 62 deletions
diff --git a/skins/jason/files.lst b/skins/jason/files.lst index e46a58f..73847c8 100644 --- a/skins/jason/files.lst +++ b/skins/jason/files.lst @@ -3,10 +3,10 @@ extjs/adapter/ext/ext-base.js \ extjs/ext-all.js \ fixes.js \ ux/DDView.js \ -ux/multiselect.js \ -ux/tabclosemenu.js \ -ux/filter.js \ -ux/Ext.ux.SlideZone.js \ +ux/Multiselect.js \ +ux/TabCloseMenu.js \ +ux/Search.js \ +ux/SlideZone.js \ common.js \ reader.js \ help.js \ diff --git a/skins/jason/now.js b/skins/jason/now.js index 40befbe..515dde9 100644 --- a/skins/jason/now.js +++ b/skins/jason/now.js @@ -58,7 +58,7 @@ Ext.xxv.NowGrid = function(viewer) { range.push([configuration.periods[i],configuration.periods[i]]); } - var timefield = new Ext.form.ComboBox({ + this.timefield = new Ext.form.ComboBox({ id:'timefield' ,width:75
,store: new Ext.data.Store({
@@ -132,9 +132,13 @@ Ext.xxv.NowGrid = function(viewer) { pageSize: configuration.pageSize ,store: this.store ,displayInfo: true - ,items:['->', timefield ] }) - });
+ }); + + var tbPosition = 15
+ var tb = this.topToolbar; + tb.insert(tbPosition+0, '-'); + tb.insert(tbPosition+1, this.timefield); this.store.on({
'load' : this.onLoad @@ -175,18 +179,11 @@ Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, { new Ext.xxv.MessageBox().msgFailure(this.szLoadException, e); } ,onBeforeLoad : function( store, opt ) { - var tf = Ext.getCmp('timefield'); - if(!tf) return; - if(this.getTopToolbar().displayEl) { - var size = tf.getSize(); - this.getTopToolbar().displayEl.setRight(30+size.width); - } delete(this.store.baseParams['data']); - - var time = tf.lastQuery; - if(!time || time == '') time = tf.getValue(); + var time = this.timefield.lastQuery; + if(!time || time == '') time = this.timefield.getValue(); if(!time || time == this.szPresent) { store.baseParams.cmd = 'n'; } else if(time == this.szFollowing) { diff --git a/skins/jason/program.js b/skins/jason/program.js index 4fdc5f1..b3523cf 100644 --- a/skins/jason/program.js +++ b/skins/jason/program.js @@ -97,9 +97,9 @@ Ext.xxv.programGrid = function(viewer, record) { ,showGroupName: false }) ,tbar:new Ext.PagingToolbar({ - pageSize: configuration.pageSize, - store: this.store, - displayInfo: true + pageSize: configuration.pageSize + ,store: this.store + ,displayInfo: true }) ,plugins:[this.filter] });
diff --git a/skins/jason/ux/multiselect.js b/skins/jason/ux/Multiselect.js index d52dbe8..d52dbe8 100644 --- a/skins/jason/ux/multiselect.js +++ b/skins/jason/ux/Multiselect.js diff --git a/skins/jason/ux/filter.js b/skins/jason/ux/Search.js index 402ca0e..1a22b3d 100644 --- a/skins/jason/ux/filter.js +++ b/skins/jason/ux/Search.js @@ -5,7 +5,7 @@ * @author Ing. Jozef Sakalos * @copyright (c) 2008, by Ing. Jozef Sakalos * @date 17. January 2008 - * @version $Id: Ext.ux.grid.Search.js 11 2008-02-22 17:13:52Z jozo $ + * @version $Id$ * * @license Ext.ux.grid.Search is licensed under the terms of * the Open Source LGPL 3.0 license. Commercial use is permitted to the extent @@ -32,7 +32,7 @@ Ext.extend(Ext.ux.grid.Search, Ext.util.Observable, { /** * @cfg {String} searchTipText Text to display as input tooltip. Set to '' for no tooltip */ - searchTipText:'Type a text to search and press Enter' + searchTipText:'Type a text to search and press Enter' /** * @cfg {String} position Where to display the search controls. Valid values are top and bottom (defaults to bottom) * Corresponding toolbar has to exist at least with mimimum configuration tbar:[] for position:top or bbar:[] @@ -42,7 +42,7 @@ Ext.extend(Ext.ux.grid.Search, Ext.util.Observable, { /** * @cfg {Number} width Width of input field in pixels (defaults to 100) */ - ,width:150 + ,width:100 /** * @cfg {String} xtype xtype is usually not used to instantiate this plugin but you have a chance to identify it */ @@ -52,22 +52,15 @@ Ext.extend(Ext.ux.grid.Search, Ext.util.Observable, { */ ,paramNames: { fields:'fields' + ,query:'query' ,all:'search' ,cmd:'search' - ,query:'query' } /** - * @cfg {String} shortcutKey Key to fucus the input field (defaults to r = Sea_r_ch). Empty string disables shortcut - */ - ,shortcutKey:'r' - /** - * @cfg {String} shortcutModifier Modifier for shortcutKey. Valid values: alt, ctrl, shift (defaults to alt) + * @cfg {int} position + * The starting position inside the toolbar */ - ,shortcutModifier:'alt' - /** - * @cfg {String} align 'left' or 'right' (defaults to 'right') - */ - ,align:'right' + ,tbPosition: 15 /** * @cfg {Number} minLength force user to type this many character before he can make a search */ @@ -86,20 +79,22 @@ Ext.extend(Ext.ux.grid.Search, Ext.util.Observable, { // }}} // {{{ /** - * private add plugin controls to <b>existing</b> toolbar and calls reconfigure + * private add plugin controls to <b>existing</b> toolbar */ ,onRender:function() { var grid = this.grid; - var tb = 'owner' == this.position ? grid.ownerCt.topToolbar : grid.topToolbar; - - // handle position - if('right' === this.align) { - tb.addFill(); - } - else { - tb.addSeparator(); + var tb; + if('bottom' == this.position) { + tb = grid.bottomToolbar; + } else if ('owner' == this.position) { + tb = grid.ownerCt.topToolbar; + } else { + tb = grid.topToolbar; } + tb.insert(this.tbPosition, '-'); + this.tbPosition++; + // add input field (TwinTriggerField in fact) this.field = new Ext.form.TwinTriggerField({ width:this.width @@ -128,26 +123,8 @@ Ext.extend(Ext.ux.grid.Search, Ext.util.Observable, { map.stopEvent = true; }, this, {single:true}); - tb.add(this.field); + tb.insert(this.tbPosition, this.field); - if(tb.displayEl) { - var size = this.field.getSize(); - tb.displayEl.setRight(10+this.width); - } - // keyMap - if(this.shortcutKey && this.shortcutModifier) { - var shortcutEl = this.grid.getEl(); - var shortcutCfg = [{ - key:this.shortcutKey - ,scope:this - ,stopEvent:true - ,fn:function() { - this.field.focus(); - } - }]; - shortcutCfg[this.shortcutModifier] = true; - this.keymap = new Ext.KeyMap(shortcutEl, shortcutCfg); - } } // eo function onRender // }}} // {{{ @@ -172,6 +149,7 @@ Ext.extend(Ext.ux.grid.Search, Ext.util.Observable, { var store = this.grid.store; // ask server to filter records + // clear start (necessary if we have paging) if(store.lastOptions && store.lastOptions.params) { store.lastOptions.params[store.paramNames.start] = 0; @@ -219,6 +197,7 @@ Ext.extend(Ext.ux.grid.Search, Ext.util.Observable, { ,disable:function() { this.setDisabled(true); } // eo function disable + // }}} }); // eo extend diff --git a/skins/jason/ux/Ext.ux.SlideZone.js b/skins/jason/ux/SlideZone.js index df657dc..520797b 100644 --- a/skins/jason/ux/Ext.ux.SlideZone.js +++ b/skins/jason/ux/SlideZone.js @@ -1,7 +1,7 @@ /** * Class Ext.ux.SlideZone * @author Jared Gisin - * @version $Id: Ext.ux.SlideZone.js 93 2007-12-12 04:41:40Z jaredgisin $ + * @version $Id$ * @license http://www.opensource.org/licenses/mit-license.php * * TODO: make sure slider limits work when snap = 1 or snap < slider width/height diff --git a/skins/jason/ux/tabclosemenu.js b/skins/jason/ux/TabCloseMenu.js index 09d3678..09d3678 100644 --- a/skins/jason/ux/tabclosemenu.js +++ b/skins/jason/ux/TabCloseMenu.js |
