Skip to content
Snippets Groups Projects
Commit 4fb8c24f authored by Renaud Le Gac's avatar Renaud Le Gac
Browse files

Introduce the gridFilter.

parent 98b81abf
No related branches found
No related tags found
No related merge requests found
--------------------------------- CHANGE LOG ----------------------------------
0.2.x (May 10)
- Migrate to web2py 1.78.3 and Extjs 3.2.1
0.2.1 (March10)
- consolidation version
- improve protocol between the store and the database
......@@ -8,7 +11,7 @@
0.2.0 (March 10)
- Major redesign of the application.
- Migrate to web2py 1.75.1 and ExtJs 3.1.1.
- Migrate to web2py 1.75.1, ExtJs 3.1.1 and python 2.6.
- New naming scheme for classes and plugins.
- Standardize design to be compliant with the ExtJs component model:
default properties, constructor, initComponent methods.
......
......@@ -60,15 +60,34 @@ def index():
# css files
csslibs = [os.path.join(base, 'static', 'extjs', 'resources', 'css', 'ext-all.css'),
os.path.join(base, 'static', 'extjs', 'examples', 'shared', 'icons', 'silk.css')]
os.path.join(base, 'static', 'extjs', 'examples', 'shared', 'icons', 'silk.css'),
os.path.join(base, 'static', 'extjs', 'examples', 'ux', 'gridfilters', 'css', 'GridFilters.css'),
os.path.join(base, 'static', 'extjs', 'examples', 'ux', 'gridfilters', 'css', 'RangeMenu.css'),
# os.path.join(base, 'static', 'extjs', 'examples', 'shared', 'examples.css'),
]
# ext javascript libraries
if debug:
jslibs = [os.path.join(base, 'static', 'extjs', 'adapter', 'ext', 'ext-base-debug.js'),
os.path.join(base, 'static', 'extjs', 'ext-all-debug.js')]
os.path.join(base, 'static', 'extjs', 'ext-all-debug.js'),
# os.path.join(base, 'static', 'extjs', 'examples', 'ux', 'ux-all-debug.js'),
]
else:
jslibs = [os.path.join(base, 'static', 'extjs', 'adapter', 'ext', 'ext-base.js'),
os.path.join(base, 'static', 'extjs', 'ext-all.js')]
os.path.join(base, 'static', 'extjs', 'ext-all.js'),
os.path.join(base, 'static', 'extjs', 'examples', 'ux', 'gridfilters', 'menu', 'RangeMenu.js'),
os.path.join(base, 'static', 'extjs', 'examples', 'ux', 'gridfilters', 'menu', 'ListMenu.js'),
os.path.join(base, 'static', 'extjs', 'examples', 'ux', 'gridfilters', 'GridFilters.js'),
os.path.join(base, 'static', 'extjs', 'examples', 'ux', 'gridfilters', 'filter', 'Filter.js'),
os.path.join(base, 'static', 'extjs', 'examples', 'ux', 'gridfilters', 'filter', 'BooleanFilter.js'),
os.path.join(base, 'static', 'extjs', 'examples', 'ux', 'gridfilters', 'filter', 'DateFilter.js'),
os.path.join(base, 'static', 'extjs', 'examples', 'ux', 'gridfilters', 'filter', 'ListFilter.js'),
os.path.join(base, 'static', 'extjs', 'examples', 'ux', 'gridfilters', 'filter', 'NumericFilter.js'),
os.path.join(base, 'static', 'extjs', 'examples', 'ux', 'gridfilters', 'filter', 'StringFilter.js'),
# os.path.join(base, 'static', 'extjs', 'examples', 'shared', 'examples.js'),
]
# application javascript libraries
applibs = []
......
......@@ -15,13 +15,39 @@ var main = function(provider, response){
var model = response.result.model;
console.log("Model");
console.dir(model);
// console.log("Model");
// console.dir(model);
// Create a filter
var myfilters = new Ext.ux.grid.GridFilters({
encode: true,
local: true,
filters: [{
type: 'numeric',
dataIndex: 'id'
}, {
type: 'string',
dataIndex: 'version',
disabled: false
},{
type: 'string',
dataIndex: 'note',
disabled: false
}, {
type: 'date',
dataIndex: 'date',
disabled: false
}],
});
// console.dir(filters);
// instantiate the grid
var grid = new App.grid.Grid({
model: model,
plugins: ['pGridRowEditorToolbar', 'pGridRowEditorContextMenu'],
loadMask: true,
plugins: [myfilters],
// plugins: ['pGridRowEditorToolbar', 'pGridRowEditorContextMenu'],
});
grid.render('appmain');
......@@ -36,7 +62,7 @@ Ext.onReady(function(){
Ext.Direct.addProvider(App.cfgSvcMethods);
// Request grid models from the server
// cfgSvc.getGridModel('distributions', main)
cfgSvc.getGridModel('rpms', main)
cfgSvc.getGridModel('distributions', main)
// cfgSvc.getGridModel('rpms', main)
});
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment