-
25 Apr 2008 10:31 AM #411
List filter options - dynamic loading
List filter options - dynamic loading
First, congratulations Ambience, this is a great plugin!. Thanks for this excelent contribution.
I
-
25 Apr 2008 1:34 PM #412
Thanks,
The List type filter takes a 'store' option that allows you to provide the menu with a store that is loaded on show. Be sure that the records have their id properties set correctly and that the store either contains a field called 'text' or that you set the 'labelField' config value to the field you wish the labels to be generated from.
-
25 Apr 2008 2:15 PM #413
Not saving state in IE6
Not saving state in IE6
Ambience did you realize that the filter demo does not save state in IE 6? This was a surprise to me, what do you think?
-
26 Apr 2008 8:05 PM #414
In my data grid, I differentiate between data types such as "int" and "float". To use your filters with these types, I modified GridFilters.js, and figured I'd put the code here in case anyone needs to do similar handling:
JoshPHP Code:getFilterClass: function(type){
/*customizations to handle data types*/
if( type=='int' || type=='float' ) {
type = 'numeric';
}
return Ext.ux.grid.filter[type.substr(0, 1).toUpperCase() + type.substr(1) + 'Filter'];
}
-
26 Apr 2008 8:57 PM #415
In RangeMenu.js, you've a typo in the declaration of the fields variable in 0.2.6. When declaring the field configuration, you give this:
What you want, I think, is thisPHP Code:'eq': new Ext.ux.menu.EditableItem({
icon: this.icons.eq,
editor: new cls(typeof cfg == "object" ? cfg.gt || '' : cfg)})
JoshPHP Code:'eq': new Ext.ux.menu.EditableItem({
icon: this.icons.eq,
editor: new cls(typeof cfg == "object" ? cfg.eq || '' : cfg)})
-
26 Apr 2008 9:51 PM #416
Edited RangeMenu.js
Edited RangeMenu.js
I found that people using my site often wanted to combine "equals" and "not equals" searches for numeric data. They also wanted to be able to use wild cards, so you could do a LIKE search, such as for "123*456.7*". In the attached edited version of RangeMenu.js, I incorporate both of these, based on 0.2.6.
I'll upload similar functionality for strings soon.
Josh
Edit: A couple things I forgot to mention:
* The code here presumes you're doing server-side filtering. To handle this in the browser, you'd need to add some regular expressions to the validation code in NumericFilter.js
* I should have uploaded the PNG I'm using for this as well. It's basically just a combination of the greater than and less than pngs, stitched together.Last edited by notjoshing; 26 Apr 2008 at 10:30 PM. Reason: Forgot the png.
-
26 Apr 2008 11:49 PM #417Extensions:
Ext.ux.DatePickerPlus (Multimonth,Multiselect,...)
Ext.ux.menu.StoreMenu - Ajax Store as menu-item config
Extended Window - Aero Shadows, nested grayscaled modal windows
Ext.MessageBox.promptCombo/promptRadio/promptCheckbox
Ext.ux.plugin.triggerfieldTooltip (for Comboboxes, Datefields...)
Ext.util.MD5
Ext.util.Utf8 (encode/decode)
Ext.util.base64 (encode/decode)
Using:
ExtJS 3.4.1.1/4.2
XPsp3/W7sp1
IE8/9/10
FF 20
Chrome 26
-
27 Apr 2008 11:25 AM #418
-
27 Apr 2008 6:51 PM #419
I plugged away a bit today on adding NOT EQUAL TO functionality (ne) to the string and numeric filters. Here's a summary of changes:
[LIST][*][B]
-
27 Apr 2008 9:13 PM #420
Hello ambience!
This is really great work, but unfortunatly it is not localization-friendly, so I suggest you to make some changes:
In GridFilter.js
In BooleanFilter.jsCode:... showMenu: true, filtersText: 'Filters', init: function(grid){ ... onRender: function(){ var hmenu; if(this.showMenu){ hmenu = this.grid.getView().hmenu; this.sep = hmenu.addSeparator(); this.menu = hmenu.add(new Ext.menu.CheckItem({ text: this.filtersText, menu: new Ext.menu.Menu() })); this.menu.on('checkchange', this.onCheckChange, this); this.menu.on('beforecheckchange', this.onBeforeCheck, this); hmenu.on('beforeshow', this.onMenu, this); } this.grid.getView().on("refresh", this.onRefresh, this); this.updateColumnHeadings(this.grid.getView()); }, ...
In DateFilter.jsCode:Ext.ux.grid.filter.BooleanFilter = Ext.extend(Ext.ux.grid.filter.Filter, { defaultValue: false, yesText: 'Yes', noText: 'No', init: function(){ var gId = Ext.id(); this.options = [ new Ext.menu.CheckItem({text: this.yesText, group: gId, checked: this.defaultValue === true}), new Ext.menu.CheckItem({text: this.noText, group: gId, checked: this.defaultValue === false})]; this.menu.add(this.options[0], this.options[1]); ...
With best regards.Code:Ext.ux.grid.filter.DateFilter = Ext.extend(Ext.ux.grid.filter.Filter, { dateFormat: 'm/d/Y', pickerOpts: {}, beforeText: 'Before', afterText: 'After', onText: 'On', init: function(){ var opts = Ext.apply(this.pickerOpts, { minDate: this.minDate, maxDate: this.maxDate, format: this.dateFormat }); var dates = this.dates = { 'before': new Ext.menu.CheckItem({text: this.beforeText, menu: new Ext.menu.DateMenu(opts)}), 'after': new Ext.menu.CheckItem({text: this.afterText, menu: new Ext.menu.DateMenu(opts)}), 'on': new Ext.menu.CheckItem({text: this.onText, menu: new Ext.menu.DateMenu(opts)})}; this.menu.add(dates.before, dates.after, "-", dates.on); ...The first bird may get a worm but the second mouse will get the cheese.


Reply With Quote



Thank you for sharing!