diff --git a/static/plugin_dbui/dbui.min.js b/static/plugin_dbui/dbui.min.js
index a47e7624b35620b1d2dcf0a0aa44102b4b09ebf6..28c9a18c9d77fb667be879aa3856bb4f97608c6d 100644
--- a/static/plugin_dbui/dbui.min.js
+++ b/static/plugin_dbui/dbui.min.js
@@ -1 +1 @@
-Ext.namespace("App");App.encodeField=function(table,field){var t,f;t=table[0].toUpperCase()+table.slice(1,table.length);f=field[0].toUpperCase()+field.slice(1,field.length);return t+f};App.getDirectStore=function(storeId){var cfg,store,table;store=Ext.StoreMgr.lookup(storeId);if(!store&&!Ext.isString(storeId)){throw new Error('Fail to instanciate the store: "'+storeId+'"')}if(!store&&Ext.isString(storeId)){table=storeId.slice(0,storeId.search("Store"));cfg=App.storeCfgs[table];store=new App.data.DirectStore(cfg)}return store};App.getTableName=function(store){if("baseParams" in store&&"tableName" in store.baseParams){return store.baseParams.tableName}else{return undefined}return store.baseParams.tableName};App.isPlugin=function(component,ptype){var i,plugin;if(!("plugins" in component)){return false}for(i=0;i<component.plugins.length;i+=1){plugin=component.plugins[i];if(plugin===ptype){return true}if((typeof (plugin)!=="string")&&("ptype" in plugin)&&(plugin.ptype===ptype)){return true}}return false};App.loadMathJax=function(callback,scope){var path="/"+App.name+"/static/plugin_mathjax/MathJax.js";Ext.Loader.load([path],callback,scope)};Ext.namespace("App.form");App.form.ComboBox=Ext.extend(Ext.form.ComboBox,{mode:"remote",editable:false,selectOnFocus:true,triggerAction:"all",typeAhead:true,initComponent:function(){if(this.fieldLabel&&!this.emptyText){this.emptyText="Select a "+this.fieldLabel+" ..."}this.store=App.getDirectStore(this.store);App.form.ComboBox.superclass.initComponent.call(this);if(this.store.getCount()===0){this.store.load()}this.store.on("load",function(){this.setValue(this.initialConfig.value)},this)}});Ext.reg("xcombobox",App.form.ComboBox);Ext.namespace("App.form");App.form.FormPanel=Ext.extend(Ext.form.FormPanel,{store:null,autoScroll:true,bodyStyle:"padding:5px 5px 0",buttons:[{text:"Action",ref:"../buttonAction"},{text:"Reset",ref:"../buttonReset"}],defaults:{anchor:"100%"},defaultType:"textfield",frame:true,currentAction:null,currentRecord:null,textCreate:"Create",textDestroy:"Delete",textDuplicate:"Duplicate",textReset:"Reset",textUpdate:"Update",initComponent:function(){function resetForm(){this.reset()}App.form.FormPanel.superclass.initComponent.call(this);this.buttonAction.on("click",this.doAction,this);this.buttonReset.on("click",resetForm,this.getForm());this.addFieldToolTipsListeners();this.store=App.getDirectStore(this.store);this.store.on("exception",this.onStoreException,this);this.store.on("write",resetForm,this.getForm());this.setAction("create")},addFieldToolTipsListeners:function(){var form;function createToolTip(c){new Ext.ToolTip({target:c.getEl(),title:c.fieldLabel,anchor:"left",trackMouse:false,html:Ext.util.Format.htmlEncode(c.tipText)})}form=this.getForm();form.items.each(function(field){if(field.tipText){field.on("render",createToolTip)}})},doAction:function(){var form=this.getForm(),newRecord;if(!form.isValid()){return }if(!this.store){throw new Error("the store is undefined !!!")}switch(this.currentAction){case"create":newRecord=new this.store.recordType();this.updateRecord(newRecord);this.store.add(newRecord);break;case"destroy":this.store.remove(this.currentRecord);break;case"duplicate":newRecord=new this.store.recordType();this.updateRecord(newRecord);this.store.add(newRecord);break;case"update":this.currentRecord.beginEdit();this.updateRecord(this.currentRecord);this.currentRecord.endEdit();break}if(this.store.autoSave===false){this.store.save()}},hardReset:function(){var form=this.getForm();form.items.each(function(field){field.originalValue=field.initialConfig.value});form.reset()},onStoreException:function(proxy,type,action,options,response,arg){var field,fieldName,form=this.getForm(),record;for(fieldName in response.errors){if(response.errors.hasOwnProperty(fieldName)){field=form.findField(fieldName);field.markInvalid(response.errors[fieldName])}}record=arg[0];this.store.remove(record)},setAction:function(action,record){var form=this.getForm(),table,tableId;this.buttonReset.show();this.buttonAction.show();this.disableFields(false);this.currentAction=action;this.currentRecord=record;switch(action){case"create":this.hardReset();this.buttonAction.setText(this.textCreate);break;case"destroy":this.buttonAction.setText(this.textDestroy);form.loadRecord(record);break;case"duplicate":this.buttonAction.setText(this.textDuplicate);this.hardReset();table=App.getTableName(this.store);tableId=App.encodeField(table,"id");delete record.data[tableId];form.loadRecord(record);break;case"update":this.buttonAction.setText(this.textUpdate);form.loadRecord(record);break;case"view":this.buttonReset.hide();this.buttonAction.hide();form.loadRecord(record);this.disableFields(true);break}},disableFields:function(bool){var form=this.getForm();form.items.each(function(field){field.setDisabled(bool)})},updateRecord:function(record){var combo,combos,i,item,rec,values;values=this.getForm().getValues();for(item in values){if(values.hasOwnProperty(item)){record.set(item,values[item])}}combos=this.findByType("xcombobox");for(i=0;i<combos.length;i+=1){combo=combos[i];rec=combo.findRecord(combo.valueField,combo.getValue());record.set(combo.displayField,rec.get(combo.displayField))}}});Ext.reg("xform",App.form.FormPanel);Ext.namespace("App.grid");App.grid.Grid=Ext.extend(Ext.grid.GridPanel,{rowEditor:null,initComponent:function(){this.store=App.getDirectStore(this.store);this.bbar=new Ext.PagingToolbar();this.bbar.hide();App.grid.Grid.superclass.initComponent.call(this);if(!this.store.getTotalCount()){if(App.isPlugin(this,"pGridPaging")){this.store.load({params:{start:0,limit:10}})}else{this.store.load()}}}});Ext.reg("xgrid",App.grid.Grid);Ext.namespace("App.grid");App.grid.GridFilter=Ext.extend(Ext.form.FieldSet,{filterConditions:{},initialFilterConditions:[],pagingToolbar:null,store:null,defaults:{anchor:"100%",enableKeyEvents:true},initComponent:function(){var field,fields,i;App.grid.GridFilter.superclass.initComponent.call(this);fields=this.findByType("field");for(i=0;i<fields.length;i+=1){field=fields[i];if(field.xtype==="xcombobox"){field.on("select",this.onChange,this)}else{field.on("keyup",this.onChange,this,{buffer:500})}}},bind:function(grid){var baseParams,i;this.store=grid.getStore();if(grid.pagingInitialized){this.pagingToolbar=grid.getBottomToolbar()}baseParams=this.store.baseParams;for(i=0;i<baseParams.where.length;i+=1){this.initialFilterConditions.push(baseParams.where[i])}},onChange:function(field){this.setupCondition(field)},onReset:function(){var fields,i;fields=this.findByType("field");for(i=0;i<fields.length;i+=1){fields[i].reset()}this.filterConditions={};this.store.baseParams.where=this.initialFilterConditions;this.updateStore()},setupCondition:function(field){var conditions=[],i,k,value,where;value=field.getValue();where=field.name+" "+field.filterOperator+" '"+value+"'";if(value===""){delete this.filterConditions[field.name]}else{this.filterConditions[field.name]=where}for(i=0;i<this.initialFilterConditions.length;i+=1){conditions.push(this.initialFilterConditions[i])}for(k in this.filterConditions){if(this.filterConditions.hasOwnProperty(k)){conditions.push(this.filterConditions[k])}}this.store.baseParams.where=conditions;this.updateStore()},updateStore:function(){if(this.pagingToolbar){this.pagingToolbar.doRefresh()}else{this.store.load()}}});Ext.reg("xgridfilter",App.grid.GridFilter);Ext.namespace("App.grid");App.grid.MathJax=Ext.extend(Object,{init:function(grid){function processMath(){MathJax.Hub.PreProcess();MathJax.Hub.Process()}grid.getView().on("refresh",processMath,grid,{delay:100})}});Ext.preg("pGridMathJax",App.grid.MathJax);Ext.namespace("App.grid");App.grid.Paging=Ext.extend(Object,{ptype:"pGridPaging",init:function(grid){var bbar;bbar=grid.getBottomToolbar();bbar.bindStore(grid.store);bbar.add("-","Rows per page",{xtype:"slider",plugins:new Ext.slider.Tip(),listeners:{changecomplete:this.onChangePageSize,scope:bbar},minValue:1,width:100},"->",{xtype:"button",text:"Export to CSV",listeners:{click:this.onExport}});bbar.show();if(grid.store.getTotalCount()>0){this.onInit.call(grid,grid.store)}else{grid.store.on("load",this.onInit,grid,{single:true})}grid.store.on("write",this.onWrite,grid)},onChangePageSize:function(slider,newValue,thumb){var bbar=this;bbar.pageSize=newValue;bbar.moveFirst()},onExport:function(button,event){Ext.Msg.alert("Warning","Functionality not yet implemented")},onInit:function(store,records,options){var bbar,grid=this,nRows=store.getCount(),slider;if(grid.pagingInitialized){return }bbar=grid.getBottomToolbar();bbar.pageSize=nRows;slider=bbar.findByType("slider")[0];slider.setMaxValue(store.getTotalCount());slider.setValue(nRows)},onWrite:function(){var bbar,grid=this;bbar=grid.getBottomToolbar();slider=bbar.findByType("slider")[0];slider.setMaxValue(grid.store.getTotalCount());slider.setValue(grid.store.getCount())}});Ext.preg("pGridPaging",App.grid.Paging);Ext.namespace("App.grid");App.grid.RowEditor=Ext.extend(Ext.Window,{ptype:"pGridRowEditor",formPanel:null,grid:null,autoScroll:true,closeAction:"hide",constrainHeader:true,defaults:{autoScroll:true},modal:true,plain:true,init:function(grid){var table;this.grid=grid;this.grid.rowEditor=this;this.grid.selModel=new Ext.grid.RowSelectionModel({singleSelect:true});this.grid.store.on("write",this.onWrite,this);table=App.getTableName(this.grid.store);Dbui.getForm(table,this.addFormPanel,this)},addFormPanel:function(provider,response){var formCfg=response.result;this.formPanel=new App.form.FormPanel(formCfg);this.add(this.formPanel);this.grid.store.on("exception",this.formPanel.onStoreException,this.formPanel)},getSelected:function(){var record=this.grid.getSelectionModel().getSelected();if(!record){Ext.MessageBox.alert("Warning","Select a row please");return false}return record},onAddRow:function(){this.formPanel.setAction("create");this.setTitle("Create a new record...");this.show()},onDeleteRow:function(){var record=this.getSelected();if(!record){return }this.formPanel.setAction("destroy",record);this.setTitle("Delete the record...");this.formPanel.doAction()},onDuplicateRow:function(){var record=this.getSelected();if(!record){return }this.formPanel.setAction("duplicate",record);this.setTitle("Duplicate the record...");this.show()},onEditRow:function(){var record=this.getSelected();if(!record){return }this.formPanel.setAction("update",record);this.setTitle("Update the record...");this.show()},onViewRow:function(){var record=this.getSelected();if(!record){return }this.formPanel.setAction("view",record);this.setTitle("View the record...");this.show()},onWrite:function(store,action,result,transaction,record){this.hide()}});Ext.preg("pGridRowEditor",App.grid.RowEditor);Ext.namespace("App.grid");App.grid.RowEditorContextMenu=Ext.extend(Object,{ptype:"pGridRowEditorContextMenu",init:function(grid){var menu=new Ext.menu.Menu();if(!grid.rowEditor){throw new Error("no grid row editor !!!")}grid.addListener("containercontextmenu",this.onContainerContextMenu,menu);grid.addListener("headercontextmenu",this.onHeaderContextMenu,menu);grid.addListener("rowcontextmenu",this.onRowContextMenu,menu);menu.add({text:"Add",iconCls:"silk-add",handler:grid.rowEditor.onAddRow,scope:grid.rowEditor},"-",{text:"Delete",iconCls:"silk-delete",handler:grid.rowEditor.onDeleteRow,scope:grid.rowEditor},"-",{text:"Duplicate",iconCls:"silk-clone",handler:grid.rowEditor.onDuplicateRow,scope:grid.rowEditor},{text:"Update",iconCls:"silk-update",handler:grid.rowEditor.onEditRow,scope:grid.rowEditor},"-",{text:"View",iconCls:"silk-view",handler:grid.rowEditor.onViewRow,scope:grid.rowEditor})},onContainerContextMenu:function(grid,event){var menu=this;event.stopEvent();menu.showAt(event.getXY())},onHeaderContextMenu:function(grid,columIndex,event){event.stopEvent()},onRowContextMenu:function(grid,rowIndex,event){var menu=this;event.stopEvent();grid.selModel.selectRow(rowIndex);menu.showAt(event.getXY())}});Ext.preg("pGridRowEditorContextMenu",App.grid.RowEditorContextMenu);Ext.namespace("App.grid");App.grid.RowEditorToolbar=Ext.extend(Object,{ptype:"pGridRowEditorToolbar",init:function(grid){var toolbar;if(!grid.rowEditor){throw new Error("no grid row editor !!!")}toolbar=grid.getTopToolbar();toolbar.add([{text:"Add",iconCls:"silk-add",handler:grid.rowEditor.onAddRow,scope:grid.rowEditor}," ",{text:"Delete",iconCls:"silk-delete",handler:grid.rowEditor.onDeleteRow,scope:grid.rowEditor}," ",{text:"Duplicate",iconCls:"silk-clone",handler:grid.rowEditor.onDuplicateRow,scope:grid.rowEditor}," ",{text:"Update",iconCls:"silk-update",handler:grid.rowEditor.onEditRow,scope:grid.rowEditor}," ",{text:"View",iconCls:"silk-view",handler:grid.rowEditor.onViewRow,scope:grid.rowEditor},"-"])}});Ext.preg("pGridRowEditorToolbar",App.grid.RowEditorToolbar);Ext.namespace("App.data");App.data.DirectStore=Ext.extend(Ext.data.DirectStore,{autoLoad:true,autoSave:true,constructor:function(config){var cfg,cfgWrt;cfg=Ext.apply({},{encode:false,listful:true,writeAllFields:false},config);cfg=Ext.apply(cfg,{api:{create:Dbui.create,destroy:Dbui.destroy,read:Dbui.read,update:Dbui.update}});if(!Ext.isDefined(cfg.writer)){cfgWrt=Ext.copyTo({},cfg,"encode, listful, writeAllFields");cfg.writer=new Ext.data.JsonWriter(cfgWrt)}App.data.DirectStore.superclass.constructor.call(this,cfg);this.on("write",this.onWrite)},onWrite:function(store,action){switch(action){case"create":store.totalLength+=1;break;case"destroy":store.totalLength-=1;break}}});Ext.reg("xdirectstore",App.data.DirectStore);Ext.namespace("App");App.Mgr=Ext.extend(Object,{constructor:function(config){Ext.apply(this,config);App.Mgr.superclass.constructor.apply(this);if(App.withMathJax){App.loadMathJax(this.configure,this)}else{this.configure()}},configure:function(){Dbui.getViewport(this.launch,this)},launch:function(provider,response){var cfg,vpCfg,treeNode,viewport;treeNode=new Ext.tree.TreeNode({id:App.name,text:App.name});vpCfg={layout:"border",title:"Ext Layout Browser",items:[{region:"west",title:App.name,width:200,collapsible:true,autoScroll:true,split:true,xtype:"treepanel",rootVisible:false,root:treeNode,ref:"treePanel"},{region:"center",xtype:"tabpanel",ref:"tabPanel",autoScroll:true,defaults:{layout:"fit"}}]};cfg=response.result;vpCfg=Ext.apply(vpCfg,cfg);viewport=new Ext.Viewport(vpCfg);viewport.treePanel.on("contextmenu",function(n,e){e.stopEvent()})}});Ext.namespace("App.panel");App.panel.MathJax=Ext.extend(Object,{init:function(panel){panel.on("render",this.onPanelRender,this,{single:true})},onPanelRender:function(panel){var updater=panel.body.getUpdater();updater.on("update",this.onProcess)},onProcess:function(e,o){MathJax.Hub.PreProcess();MathJax.Hub.Process()}});Ext.preg("pPanelMathJax",App.panel.MathJax);Ext.namespace("App.form");App.form.SetBox=Ext.extend(Ext.form.ComboBox,{model:null,editable:false,emptyText:"Select...",selectOnFocus:true,triggerAction:"all",typeAhead:true,initComponent:function(){var i,li=[];if(!this.model){throw new Error("the property model is missing !!!")}li=[];for(i=0;i<this.model.setData.length;i+=1){li.push([this.model.setData[i]])}this.store=new Ext.data.ArrayStore({fields:[this.model.name],data:li});this.displayField=this.model.name;this.mode="local";App.form.SetBox.superclass.initComponent.call(this)}});Ext.reg("xsetbox",App.form.SetBox);Ext.namespace("App.viewport");App.viewport.InTreePanelBase=Ext.extend(Object,{topNodeName:null,nodesId:null,nodesText:null,tabTitlePrefix:"",viewport:null,constructor:function(config){Ext.apply(this,config);App.viewport.InTreePanelBase.superclass.constructor.apply(this)},init:function(viewport){var i,child,node,root;this.viewport=viewport;node=new Ext.tree.TreeNode({id:"/"+App.name+"/"+this.topNodeName,text:this.topNodeName});root=viewport.treePanel.getRootNode();root.appendChild(node);if(!this.nodesText){this.nodesText=this.nodesId}for(i=0;i<this.nodesId.length;i+=1){child=new Ext.tree.TreeNode({id:"/"+App.name+"/"+this.topNodeName+"/"+this.nodesId[i],text:this.nodesText[i],leaf:true});node.appendChild(child);child.on("click",this.onCreateTab,this)}viewport.tabPanel.on("beforeadd",this.addWdg,this)},addWdg:function(container,component,index){},getNodeNameFromId:function(id){var li=id.split("/").reverse();return li[0]},getTopNodeNameFromId:function(id){var li=id.split("/").reverse();return li[1]},onCreateTab:function(node){var nodeName,pan,tab,tabId;tabId=node.id;if(this.viewport.tabPanel.getItem(tabId)){this.viewport.tabPanel.setActiveTab(tabId);return }nodeName=this.getNodeNameFromId(tabId);pan=new Ext.Panel({id:tabId,closable:true,title:this.tabTitlePrefix+" "+nodeName});tab=this.viewport.tabPanel.add(pan);this.viewport.tabPanel.setActiveTab(tab.id)}});Ext.preg("pInTreeBase",App.viewport.InTreePanelBase);Ext.namespace("App.viewport");App.viewport.InTreePanelForm=Ext.extend(App.viewport.InTreePanelBase,{addWdg:function(container,component,index){var cfg,table,wdg;if(this.getTopNodeNameFromId(component.id)!==this.topNodeName){return }table=this.getNodeNameFromId(component.id);Dbui.getForm(table,function(provider,response){cfg=response.result;wdg=Ext.ComponentMgr.create(cfg);component.add(wdg);component.doLayout()},this)}});Ext.preg("pInTreeForm",App.viewport.InTreePanelForm);Ext.namespace("App.viewport");App.viewport.InTreePanelGrid=Ext.extend(App.viewport.InTreePanelBase,{addWdg:function(container,component,index){var cfg,grid,gridfilter,table,wdg;function createGrid(provider,response){cfg=response.result;wdg=Ext.ComponentMgr.create(cfg);if("filterModel" in cfg){grid=wdg;gridfilter=Ext.ComponentMgr.create(cfg.filterModel);gridfilter.bind(grid);wdg=new Ext.Panel({layout:"border",border:false,items:[{region:"center",layout:"fit",items:[grid]},{region:"east",layout:"form",collapsible:true,collapsed:true,defaults:{anchor:"100%"},frame:true,items:[gridfilter],width:300,split:true,buttons:[{text:"reset",ref:"../../resetButton"}]}]});wdg.resetButton.on("click",gridfilter.onReset,gridfilter)}component.add(wdg);component.doLayout()}if(this.getTopNodeNameFromId(component.id)!==this.topNodeName){return }table=this.getNodeNameFromId(component.id);Dbui.getGrid(table,createGrid,this)}});Ext.preg("pInTreeGrid",App.viewport.InTreePanelGrid);
\ No newline at end of file
+Ext.namespace("App");App.encodeField=function(table,field){var t,f;t=table[0].toUpperCase()+table.slice(1,table.length);f=field[0].toUpperCase()+field.slice(1,field.length);return t+f};App.getDirectStore=function(storeId){var cfg,store,table;store=Ext.StoreMgr.lookup(storeId);if(!store&&!Ext.isString(storeId)){throw new Error('Fail to instanciate the store: "'+storeId+'"')}if(!store&&Ext.isString(storeId)){table=storeId.slice(0,storeId.search("Store"));cfg=App.storeCfgs[table];store=new App.data.DirectStore(cfg)}return store};App.getTableName=function(store){return store.baseParams.tableName};App.isPlugin=function(component,ptype){var i,plugin;if(!component.hasOwnProperty("plugins")){return false}for(i=0;i<component.plugins.length;i+=1){plugin=component.plugins[i];if(plugin===ptype){return true}if((typeof (plugin)==="object")&&plugin.hasOwnProperty("ptype")&&(plugin.ptype===ptype)){return true}}return false};App.loadMathJax=function(callback,scope){var path="/"+App.name+"/static/plugin_mathjax/MathJax.js";Ext.Loader.load([path],callback,scope)};Ext.namespace("App.form");App.form.ComboBox=Ext.extend(Ext.form.ComboBox,{mode:"remote",editable:false,selectOnFocus:true,triggerAction:"all",typeAhead:true,initComponent:function(){if(this.fieldLabel&&!this.emptyText){this.emptyText="Select a "+this.fieldLabel+" ..."}this.store=App.getDirectStore(this.store);App.form.ComboBox.superclass.initComponent.call(this);if(this.store.getCount()===0){this.store.load()}this.store.on("load",function(){this.setValue(this.initialConfig.value)},this)}});Ext.reg("xcombobox",App.form.ComboBox);Ext.namespace("App.form");App.form.FormPanel=Ext.extend(Ext.form.FormPanel,{store:null,autoScroll:true,bodyStyle:"padding:5px 5px 0",buttons:[{text:"Action",ref:"../buttonAction"},{text:"Reset",ref:"../buttonReset"}],defaults:{anchor:"100%"},defaultType:"textfield",frame:true,currentAction:null,currentRecord:null,textCreate:"Create",textDestroy:"Delete",textDuplicate:"Duplicate",textReset:"Reset",textUpdate:"Update",initComponent:function(){function resetForm(){this.reset()}App.form.FormPanel.superclass.initComponent.call(this);this.buttonAction.on("click",this.doAction,this);this.buttonReset.on("click",resetForm,this.getForm());this.addFieldToolTipsListeners();this.store=App.getDirectStore(this.store);this.store.on("exception",this.onStoreException,this);this.store.on("write",resetForm,this.getForm());this.setAction("create")},addFieldToolTipsListeners:function(){var form;function createToolTip(c){new Ext.ToolTip({target:c.getEl(),title:c.fieldLabel,anchor:"left",trackMouse:false,html:Ext.util.Format.htmlEncode(c.tipText)})}form=this.getForm();form.items.each(function(field){if(field.tipText){field.on("render",createToolTip)}})},disableFields:function(bool){var form=this.getForm();form.items.each(function(field){field.setDisabled(bool)})},doAction:function(){var form=this.getForm(),newRecord;if(!form.isValid()){return }if(!this.store){throw new Error("the store is undefined !!!")}switch(this.currentAction){case"create":newRecord=new this.store.recordType();this.updateRecord(newRecord);this.store.add(newRecord);break;case"destroy":this.store.remove(this.currentRecord);break;case"duplicate":newRecord=new this.store.recordType();this.updateRecord(newRecord);this.store.add(newRecord);break;case"update":this.currentRecord.beginEdit();this.updateRecord(this.currentRecord);this.currentRecord.endEdit();break}if(this.store.autoSave===false){this.store.save()}},hardReset:function(){var form=this.getForm();form.items.each(function(field){field.originalValue=field.initialConfig.value});form.reset()},onStoreException:function(proxy,type,action,options,response,arg){var field,fieldName,form=this.getForm(),record;for(fieldName in response.errors){if(response.errors.hasOwnProperty(fieldName)){field=form.findField(fieldName);field.markInvalid(response.errors[fieldName])}}record=arg[0];this.store.remove(record)},setAction:function(action,record){var form=this.getForm(),table,tableId;this.buttonReset.show();this.buttonAction.show();this.disableFields(false);this.currentAction=action;this.currentRecord=record;switch(action){case"create":this.hardReset();this.buttonAction.setText(this.textCreate);break;case"destroy":this.buttonAction.setText(this.textDestroy);form.loadRecord(record);break;case"duplicate":this.buttonAction.setText(this.textDuplicate);this.hardReset();table=App.getTableName(this.store);tableId=App.encodeField(table,"id");delete record.data[tableId];form.loadRecord(record);break;case"update":this.buttonAction.setText(this.textUpdate);form.loadRecord(record);break;case"view":this.buttonReset.hide();this.buttonAction.hide();form.loadRecord(record);this.disableFields(true);break}},updateRecord:function(record){var combo,combos,i,item,rec,values;values=this.getForm().getValues();for(item in values){if(values.hasOwnProperty(item)){record.set(item,values[item])}}combos=this.findByType("xcombobox");for(i=0;i<combos.length;i+=1){combo=combos[i];rec=combo.findRecord(combo.valueField,combo.getValue());record.set(combo.displayField,rec.get(combo.displayField))}}});Ext.reg("xform",App.form.FormPanel);Ext.namespace("App.grid");App.grid.Grid=Ext.extend(Ext.grid.GridPanel,{rowEditor:null,initComponent:function(){this.store=App.getDirectStore(this.store);this.bbar=new Ext.PagingToolbar();this.bbar.hide();App.grid.Grid.superclass.initComponent.call(this);if(!this.store.getTotalCount()){if(App.isPlugin(this,"pGridPaging")){this.store.load({params:{start:0,limit:10}})}else{this.store.load()}}}});Ext.reg("xgrid",App.grid.Grid);Ext.namespace("App.grid");App.grid.GridFilter=Ext.extend(Ext.form.FieldSet,{filterConditions:{},initialFilterConditions:[],pagingToolbar:null,store:null,defaults:{anchor:"100%",enableKeyEvents:true},initComponent:function(){var field,fields,i;App.grid.GridFilter.superclass.initComponent.call(this);fields=this.findByType("field");for(i=0;i<fields.length;i+=1){field=fields[i];if(field.xtype==="xcombobox"){field.on("select",this.onChange,this)}else{field.on("keyup",this.onChange,this,{buffer:500})}}},bind:function(grid){var baseParams,i;this.store=grid.getStore();if(grid.pagingInitialized){this.pagingToolbar=grid.getBottomToolbar()}baseParams=this.store.baseParams;for(i=0;i<baseParams.where.length;i+=1){this.initialFilterConditions.push(baseParams.where[i])}},onChange:function(field){this.setupCondition(field)},onReset:function(){var fields,i;fields=this.findByType("field");for(i=0;i<fields.length;i+=1){fields[i].reset()}this.filterConditions={};this.store.baseParams.where=this.initialFilterConditions;this.updateStore()},setupCondition:function(field){var conditions=[],i,k,value,where;value=field.getValue();where=field.name+" "+field.filterOperator+" '"+value+"'";if(value===""){delete this.filterConditions[field.name]}else{this.filterConditions[field.name]=where}for(i=0;i<this.initialFilterConditions.length;i+=1){conditions.push(this.initialFilterConditions[i])}for(k in this.filterConditions){if(this.filterConditions.hasOwnProperty(k)){conditions.push(this.filterConditions[k])}}this.store.baseParams.where=conditions;this.updateStore()},updateStore:function(){if(this.pagingToolbar){this.pagingToolbar.doRefresh()}else{this.store.load()}}});Ext.reg("xgridfilter",App.grid.GridFilter);Ext.namespace("App.grid");App.grid.MathJax=Ext.extend(Object,{init:function(grid){function processMath(){MathJax.Hub.PreProcess();MathJax.Hub.Process()}grid.getView().on("refresh",processMath,grid,{delay:100})}});Ext.preg("pGridMathJax",App.grid.MathJax);Ext.namespace("App.grid");App.grid.Paging=Ext.extend(Object,{ptype:"pGridPaging",init:function(grid){var bbar;bbar=grid.getBottomToolbar();bbar.bindStore(grid.store);bbar.add("-","Rows per page",{xtype:"slider",plugins:new Ext.slider.Tip(),listeners:{changecomplete:this.onChangePageSize,scope:bbar},minValue:1,width:100},"->",{xtype:"button",text:"Export to CSV",listeners:{click:this.onExport}});bbar.show();if(grid.store.getTotalCount()>0){this.onInit.call(grid,grid.store)}else{grid.store.on("load",this.onInit,grid,{single:true})}grid.store.on("write",this.onWrite,grid)},onChangePageSize:function(slider,newValue,thumb){var bbar=this;bbar.pageSize=newValue;bbar.moveFirst()},onExport:function(button,event){Ext.Msg.alert("Warning","Functionality not yet implemented")},onInit:function(store,records,options){var bbar,grid=this,nRows=store.getCount(),slider;if(grid.pagingInitialized){return }bbar=grid.getBottomToolbar();bbar.pageSize=nRows;slider=bbar.findByType("slider")[0];slider.setMaxValue(store.getTotalCount());slider.setValue(nRows)},onWrite:function(){var bbar,grid=this,slider;bbar=grid.getBottomToolbar();slider=bbar.findByType("slider")[0];slider.setMaxValue(grid.store.getTotalCount());slider.setValue(grid.store.getCount())}});Ext.preg("pGridPaging",App.grid.Paging);Ext.namespace("App.grid");App.grid.RowEditor=Ext.extend(Ext.Window,{ptype:"pGridRowEditor",formPanel:null,grid:null,autoScroll:true,closeAction:"hide",constrainHeader:true,defaults:{autoScroll:true},modal:true,plain:true,init:function(grid){var table;this.grid=grid;this.grid.rowEditor=this;this.grid.selModel=new Ext.grid.RowSelectionModel({singleSelect:true});this.grid.store.on("write",this.onWrite,this);table=App.getTableName(this.grid.store);Dbui.getForm(table,this.addFormPanel,this)},addFormPanel:function(provider,response){var formCfg=response.result;this.formPanel=new App.form.FormPanel(formCfg);this.add(this.formPanel);this.grid.store.on("exception",this.formPanel.onStoreException,this.formPanel)},getSelected:function(){var record=this.grid.getSelectionModel().getSelected();if(!record){Ext.MessageBox.alert("Warning","Select a row please");return false}return record},onAddRow:function(){this.formPanel.setAction("create");this.setTitle("Create a new record...");this.show()},onDeleteRow:function(){var record=this.getSelected();if(!record){return }this.formPanel.setAction("destroy",record);this.setTitle("Delete the record...");this.formPanel.doAction()},onDuplicateRow:function(){var record=this.getSelected();if(!record){return }this.formPanel.setAction("duplicate",record);this.setTitle("Duplicate the record...");this.show()},onEditRow:function(){var record=this.getSelected();if(!record){return }this.formPanel.setAction("update",record);this.setTitle("Update the record...");this.show()},onViewRow:function(){var record=this.getSelected();if(!record){return }this.formPanel.setAction("view",record);this.setTitle("View the record...");this.show()},onWrite:function(store,action,result,transaction,record){this.hide()}});Ext.preg("pGridRowEditor",App.grid.RowEditor);Ext.namespace("App.grid");App.grid.RowEditorContextMenu=Ext.extend(Object,{ptype:"pGridRowEditorContextMenu",init:function(grid){var menu=new Ext.menu.Menu();if(!grid.rowEditor){throw new Error("no grid row editor !!!")}grid.addListener("containercontextmenu",this.onContainerContextMenu,menu);grid.addListener("headercontextmenu",this.onHeaderContextMenu,menu);grid.addListener("rowcontextmenu",this.onRowContextMenu,menu);menu.add({text:"Add",iconCls:"silk-add",handler:grid.rowEditor.onAddRow,scope:grid.rowEditor},"-",{text:"Delete",iconCls:"silk-delete",handler:grid.rowEditor.onDeleteRow,scope:grid.rowEditor},"-",{text:"Duplicate",iconCls:"silk-clone",handler:grid.rowEditor.onDuplicateRow,scope:grid.rowEditor},{text:"Update",iconCls:"silk-update",handler:grid.rowEditor.onEditRow,scope:grid.rowEditor},"-",{text:"View",iconCls:"silk-view",handler:grid.rowEditor.onViewRow,scope:grid.rowEditor})},onContainerContextMenu:function(grid,event){var menu=this;event.stopEvent();menu.showAt(event.getXY())},onHeaderContextMenu:function(grid,columIndex,event){event.stopEvent()},onRowContextMenu:function(grid,rowIndex,event){var menu=this;event.stopEvent();grid.selModel.selectRow(rowIndex);menu.showAt(event.getXY())}});Ext.preg("pGridRowEditorContextMenu",App.grid.RowEditorContextMenu);Ext.namespace("App.grid");App.grid.RowEditorToolbar=Ext.extend(Object,{ptype:"pGridRowEditorToolbar",init:function(grid){var toolbar;if(!grid.rowEditor){throw new Error("no grid row editor !!!")}toolbar=grid.getTopToolbar();toolbar.add([{text:"Add",iconCls:"silk-add",handler:grid.rowEditor.onAddRow,scope:grid.rowEditor}," ",{text:"Delete",iconCls:"silk-delete",handler:grid.rowEditor.onDeleteRow,scope:grid.rowEditor}," ",{text:"Duplicate",iconCls:"silk-clone",handler:grid.rowEditor.onDuplicateRow,scope:grid.rowEditor}," ",{text:"Update",iconCls:"silk-update",handler:grid.rowEditor.onEditRow,scope:grid.rowEditor}," ",{text:"View",iconCls:"silk-view",handler:grid.rowEditor.onViewRow,scope:grid.rowEditor},"-"])}});Ext.preg("pGridRowEditorToolbar",App.grid.RowEditorToolbar);Ext.namespace("App.data");App.data.DirectStore=Ext.extend(Ext.data.DirectStore,{autoLoad:true,autoSave:true,constructor:function(config){var cfg,cfgWrt;cfg=Ext.apply({},{encode:false,listful:true,writeAllFields:false},config);cfg=Ext.apply(cfg,{api:{create:Dbui.create,destroy:Dbui.destroy,read:Dbui.read,update:Dbui.update}});if(!Ext.isDefined(cfg.writer)){cfgWrt=Ext.copyTo({},cfg,"encode, listful, writeAllFields");cfg.writer=new Ext.data.JsonWriter(cfgWrt)}App.data.DirectStore.superclass.constructor.call(this,cfg);this.on("write",this.onWrite)},onWrite:function(store,action){switch(action){case"create":store.totalLength+=1;break;case"destroy":store.totalLength-=1;break}}});Ext.reg("xdirectstore",App.data.DirectStore);Ext.namespace("App");App.Mgr=Ext.extend(Object,{constructor:function(config){Ext.apply(this,config);App.Mgr.superclass.constructor.apply(this);if(App.withMathJax){App.loadMathJax(this.configure,this)}else{this.configure()}},configure:function(){Dbui.getViewport(this.launch,this)},launch:function(provider,response){var cfg,vpCfg,treeNode,viewport;treeNode=new Ext.tree.TreeNode({id:App.name,text:App.name});vpCfg={layout:"border",title:"Ext Layout Browser",items:[{region:"west",title:App.name,width:200,collapsible:true,autoScroll:true,split:true,xtype:"treepanel",rootVisible:false,root:treeNode,ref:"treePanel"},{region:"center",xtype:"tabpanel",ref:"tabPanel",autoScroll:true,defaults:{layout:"fit"}}]};cfg=response.result;vpCfg=Ext.apply(vpCfg,cfg);viewport=new Ext.Viewport(vpCfg);viewport.treePanel.on("contextmenu",function(n,e){e.stopEvent()})}});Ext.namespace("App.panel");App.panel.MathJax=Ext.extend(Object,{init:function(panel){panel.on("render",this.onPanelRender,this,{single:true})},onPanelRender:function(panel){var updater=panel.body.getUpdater();updater.on("update",this.onProcess)},onProcess:function(e,o){MathJax.Hub.PreProcess();MathJax.Hub.Process()}});Ext.preg("pPanelMathJax",App.panel.MathJax);Ext.namespace("App.form");App.form.SetBox=Ext.extend(Ext.form.ComboBox,{model:null,editable:false,emptyText:"Select...",selectOnFocus:true,triggerAction:"all",typeAhead:true,initComponent:function(){var i,li=[];if(!this.model){throw new Error("the property model is missing !!!")}li=[];for(i=0;i<this.model.setData.length;i+=1){li.push([this.model.setData[i]])}this.store=new Ext.data.ArrayStore({fields:[this.model.name],data:li});this.displayField=this.model.name;this.mode="local";App.form.SetBox.superclass.initComponent.call(this)}});Ext.reg("xsetbox",App.form.SetBox);Ext.namespace("App.viewport");App.viewport.InTreePanelBase=Ext.extend(Object,{topNodeName:null,nodesId:null,nodesText:null,tabTitlePrefix:"",viewport:null,constructor:function(config){Ext.apply(this,config);App.viewport.InTreePanelBase.superclass.constructor.apply(this)},init:function(viewport){var i,child,node,root;this.viewport=viewport;node=new Ext.tree.TreeNode({id:"/"+App.name+"/"+this.topNodeName,text:this.topNodeName});root=viewport.treePanel.getRootNode();root.appendChild(node);if(!this.nodesText){this.nodesText=this.nodesId}for(i=0;i<this.nodesId.length;i+=1){child=new Ext.tree.TreeNode({id:"/"+App.name+"/"+this.topNodeName+"/"+this.nodesId[i],text:this.nodesText[i],leaf:true});node.appendChild(child);child.on("click",this.onCreateTab,this)}viewport.tabPanel.on("beforeadd",this.addWdg,this)},addWdg:function(container,component,index){},getNodeNameFromId:function(id){var li=id.split("/").reverse();return li[0]},getTopNodeNameFromId:function(id){var li=id.split("/").reverse();return li[1]},onCreateTab:function(node){var nodeName,pan,tab,tabId;tabId=node.id;if(this.viewport.tabPanel.getItem(tabId)){this.viewport.tabPanel.setActiveTab(tabId);return }nodeName=this.getNodeNameFromId(tabId);pan=new Ext.Panel({id:tabId,closable:true,title:this.tabTitlePrefix+" "+nodeName});tab=this.viewport.tabPanel.add(pan);this.viewport.tabPanel.setActiveTab(tab.id)}});Ext.preg("pInTreeBase",App.viewport.InTreePanelBase);Ext.namespace("App.viewport");App.viewport.InTreePanelForm=Ext.extend(App.viewport.InTreePanelBase,{addWdg:function(container,component,index){var cfg,table,wdg;if(this.getTopNodeNameFromId(component.id)!==this.topNodeName){return }table=this.getNodeNameFromId(component.id);Dbui.getForm(table,function(provider,response){cfg=response.result;wdg=Ext.ComponentMgr.create(cfg);component.add(wdg);component.doLayout()},this)}});Ext.preg("pInTreeForm",App.viewport.InTreePanelForm);Ext.namespace("App.viewport");App.viewport.InTreePanelGrid=Ext.extend(App.viewport.InTreePanelBase,{addWdg:function(container,component,index){var cfg,grid,gridfilter,table,wdg;function createGrid(provider,response){cfg=response.result;wdg=Ext.ComponentMgr.create(cfg);if(cfg.hasOwnProperty("filterModel")){grid=wdg;gridfilter=Ext.ComponentMgr.create(cfg.filterModel);gridfilter.bind(grid);wdg=new Ext.Panel({layout:"border",border:false,items:[{region:"center",layout:"fit",items:[grid]},{region:"east",layout:"form",collapsible:true,collapsed:true,defaults:{anchor:"100%"},frame:true,items:[gridfilter],width:300,split:true,buttons:[{text:"reset",ref:"../../resetButton"}]}]});wdg.resetButton.on("click",gridfilter.onReset,gridfilter)}component.add(wdg);component.doLayout()}if(this.getTopNodeNameFromId(component.id)!==this.topNodeName){return }table=this.getNodeNameFromId(component.id);Dbui.getGrid(table,createGrid,this)}});Ext.preg("pInTreeGrid",App.viewport.InTreePanelGrid);
\ No newline at end of file
diff --git a/static/plugin_dbui/src/appbase.js b/static/plugin_dbui/src/appbase.js
index 967602fd5a47473a100ab70b010b647483ec0477..5de09f6924f706a57649ffb3900890023ab4635f 100644
--- a/static/plugin_dbui/src/appbase.js
+++ b/static/plugin_dbui/src/appbase.js
@@ -36,7 +36,7 @@ App.encodeField = function (table, field) {
     t = table[0].toUpperCase() + table.slice(1, table.length);
     f = field[0].toUpperCase() + field.slice(1, field.length);
     return t + f;
-}
+};
 
 /**
  * Helper function returning the App.data.DirectStore identifies by its id.
@@ -61,7 +61,7 @@ App.getDirectStore = function (storeId) {
     store = Ext.StoreMgr.lookup(storeId);
     
     if (!store && !Ext.isString(storeId)) {
-        throw new Error('Fail to instanciate the store: "'+storeId+'"');
+        throw new Error('Fail to instanciate the store: "' + storeId + '"');
     }    
 
     if (!store && Ext.isString(storeId)) {
@@ -72,7 +72,7 @@ App.getDirectStore = function (storeId) {
     }
 
     return store;
-}
+};
 
 /**
  * Helper function returning the name of the database table 
@@ -81,13 +81,9 @@ App.getDirectStore = function (storeId) {
  * @param {App.data.DirectStore} store
  */
 App.getTableName = function (store) {
-    if ('baseParams' in store && 'tableName' in store.baseParams) {
-        return store.baseParams.tableName;
-    } else {
-        return undefined;
-    }
-    return store.baseParams.tableName;
-}
+    return store.baseParams.tableName;    
+};
+
 /**
  * Helper function to determine if a plugin is present 
  * in the plugins list of a component
@@ -99,7 +95,7 @@ App.isPlugin = function (component, ptype) {
     var i, 
         plugin;
 
-    if (!('plugins' in component)) {
+    if (!component.hasOwnProperty('plugins')) {
         return false;
     }
 
@@ -111,8 +107,8 @@ App.isPlugin = function (component, ptype) {
             return true;
         }
             
-        if ((typeof(plugin) !== 'string') && ('ptype' in plugin) && (plugin.ptype === ptype)) {
-                return true;
+        if ((typeof (plugin) === 'object') && plugin.hasOwnProperty('ptype') && (plugin.ptype === ptype)) {
+            return true;
         }   
     }
     return false;
diff --git a/static/plugin_dbui/src/appform.js b/static/plugin_dbui/src/appform.js
index 9c55713f9483729881940beb9593691e134f54d0..0f2c213f6761f69488ed4c65bae8e04e6db53bd4 100644
--- a/static/plugin_dbui/src/appform.js
+++ b/static/plugin_dbui/src/appform.js
@@ -93,7 +93,7 @@ App.form.FormPanel = Ext.extend(Ext.form.FormPanel, {
     addFieldToolTipsListeners: function () {
         var form;
 
-        function createToolTip (c) {
+        function createToolTip(c) {
             //NOTE: don't remove the new keyword although JSlint require it
             new Ext.ToolTip({
                 target: c.getEl(),
@@ -147,27 +147,27 @@ App.form.FormPanel = Ext.extend(Ext.form.FormPanel, {
         
         switch (this.currentAction) {
 
-            case 'create':
-                newRecord = new this.store.recordType();
-                this.updateRecord(newRecord);
-                this.store.add(newRecord);
-                break;  
-                
-            case 'destroy':
-                this.store.remove(this.currentRecord);
-                break;
-                
-            case 'duplicate':
-                newRecord = new this.store.recordType();
-                this.updateRecord(newRecord);
-                this.store.add(newRecord);
-                break;
-                
-            case 'update':
-                this.currentRecord.beginEdit();
-                this.updateRecord(this.currentRecord);
-                this.currentRecord.endEdit();
-                break;
+        case 'create':
+            newRecord = new this.store.recordType();
+            this.updateRecord(newRecord);
+            this.store.add(newRecord);
+            break;  
+            
+        case 'destroy':
+            this.store.remove(this.currentRecord);
+            break;
+            
+        case 'duplicate':
+            newRecord = new this.store.recordType();
+            this.updateRecord(newRecord);
+            this.store.add(newRecord);
+            break;
+            
+        case 'update':
+            this.currentRecord.beginEdit();
+            this.updateRecord(this.currentRecord);
+            this.currentRecord.endEdit();
+            break;
         }
         if (this.store.autoSave === false) {
             this.store.save();    
@@ -245,36 +245,36 @@ App.form.FormPanel = Ext.extend(Ext.form.FormPanel, {
         
         switch (action) {
 
-            case 'create':
-                this.hardReset();
-                this.buttonAction.setText(this.textCreate);
-                break;  
-                
-            case 'destroy':
-                this.buttonAction.setText(this.textDestroy);
-                form.loadRecord(record);
-                break;
-                
-            case 'duplicate':
-                this.buttonAction.setText(this.textDuplicate);
-                this.hardReset();
-                table = App.getTableName(this.store);
-                tableId = App.encodeField(table, 'id');
-                delete record.data[tableId];
-                form.loadRecord(record);
-                break;
-                
-            case 'update':
-                this.buttonAction.setText(this.textUpdate);
-                form.loadRecord(record);
-                break;
-                
-            case 'view':
-                this.buttonReset.hide();
-                this.buttonAction.hide();
-                form.loadRecord(record);
-                this.disableFields(true);
-                break;
+        case 'create':
+            this.hardReset();
+            this.buttonAction.setText(this.textCreate);
+            break;  
+            
+        case 'destroy':
+            this.buttonAction.setText(this.textDestroy);
+            form.loadRecord(record);
+            break;
+            
+        case 'duplicate':
+            this.buttonAction.setText(this.textDuplicate);
+            this.hardReset();
+            table = App.getTableName(this.store);
+            tableId = App.encodeField(table, 'id');
+            delete record.data[tableId];
+            form.loadRecord(record);
+            break;
+            
+        case 'update':
+            this.buttonAction.setText(this.textUpdate);
+            form.loadRecord(record);
+            break;
+            
+        case 'view':
+            this.buttonReset.hide();
+            this.buttonAction.hide();
+            form.loadRecord(record);
+            this.disableFields(true);
+            break;
         }
     },
     
diff --git a/static/plugin_dbui/src/appgridfilter.js b/static/plugin_dbui/src/appgridfilter.js
index 8fa325278b47b6b631a4298b7429bca222a5da19..d64129c7e4bf3105ff514a6f0ae792902a6767e5 100644
--- a/static/plugin_dbui/src/appgridfilter.js
+++ b/static/plugin_dbui/src/appgridfilter.js
@@ -52,7 +52,9 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, {
      */
     initComponent: function () {
 
-        var field, fields, i;
+        var field, 
+            fields, 
+            i;
         
         // initialize the underlying class.
         App.grid.GridFilter.superclass.initComponent.call(this);
@@ -80,7 +82,8 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, {
      */
     bind: function (grid) {
 
-        var baseParams, i;
+        var baseParams, 
+            i;
         
         this.store = grid.getStore();
         
@@ -109,7 +112,8 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, {
      */
     onReset: function () {
         
-        var fields, i;
+        var fields, 
+            i;
         
         // reset the field value
         fields = this.findByType('field');
@@ -131,7 +135,11 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, {
      */
     setupCondition: function (field) {
 
-        var conditions = [], i, k, value, where;
+        var conditions = [], 
+            i, 
+            k, 
+            value, 
+            where;
         
         // get the field value and update the condition dictionary
         value = field.getValue();
diff --git a/static/plugin_dbui/src/appgridpaging.js b/static/plugin_dbui/src/appgridpaging.js
index d4646c73cfc3f7469a2dddc90c51004775b76bc9..2ddfaa49035ec0eaf1066d5e19b2a9e6a3fcc91a 100644
--- a/static/plugin_dbui/src/appgridpaging.js
+++ b/static/plugin_dbui/src/appgridpaging.js
@@ -116,10 +116,11 @@ App.grid.Paging = Ext.extend(Object, {
      * The latter create or destroy records in the store.
      * The scope is the bottom grid
      */
-    onWrite: function() {
+    onWrite: function () {
         
         var bbar,
-            grid = this;
+            grid = this,
+            slider;
 
         bbar = grid.getBottomToolbar();
 
diff --git a/static/plugin_dbui/src/appjsonstore.js b/static/plugin_dbui/src/appjsonstore.js
index 7f3d8bf8eba4d6d0d95d8edd8321084246d5f3ed..bad57b5708b2ee24a3f9fe3405a9ac8dba4beec3 100644
--- a/static/plugin_dbui/src/appjsonstore.js
+++ b/static/plugin_dbui/src/appjsonstore.js
@@ -90,13 +90,13 @@ App.data.DirectStore = Ext.extend(Ext.data.DirectStore, {
     onWrite: function (store, action) {
         
         switch (action) {
-            case 'create':
-                store.totalLength += 1;
-                break;
-        
-            case 'destroy':
-                store.totalLength -= 1;
-                break;
+        case 'create':
+            store.totalLength += 1;
+            break;
+    
+        case 'destroy':
+            store.totalLength -= 1;
+            break;
         }
     }
 });
diff --git a/static/plugin_dbui/src/appmgr.js b/static/plugin_dbui/src/appmgr.js
index 403f885bf03f6dc0455df4ab2ea3fd7ac2f43986..60215847c34a6d474ed23dbc832f39ab1e425d83 100644
--- a/static/plugin_dbui/src/appmgr.js
+++ b/static/plugin_dbui/src/appmgr.js
@@ -54,7 +54,10 @@ App.Mgr = Ext.extend(Object, {
      */
     launch: function (provider, response) {
         
-        var cfg, vpCfg, treeNode, viewport;
+        var cfg, 
+            vpCfg, 
+            treeNode, 
+            viewport;
 
         // The treePanel contains a root node.        
         // The name of the root node of the tree is App.name
diff --git a/static/plugin_dbui/src/appsetbox.js b/static/plugin_dbui/src/appsetbox.js
index 33504ce372014987c88cb0b84e4a33993d821243..373118fc14d9770809c0dfce8cb47f0f17236fb6 100644
--- a/static/plugin_dbui/src/appsetbox.js
+++ b/static/plugin_dbui/src/appsetbox.js
@@ -37,7 +37,8 @@ App.form.SetBox = Ext.extend(Ext.form.ComboBox, {
      */	
     initComponent: function () {
 
-        var i, li = [];
+        var i, 
+            li = [];
         
         if (!this.model) {
             throw new Error("the property model is missing !!!");
diff --git a/static/plugin_dbui/src/appviewportintreeform.js b/static/plugin_dbui/src/appviewportintreeform.js
index 42f516a45df2dab1f55f47a12364fa1b4d3fd4b6..aba0d473c64afa7eb60d7c7d2d353dd6fc7b125d 100644
--- a/static/plugin_dbui/src/appviewportintreeform.js
+++ b/static/plugin_dbui/src/appviewportintreeform.js
@@ -38,7 +38,9 @@ App.viewport.InTreePanelForm = Ext.extend(App.viewport.InTreePanelBase, {
      */
     addWdg: function (container, component, index) {
 
-        var cfg, table, wdg;
+        var cfg, 
+            table, 
+            wdg;
         
         // protection -- add widget when we are concern !				
         if (this.getTopNodeNameFromId(component.id) !== this.topNodeName) {
diff --git a/static/plugin_dbui/src/appviewportintreegrid.js b/static/plugin_dbui/src/appviewportintreegrid.js
index efa50996ba4f34bd35225b94ffea079b3017b4f0..a0e56b8798f0cc9519b085cffd84e52301b0ab79 100644
--- a/static/plugin_dbui/src/appviewportintreegrid.js
+++ b/static/plugin_dbui/src/appviewportintreegrid.js
@@ -48,7 +48,7 @@ App.viewport.InTreePanelGrid = Ext.extend(App.viewport.InTreePanelBase, {
             cfg = response.result;
             wdg = Ext.ComponentMgr.create(cfg);
             
-            if ('filterModel' in cfg) {
+            if (cfg.hasOwnProperty('filterModel')) {
                 // instantiate the grid and the filter
                 grid = wdg;
                 gridfilter = Ext.ComponentMgr.create(cfg.filterModel);