From d34732becb6e498e2ae001759f5dc4dee7cf92e8 Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 7 Oct 2022 10:43:20 +0800 Subject: [PATCH] fix vtype docs --- Roo/form/VTypes.js | 22 +++++++++++----------- roojs-all.js | 6 +++--- roojs-bootstrap-debug.js | 22 +++++++++++----------- roojs-bootstrap.js | 6 +++--- roojs-debug.js | 22 +++++++++++----------- roojs-ui-debug.js | 22 +++++++++++----------- roojs-ui.js | 6 +++--- 7 files changed, 53 insertions(+), 53 deletions(-) diff --git a/Roo/form/VTypes.js b/Roo/form/VTypes.js index 78b338a7e4..df3bf9215e 100644 --- a/Roo/form/VTypes.js +++ b/Roo/form/VTypes.js @@ -26,67 +26,67 @@ Roo.form.VTypes = function(){ * The function used to validate email addresses * @param {String} value The email address */ - 'email' : function(v){ + email : function(v){ return email.test(v); }, /** * The error text to display when the email validation function returns false * @type String */ - 'emailText' : 'This field should be an e-mail address in the format "user@domain.com"', + emailText : 'This field should be an e-mail address in the format "user@domain.com"', /** * The keystroke filter mask to be applied on email input * @type RegExp */ - 'emailMask' : /[a-z0-9_\.\-@]/i, + emailMask : /[a-z0-9_\.\-@]/i, /** * The function used to validate URLs * @param {String} value The URL */ - 'url' : function(v){ + url : function(v){ return url.test(v); }, /** * The error text to display when the url validation function returns false * @type String */ - 'urlText' : 'This field should be a URL in the format "http:/'+'/www.domain.com"', + urlText : 'This field should be a URL in the format "http:/'+'/www.domain.com"', /** * The function used to validate alpha values * @param {String} value The value */ - 'alpha' : function(v){ + alpha : function(v){ return alpha.test(v); }, /** * The error text to display when the alpha validation function returns false * @type String */ - 'alphaText' : 'This field should only contain letters and _', + alphaText : 'This field should only contain letters and _', /** * The keystroke filter mask to be applied on alpha input * @type RegExp */ - 'alphaMask' : /[a-z_]/i, + alphaMask : /[a-z_]/i, /** * The function used to validate alphanumeric values * @param {String} value The value */ - 'alphanum' : function(v){ + alphanum : function(v){ return alphanum.test(v); }, /** * The error text to display when the alphanumeric validation function returns false * @type String */ - 'alphanumText' : 'This field should only contain letters, numbers and _', + alphanumText : 'This field should only contain letters, numbers and _', /** * The keystroke filter mask to be applied on alphanumeric input * @type RegExp */ - 'alphanumMask' : /[a-z0-9_]/i + alphanumMask : /[a-z0-9_]/i }; }(); \ No newline at end of file diff --git a/roojs-all.js b/roojs-all.js index cac12bf133..4655b89aaa 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -2313,9 +2313,9 @@ if(this.width){this.el.setWidth(this.width);}if(this.height){this.el.setHeight(t Roo.form.FieldSet=function(A){Roo.form.FieldSet.superclass.constructor.call(this,A);};Roo.extend(Roo.form.FieldSet,Roo.form.Layout,{defaultAutoCreate:{tag:'fieldset',cn:{tag:'legend'}},onRender:function(ct,A){Roo.form.FieldSet.superclass.onRender.call(this,ct,A); if(this.legend){this.setLegend(this.legend);}},setLegend:function(A){if(this.rendered){this.el.child('legend').update(A);}}}); // Roo/form/VTypes.js -Roo.form.VTypes=function(){var A=/^[a-zA-Z_]+$/;var B=/^[a-zA-Z0-9_]+$/;var C=/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;var D=/(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return {'email':function(v){return C.test(v); -},'emailText':'This field should be an e-mail address in the format "user@domain.com"','emailMask':/[a-z0-9_\.\-@]/i,'url':function(v){return D.test(v);},'urlText':'This field should be a URL in the format "http:/'+'/www.domain.com"','alpha':function(v){return A.test(v); -},'alphaText':'This field should only contain letters and _','alphaMask':/[a-z_]/i,'alphanum':function(v){return B.test(v);},'alphanumText':'This field should only contain letters, numbers and _','alphanumMask':/[a-z0-9_]/i};}(); +Roo.form.VTypes=function(){var A=/^[a-zA-Z_]+$/;var B=/^[a-zA-Z0-9_]+$/;var C=/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;var D=/(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return {email:function(v){return C.test(v); +},emailText:'This field should be an e-mail address in the format "user@domain.com"',emailMask:/[a-z0-9_\.\-@]/i,url:function(v){return D.test(v);},urlText:'This field should be a URL in the format "http:/'+'/www.domain.com"',alpha:function(v){return A.test(v); +},alphaText:'This field should only contain letters and _',alphaMask:/[a-z_]/i,alphanum:function(v){return B.test(v);},alphanumText:'This field should only contain letters, numbers and _',alphanumMask:/[a-z0-9_]/i};}(); // Roo/form/FCKeditor.js Roo.form.FCKeditor=function(A){Roo.form.FCKeditor.superclass.constructor.call(this,A);this.addEvents({editorinit:true});};Roo.form.FCKeditor.editors={};Roo.extend(Roo.form.FCKeditor,Roo.form.TextArea,{fckconfig:false,toolbarSet:'Basic',basePath:'/fckeditor/',frame:false,value:'',onRender:function(ct,A){if(!this.el){this.defaultAutoCreate={tag:"textarea",style:"width:300px;height:60px;",autocomplete:"new-password"} ;}Roo.form.FCKeditor.superclass.onRender.call(this,ct,A);Roo.form.FCKeditor.editors[this.getId()]=this;this.replaceTextarea();},getEditor:function(){return this.fckEditor;},setValue:function(A){if(typeof(A)=='undefined'){return;}Roo.form.FCKeditor.superclass.setValue.apply(this,[A]); diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 79f932e226..9653688dee 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -12161,68 +12161,68 @@ Roo.form.VTypes = function(){ * The function used to validate email addresses * @param {String} value The email address */ - 'email' : function(v){ + email : function(v){ return email.test(v); }, /** * The error text to display when the email validation function returns false * @type String */ - 'emailText' : 'This field should be an e-mail address in the format "user@domain.com"', + emailText : 'This field should be an e-mail address in the format "user@domain.com"', /** * The keystroke filter mask to be applied on email input * @type RegExp */ - 'emailMask' : /[a-z0-9_\.\-@]/i, + emailMask : /[a-z0-9_\.\-@]/i, /** * The function used to validate URLs * @param {String} value The URL */ - 'url' : function(v){ + url : function(v){ return url.test(v); }, /** * The error text to display when the url validation function returns false * @type String */ - 'urlText' : 'This field should be a URL in the format "http:/'+'/www.domain.com"', + urlText : 'This field should be a URL in the format "http:/'+'/www.domain.com"', /** * The function used to validate alpha values * @param {String} value The value */ - 'alpha' : function(v){ + alpha : function(v){ return alpha.test(v); }, /** * The error text to display when the alpha validation function returns false * @type String */ - 'alphaText' : 'This field should only contain letters and _', + alphaText : 'This field should only contain letters and _', /** * The keystroke filter mask to be applied on alpha input * @type RegExp */ - 'alphaMask' : /[a-z_]/i, + alphaMask : /[a-z_]/i, /** * The function used to validate alphanumeric values * @param {String} value The value */ - 'alphanum' : function(v){ + alphanum : function(v){ return alphanum.test(v); }, /** * The error text to display when the alphanumeric validation function returns false * @type String */ - 'alphanumText' : 'This field should only contain letters, numbers and _', + alphanumText : 'This field should only contain letters, numbers and _', /** * The keystroke filter mask to be applied on alphanumeric input * @type RegExp */ - 'alphanumMask' : /[a-z0-9_]/i + alphanumMask : /[a-z0-9_]/i }; }();/* * - LGPL diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 18a1453635..775dbda596 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -518,9 +518,9 @@ this.maskEl.right.setLeft(E.right+this.padding);this.maskEl.right.setTop(E.y-thi this.maskEl.left.setSize(0,0).setXY([0,0]);this.maskEl.left.hide();this.maskEl.bottom.setStyle('position','absolute');this.maskEl.bottom.setSize(0,0).setXY([0,0]);this.maskEl.bottom.hide();this.maskEl.right.setStyle('position','absolute');this.maskEl.right.setSize(0,0).setXY([0,0]); this.maskEl.right.hide();this.toolTip.hide();this.toolTip.el.hide();window.onwheel=function(){return true;};if(this.intervalID){window.clearInterval(this.intervalID);this.intervalID=false;}this.isMasked=false;}}}); // Roo/form/VTypes.js -Roo.form.VTypes=function(){var A=/^[a-zA-Z_]+$/;var B=/^[a-zA-Z0-9_]+$/;var C=/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;var D=/(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return {'email':function(v){return C.test(v); -},'emailText':'This field should be an e-mail address in the format "user@domain.com"','emailMask':/[a-z0-9_\.\-@]/i,'url':function(v){return D.test(v);},'urlText':'This field should be a URL in the format "http:/'+'/www.domain.com"','alpha':function(v){return A.test(v); -},'alphaText':'This field should only contain letters and _','alphaMask':/[a-z_]/i,'alphanum':function(v){return B.test(v);},'alphanumText':'This field should only contain letters, numbers and _','alphanumMask':/[a-z0-9_]/i};}(); +Roo.form.VTypes=function(){var A=/^[a-zA-Z_]+$/;var B=/^[a-zA-Z0-9_]+$/;var C=/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;var D=/(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return {email:function(v){return C.test(v); +},emailText:'This field should be an e-mail address in the format "user@domain.com"',emailMask:/[a-z0-9_\.\-@]/i,url:function(v){return D.test(v);},urlText:'This field should be a URL in the format "http:/'+'/www.domain.com"',alpha:function(v){return A.test(v); +},alphaText:'This field should only contain letters and _',alphaMask:/[a-z_]/i,alphanum:function(v){return B.test(v);},alphanumText:'This field should only contain letters, numbers and _',alphanumMask:/[a-z0-9_]/i};}(); // Roo/bootstrap/form/Input.js Roo.bootstrap.form.Input=function(A){Roo.bootstrap.form.Input.superclass.constructor.call(this,A);this.addEvents({focus:true,blur:true,specialkey:true,change:true,invalid:true,valid:true,keyup:true,paste:true});};Roo.extend(Roo.bootstrap.form.Input,Roo.bootstrap.Component,{validationEvent:"keyup",validateOnBlur:true,validationDelay:250,focusClass:"x-form-focus",invalidClass:"has-warning",validClass:"has-success",hasFeedback:true,invalidFeedbackClass:"glyphicon-warning-sign",validFeedbackClass:"glyphicon-ok",selectOnFocus:false,maskRe:null,vtype:null,disableKeyFilter:false,disabled:false,allowBlank:true,blankText:"Please complete this mandatory field",minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",validator:null,regex:null,regexText:"",invalidText:"",autocomplete:false,fieldLabel:'',inputType:'text',name:false,placeholder:false,before:false,after:false,size:false,hasFocus:false,preventMark:false,isFormField:true,value:'',labelWidth:2,labelAlign:false,readOnly:false,align:false,formatedValue:false,forceFeedback:false,indicatorpos:'left',labellg:0,labelmd:0,labelsm:0,labelxs:0,capture:'',accept:'',parentLabelAlign:function(){var A=this; while(A.parent()){A=A.parent();if(typeof(A.labelAlign)!='undefined'){return A.labelAlign;}}return 'left';},getAutoCreate:function(){var A=(!this.labelAlign)?this.parentLabelAlign():this.labelAlign;var id=Roo.id();var B={};if(this.inputType!='hidden'){B.cls='form-group'} diff --git a/roojs-debug.js b/roojs-debug.js index 29bfd4a4ea..471deb1d32 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -55859,68 +55859,68 @@ Roo.form.VTypes = function(){ * The function used to validate email addresses * @param {String} value The email address */ - 'email' : function(v){ + email : function(v){ return email.test(v); }, /** * The error text to display when the email validation function returns false * @type String */ - 'emailText' : 'This field should be an e-mail address in the format "user@domain.com"', + emailText : 'This field should be an e-mail address in the format "user@domain.com"', /** * The keystroke filter mask to be applied on email input * @type RegExp */ - 'emailMask' : /[a-z0-9_\.\-@]/i, + emailMask : /[a-z0-9_\.\-@]/i, /** * The function used to validate URLs * @param {String} value The URL */ - 'url' : function(v){ + url : function(v){ return url.test(v); }, /** * The error text to display when the url validation function returns false * @type String */ - 'urlText' : 'This field should be a URL in the format "http:/'+'/www.domain.com"', + urlText : 'This field should be a URL in the format "http:/'+'/www.domain.com"', /** * The function used to validate alpha values * @param {String} value The value */ - 'alpha' : function(v){ + alpha : function(v){ return alpha.test(v); }, /** * The error text to display when the alpha validation function returns false * @type String */ - 'alphaText' : 'This field should only contain letters and _', + alphaText : 'This field should only contain letters and _', /** * The keystroke filter mask to be applied on alpha input * @type RegExp */ - 'alphaMask' : /[a-z_]/i, + alphaMask : /[a-z_]/i, /** * The function used to validate alphanumeric values * @param {String} value The value */ - 'alphanum' : function(v){ + alphanum : function(v){ return alphanum.test(v); }, /** * The error text to display when the alphanumeric validation function returns false * @type String */ - 'alphanumText' : 'This field should only contain letters, numbers and _', + alphanumText : 'This field should only contain letters, numbers and _', /** * The keystroke filter mask to be applied on alphanumeric input * @type RegExp */ - 'alphanumMask' : /[a-z0-9_]/i + alphanumMask : /[a-z0-9_]/i }; }();//