From: <Se...@us...> - 2010-05-26 00:23:02
|
Revision: 4484 http://jaffa.svn.sourceforge.net/jaffa/?rev=4484&view=rev Author: SeanZ Date: 2010-05-26 00:22:56 +0000 (Wed, 26 May 2010) Log Message: ----------- added minValue and maxValue to the meta validation of field. Modified Paths: -------------- trunk/JaffaRIA/source/html/js/extjs/jaffa/component/Component.js Modified: trunk/JaffaRIA/source/html/js/extjs/jaffa/component/Component.js =================================================================== --- trunk/JaffaRIA/source/html/js/extjs/jaffa/component/Component.js 2010-05-25 18:27:18 UTC (rev 4483) +++ trunk/JaffaRIA/source/html/js/extjs/jaffa/component/Component.js 2010-05-26 00:22:56 UTC (rev 4484) @@ -667,7 +667,7 @@ */ ,applyPanelFieldsMetaRules : function(panel, data, includeList) { console.debug("Loading Panel id=",panel.id," from data=",data); - if (!includeList || includeList == '') includeList = ['LABEL', 'CASE', 'MINLENGTH', 'MAXLENGTH', 'READONLY', 'HIDDEN', 'MANDATORY']; + if (!includeList || includeList == '') includeList = ['LABEL', 'CASE', 'MINLENGTH', 'MAXLENGTH', 'READONLY', 'HIDDEN', 'MANDATORY', 'MINVALUE', 'MAXVALUE']; if (data == null) data = new Object(); @@ -913,6 +913,13 @@ field.width = Math.min(Math.max(field.maxLength, 5), 40) * 9; } } + + if (includeList.indexOf('MINVALUE') >= 0 && Ext.isNumber(meta.minValue)) { + field.minValue = meta.minValue; + } + if (includeList.indexOf('MAXVALUE') >= 0 && Ext.isNumber(meta.maxValue)) { + field.maxValue = meta.maxValue; + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |