From: <cos...@us...> - 2010-09-29 17:18:34
|
Revision: 4774 http://jaffa.svn.sourceforge.net/jaffa/?rev=4774&view=rev Author: cosbor11 Date: 2010-09-29 17:18:28 +0000 (Wed, 29 Sep 2010) Log Message: ----------- Moved the applyIf of saveData and validateData to the gridPanel to after the instantiation of the grid so that if the grid's class definition has these methods they will not be overwritten. Modified Paths: -------------- trunk/JaffaRIA/source/html/js/extjs/jaffa/maintenance/GridDetailContainer.js Modified: trunk/JaffaRIA/source/html/js/extjs/jaffa/maintenance/GridDetailContainer.js =================================================================== --- trunk/JaffaRIA/source/html/js/extjs/jaffa/maintenance/GridDetailContainer.js 2010-09-28 23:46:38 UTC (rev 4773) +++ trunk/JaffaRIA/source/html/js/extjs/jaffa/maintenance/GridDetailContainer.js 2010-09-29 17:18:28 UTC (rev 4774) @@ -137,6 +137,14 @@ originalValidate(); } } + this.gridPanel.boxMinHeight=200; + //If gridPanel config supplied, initialize toolbar + if (!this.gridPanel.initComponent){ + this.gridPanel.bodyCfg=''; + if (!this.gridPanel.tbar && (this.removeButton||this.addButton)) this.gridPanel.tbar=[]; + this.gridPanel = Ext.ComponentMgr.create(this.gridPanel, Ext.Panel); + } + Ext.applyIf(this.gridPanel, { region: 'center', saveData: function(origData, saveData) { @@ -149,13 +157,6 @@ return Jaffa.maintenance.plugins.GridLoadSave.prototype.validateData.call(this); } }); - this.gridPanel.boxMinHeight=200; - //If gridPanel config supplied, initialize toolbar - if (!this.gridPanel.initComponent){ - this.gridPanel.bodyCfg=''; - if (!this.gridPanel.tbar && (this.removeButton||this.addButton)) this.gridPanel.tbar=[]; - this.gridPanel = Ext.ComponentMgr.create(this.gridPanel, Ext.Panel); - } //baseTitle is used to create title on detail panel, adding modifiers when necessary ('Add', 'Modify', '*') this.detailPanel.baseTitle = this.detailPanel.title; @@ -267,8 +268,7 @@ if (this.isDirty) { var oldRecordData={}; for(var property in this.record.data) - oldRecordData[property] = this.record.data[property]; - + oldRecordData[property] = this.record.data[property]; var oldRecord = new (this.gridPanel.getStore().recordType)(oldRecordData);; this.controller.updateRecordFromPanel(this.record, this); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |