Commit f1f1452f authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Add GridFilters icons to GridFilters plugin

* Update generic.js to support new GridFilters
parent 9651c1e7
......@@ -121,6 +121,7 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
this.sep = hmenu.addSeparator();
this.menu = hmenu.add(new Ext.menu.CheckItem({
text: this.menuFilterText,
itemId: 'itid',
menu: new Ext.menu.Menu()
}));
this.menu.on('checkchange', this.onCheckChange, this);
......@@ -217,7 +218,7 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
this.deferredUpdate.cancel();
var store = this.grid.store;
if(this.toolbar){
var start = this.toolbar.paramNames.start;
var start = this.grid.getStore().paramNames.start;
if(store.lastOptions && store.lastOptions.params && store.lastOptions.params[start])
store.lastOptions.params[start] = 0;
}
......@@ -351,4 +352,4 @@ Ext.extend(Ext.ux.grid.GridFilters, Ext.util.Observable, {
getFilterClass: function(type){
return Ext.ux.grid.filter[type.substr(0, 1).toUpperCase() + type.substr(1) + 'Filter'];
}
});
\ No newline at end of file
});
.x-grid3-hd-row .ux-filtered-column {
border-left: 1px solid #C7E3B4;
border-right: 1px solid #C7E3B4;
}
.x-grid3-hd-row .ux-filtered-column .x-grid3-hd-inner {
background-image: url(header_bg.gif);
}
.ux-filtered-column .x-grid3-hd-btn {
background-image: url(hd-btn.gif);
}
.ux-filtered-column.sort-asc .x-grid3-sort-icon {
background-image: url(sort_filtered_asc.gif);
}
.ux-filtered-column.sort-desc .x-grid3-sort-icon {
background-image: url(sort_filtered_desc.gif);
}
.ux-gridfilter-text-icon {
background-image: url(find.png);
}
/**
* RangeMenu.js Styles
**/
img.ux-gridfilter-text-icon, img.ux-rangemenu-gt, img.ux-rangemenu-lt, img.ux-rangemenu-eq {
top: 3px;
left: 5px;
position: relative;
margin-right:10px;
}
li.x-menu-list-item div {
display: inline;
}
li.x-menu-list-item-indent {
padding:0px;
}
.ux-rangemenu-gt {
background-image: url(greater_then.png);
}
.ux-rangemenu-lt {
background-image: url(less_then.png);
}
.ux-rangemenu-eq {
background-image: url(equals.png);
}
/**
* TreeMenu.js Styles
*/
.ux-tree-menu {
background-image: none;
}
.ux-tree-menu-wrap {
position: relative;
overflow: auto;
}
.ux-tree-menu-search-icon {
position: absolute;
top: 3px;
left: 3px;
width: 18px;
height: 18px;
background: url(find.png) top left no-repeat;
}
.ux-tree-menu-search {
padding-left: 19px;
}
......@@ -12,8 +12,8 @@ Ext.ux.menu.EditableItem = Ext.extend(Ext.menu.BaseItem, {
onRender: function(container){
var s = container.createChild({
cls: this.itemCls,
html: '<img src="' + (this.icon||Ext.BLANK_IMAGE_URL)+ '" class="x-menu-item-icon'+(this.iconCls?' '+this.iconCls:'')+'" style="margin: 3px 7px 2px 2px;" />'});
cls: this.itemCls});
// html: '<img src="' + (this.icon||Ext.BLANK_IMAGE_URL)+ '" class="x-menu-item-icon'+(this.iconCls?' '+this.iconCls:'')+'" style="margin: 3px 7px 2px 2px;" />'});
Ext.apply(this.config, {width: 125});
this.editor.render(s);
......@@ -50,4 +50,4 @@ Ext.ux.menu.EditableItem = Ext.extend(Ext.menu.BaseItem, {
isValid: function(preventMark){
return this.editor.isValid(preventMark);
}
});
\ No newline at end of file
});
......@@ -167,7 +167,7 @@ Ext.ux.GenericGridWindow = function(windowConfig,gridConfig,storeConfig,filtersC
store.on('loadexception', storeLoadException);
// Setup filters for the grid
var filters = new Ext.grid.GridFilters(filtersConfig);
var filters = new Ext.ux.grid.GridFilters(filtersConfig);
// Grid configuration
gridConfig = Ext.apply({
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment