From 869147da028459e455cb794d4534a42f703d8185 Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 10 Aug 2023 16:29:16 +0800 Subject: [PATCH] fix #7760 - translation allowed on date and time fields --- docs/json/roodata.json | 208 +++++++++++--- docs/src/Roo_bootstrap_form_DateField.js.html | 270 +++++++++++------- docs/src/Roo_bootstrap_form_Input.js.html | 2 +- .../src/Roo_bootstrap_form_SecurePass.js.html | 112 +++----- docs/src/Roo_bootstrap_form_TimeField.js.html | 131 ++++++++- docs/src/Roo_form_Field.js.html | 3 + .../symbols/Roo.bootstrap.form.DateField.json | 8 - .../Roo.bootstrap.form.SecurePass.json | 32 +-- docs/symbols/Roo.form.Checkbox.json | 16 +- docs/symbols/Roo.form.ComboBox.json | 8 + docs/symbols/Roo.form.ComboBoxArray.json | 24 +- docs/symbols/Roo.form.ComboCheck.json | 8 + docs/symbols/Roo.form.ComboNested.json | 8 + docs/symbols/Roo.form.DateField.json | 8 + docs/symbols/Roo.form.DayPicker.json | 16 +- docs/symbols/Roo.form.DisplayField.json | 16 +- docs/symbols/Roo.form.FCKeditor.json | 24 +- docs/symbols/Roo.form.Field.json | 16 +- docs/symbols/Roo.form.GridField.json | 16 +- docs/symbols/Roo.form.Hidden.json | 8 + docs/symbols/Roo.form.HtmlEditor.json | 8 + docs/symbols/Roo.form.MonthField.json | 8 + docs/symbols/Roo.form.NumberField.json | 8 + docs/symbols/Roo.form.Radio.json | 16 +- docs/symbols/Roo.form.Select.json | 8 + docs/symbols/Roo.form.Signature.json | 16 +- docs/symbols/Roo.form.TextArea.json | 18 +- docs/symbols/Roo.form.TextField.json | 8 + docs/symbols/Roo.form.TriggerField.json | 8 + 29 files changed, 738 insertions(+), 294 deletions(-) diff --git a/docs/json/roodata.json b/docs/json/roodata.json index 0ef4e4c21e..467331f955 100644 --- a/docs/json/roodata.json +++ b/docs/json/roodata.json @@ -127374,14 +127374,6 @@ "isOptional" : false, "optvals" : [] }, - { - "name" : "altFormats", - "type" : "String", - "desc" : "Multiple date formats separated by \"|\" to try when parsing a user input value and it doesn't match the defined\nformat (defaults to 'm/d/Y|m-d-y|m-d-Y|m/d|m-d|d').", - "memberOf" : "", - "isOptional" : false, - "optvals" : [] - }, { "name" : "autocomplete", "type" : "String", @@ -156478,14 +156470,6 @@ }, "Roo.bootstrap.form.SecurePass" : { "props" : [ - { - "name" : "Label", - "type" : "String/Object", - "desc" : "for the strength meter (defaults to\n'Password strength:')", - "memberOf" : "", - "isOptional" : false, - "optvals" : [] - }, { "name" : "accept", "type" : "String", @@ -156641,14 +156625,6 @@ "isOptional" : false, "optvals" : [] }, - { - "name" : "errors", - "type" : "String/Object", - "desc" : "A Error spec, or true for a default spec (defaults to\n{\n PwdEmpty: \"Please type a password, and then retype it to confirm.\",\n PwdShort: \"Your password must be at least 6 characters long. Please type a different password.\",\n PwdLong: \"Your password can't contain more than 16 characters. Please type a different password.\",\n PwdBadChar: \"The password contains characters that aren't allowed. Please type a different password.\",\n IDInPwd: \"Your password can't include the part of your ID. Please type a different password.\",\n FNInPwd: \"Your password can't contain your first name. Please type a different password.\",\n LNInPwd: \"Your password can't contain your last name. Please type a different password.\"\n})", - "memberOf" : "", - "isOptional" : false, - "optvals" : [] - }, { "name" : "fieldLabel", "type" : "string", @@ -156871,6 +156847,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "minimumStrength", + "type" : "Number", + "desc" : "invalid if the strength of the password input is less than the minimum strength (from 0 to 3) (default 2)", + "memberOf" : "", + "isOptional" : false, + "optvals" : [] + }, { "name" : "name", "type" : "String", @@ -156895,14 +156879,6 @@ "isOptional" : false, "optvals" : [] }, - { - "name" : "pwdStrengths", - "type" : "String/Object", - "desc" : "A pwdStrengths spec, or true for a default spec (defaults to\n['Weak', 'Medium', 'Strong'])", - "memberOf" : "", - "isOptional" : false, - "optvals" : [] - }, { "name" : "readOnly", "type" : "Boolean", @@ -219371,6 +219347,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -222551,6 +222535,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "lazyRender", "type" : "Boolean", @@ -225441,6 +225433,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -229111,6 +229111,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "lazyRender", "type" : "Boolean", @@ -232062,6 +232070,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "lazyRender", "type" : "Boolean", @@ -234965,6 +234981,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -237230,6 +237254,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -239215,6 +239247,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -241283,6 +241323,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -243474,6 +243522,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -248222,6 +248278,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -250262,6 +250326,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -252419,6 +252491,14 @@ "visibility" ] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "language", "type" : "String", @@ -255990,6 +256070,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -258343,6 +258431,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -260564,6 +260660,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -263784,6 +263888,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "lazyRender", "type" : "Boolean", @@ -266424,6 +266536,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "labels", "type" : "Object", @@ -268636,6 +268756,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -270867,6 +270995,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", @@ -274410,6 +274546,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "listeners", "type" : "Object", diff --git a/docs/src/Roo_bootstrap_form_DateField.js.html b/docs/src/Roo_bootstrap_form_DateField.js.html index 4a237d9497..ecd83b4a6e 100644 --- a/docs/src/Roo_bootstrap_form_DateField.js.html +++ b/docs/src/Roo_bootstrap_form_DateField.js.html @@ -70,12 +70,6 @@ * valid according to {@link Date#parseDate} (defaults to 'm/d/y'). */ format : "m/d/y", - /** - * @cfg {String} altFormats - * Multiple date formats separated by "|" to try when parsing a user input value and it doesn't match the defined - * format (defaults to 'm/d/Y|m-d-y|m-d-Y|m/d|m-d|d'). - */ - altFormats : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d", weekStart : 0, @@ -103,6 +97,8 @@ singleMode : false, + hiddenField : false, + UTCDate: function() { return new Date(Date.UTC.apply(Date, arguments)); @@ -129,7 +125,69 @@ setUTCDate: function(d) { this.date = d; - this.setValue(this.formatDate(this.date)); + this.setValue(this.date); + }, + + translateDates: function(lang) + { + var translation = Roo.bootstrap.form.DateField.dates[lang] = { + days: [], + daysShort: [], + daysMin: [], + months: [], + monthsShort: [] + }; + + var locale = lang.replace('_', '-'); + + var is_latin = [ 'zh-hk', 'zh-cn', 'jp', 'ko' ].indexOf(locale.toLowerCase()) < 0; + + + // fill days + for(var i = 0; i < 7; i++) { + var date = new Date(2020, 0, 5 + i); + + var day = new Intl.DateTimeFormat(locale, { + weekday : 'long' + }).format(date); + + var dayShort = new Intl.DateTimeFormat(locale, { + weekday : 'short' + }).format(date); + + var dayMin = new Intl.DateTimeFormat(locale, { + weekday : 'narrow' + }).format(date); + + if(is_latin) { + dayShort = day.substring(0, 3); + dayMin = day.substring(0, 2); + } + + translation.days.push(day); + translation.daysShort.push(dayShort); + translation.daysMin.push(dayMin); + } + + // fill months + for(var i = 0; i < 12; i++) { + var date = new Date(2020, i); + + var month = new Intl.DateTimeFormat(locale, { + month : 'long' + }).format(date); + + var monthShort = new Intl.DateTimeFormat(locale, { + month : 'short' + }).format(date); + + if(is_latin) { + monthShort = month.substring(0, 3); + } + + translation.months.push(month); + translation/monthsShort.push(monthShort); + } }, onRender: function(ct, position) @@ -137,9 +195,7 @@ Roo.bootstrap.form.DateField.superclass.onRender.call(this, ct, position); - this.language = this.language || 'en'; - this.language = this.language in Roo.bootstrap.form.DateField.dates ? this.language : this.language.split('-')[0]; - this.language = this.language in Roo.bootstrap.form.DateField.dates ? this.language : "en"; + this.translateDates(this.language); this.isRTL = Roo.bootstrap.form.DateField.dates[this.language].rtl || false; this.format = this.format || 'm/d/y'; @@ -202,15 +258,7 @@ } Roo.each(this.picker().select('tfoot th.today', true).elements, function(v){ - if(!this.calendarWeeks){ - v.remove(); - return; - } - - v.dom.innerHTML = Roo.bootstrap.form.DateField.dates[this.language].today; - v.attr('colspan', function(i, val){ - return parseInt(val) + 1; - }); + v.dom.innerHTML = Roo.bootstrap.form.DateField.todayText; }); @@ -229,6 +277,14 @@ if(this.isInline) { this.showPopup(); } + + this.hiddenField = this.inputEl().insertSibling( + {tag : 'input', type : 'hidden', name : this.name}, + 'before', + true + ); + this.inputEl().dom.setAttribute('name', this.name + '____hidden___'); + }, picker : function() @@ -248,14 +304,6 @@ ] }; - if(this.calendarWeeks){ - dow.cn.push({ - tag: 'th', - cls: 'cw', - html: '&nbsp;' - }) - } - while (dowCnt < this.weekStart + 7) { dow.cn.push({ tag: 'th', @@ -315,12 +363,6 @@ this.picker().select('>.datepicker-days thead th.switch', true).first().dom.innerHTML = Roo.bootstrap.form.DateField.dates[this.language].months[month]+' '+year; -// this.picker().select('>tfoot th.today', true).first().dom.innerHTML = Roo.bootstrap.form.DateField.dates[this.language].today; - -// this.picker.select('>tfoot th.today'). -// .text(dates[this.language].today) -// .toggle(this.todayBtn !== false); - this.updateNavArrows(); this.fillMonths(); @@ -354,26 +396,6 @@ tag: 'tr', cn: [] }; - - if(this.calendarWeeks){ - // ISO 8601: First week contains first thursday. - // ISO also states week starts on Monday, but we can be more abstract here. - var - // Start of current week: based on weekstart/current date - ws = new Date(+prevMonth + (this.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5), - // Thursday of this week - th = new Date(+ws + (7 + 4 - ws.getUTCDay()) % 7 * 864e5), - // First Thursday of year, year from thursday - yth = new Date(+(yth = this.UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5), - // Calendar week: ms between thursdays, div ms per day, div 7 days - calWeek = (th - yth) / 864e5 / 7 + 1; - - fillMonths.cn.push({ - tag: 'td', - cls: 'cw', - html: calWeek - }); - } } if (prevMonth.getUTCFullYear() < year || (prevMonth.getUTCFullYear() == year && prevMonth.getUTCMonth() < month)) { @@ -481,24 +503,18 @@ this.picker().setTop(this.inputEl().getBottom()).setLeft(this.inputEl().getLeft()); }, + // return false when it fails parseDate : function(value) { - if(!value || value instanceof Date){ - return value; - } - var v = Date.parseDate(value, this.format); - if (!v && (this.useIso || value.match(/^(\d{4})-0?(\d+)-0?(\d+)/))) { - v = Date.parseDate(value, 'Y-m-d'); + if(!value) { + return false; } - if(!v && this.altFormats){ - if(!this.altFormatsArray){ - this.altFormatsArray = this.altFormats.split("|"); - } - for(var i = 0, len = this.altFormatsArray.length; i < len && !v; i++){ - v = Date.parseDate(value, this.altFormatsArray[i]); - } + if(value instanceof Date){ + return value; } - return v; + var v = Date.parseDate(value, 'Y-m-d'); + + return (typeof(v) == 'undefined') ? false : v; }, formatDate : function(date, fmt) @@ -507,6 +523,20 @@ date : date.dateFormat(fmt || this.format); }, + translateDate : function(date) + { + switch(this.language) { + case 'zh_CN': + return new Intl.DateTimeFormat('zh-CN', { + year : 'numeric', + month : 'long', + day : 'numeric' + }).format(date); + default : + return this.formatDate(date); + } + }, + onFocus : function() { Roo.bootstrap.form.DateField.superclass.onFocus.call(this); @@ -517,9 +547,16 @@ { Roo.bootstrap.form.DateField.superclass.onBlur.call(this); - var d = this.inputEl().getValue(); - - this.setValue(d); + if(!this.readOnly) { + var d = this.inputEl().getValue(); + var date = this.parseDate(d); + if(date) { + this.setValue(date); + } + else { + this.setValue(this.getValue()); + } + } this.hidePopup(); }, @@ -561,17 +598,56 @@ setValue: function(v) { if(this.fireEvent('beforeselect', this, v) !== false){ - var d = new Date(this.parseDate(v) ).clearTime(); + var d = this.parseDate(v); + + if(!d) { + this.date = this.viewDate = this.value = this.hiddenField.value = ''; + if(this.rendered){ + this.inputEl().dom.value = ''; + this.validate(); + } + return; + } + + d = new Date(d).clearTime(); + + this.value = this.hiddenField.value = d.dateFormat('Y-m-d'); + + v = this.translateDate(d); + if(this.rendered){ + this.inputEl().dom.value = (v === null || v === undefined ? '' : v); + this.validate(); + } + + this.date = new Date(d.getTime() - d.getTimezoneOffset()*60000); + + this.update(); + + this.fireEvent('select', this, this.date); + } + }, + + // bypass validation + setRawValue : function(v){ + if(this.fireEvent('beforeselect', this, v) !== false){ + var d = this.parseDate(v); - if(isNaN(d.getTime())){ - this.date = this.viewDate = ''; - Roo.bootstrap.form.DateField.superclass.setValue.call(this, ''); + if(!d) { + this.date = this.viewDate = this.value = this.hiddenField.value = ''; + if(this.rendered){ + this.inputEl().dom.value = (v === null || v === undefined ? '' : v); + } return; } - v = this.formatDate(d); + d = new Date(d).clearTime(); + + this.value = this.hiddenField.value = d.dateFormat('Y-m-d'); - Roo.bootstrap.form.DateField.superclass.setValue.call(this, v); + v = this.translateDate(d); + if(this.rendered){ + this.inputEl().dom.value = (v === null || v === undefined ? '' : v); + } this.date = new Date(d.getTime() - d.getTimezoneOffset()*60000); @@ -583,7 +659,11 @@ getValue: function() { - return this.formatDate(this.date); + return this.value; + }, + + getRawValue : function(){ + return this.getValue(); }, fireKey: function(e) @@ -626,7 +706,7 @@ if (this.dateWithinRange(newDate)){ this.date = newDate; this.viewDate = newViewDate; - this.setValue(this.formatDate(this.date)); + this.setValue(this.date); // this.update(); e.preventDefault(); dateChanged = true; @@ -653,19 +733,19 @@ if (this.dateWithinRange(newDate)){ this.date = newDate; this.viewDate = newViewDate; - this.setValue(this.formatDate(this.date)); + this.setValue(this.date); // this.update(); e.preventDefault(); dateChanged = true; } break; case 13: // enter - this.setValue(this.formatDate(this.date)); + this.setValue(this.date); this.hidePopup(); e.preventDefault(); break; case 9: // tab - this.setValue(this.formatDate(this.date)); + this.setValue(this.date); this.hidePopup(); break; case 16: // shift @@ -719,7 +799,7 @@ var date = new Date(); this.date = this.UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); // this.fill() - this.setValue(this.formatDate(this.date)); + this.setValue(this.date); this.hidePopup(); break; @@ -740,7 +820,7 @@ } if(this.singleMode){ - this.setValue(this.formatDate(this.viewDate)); + this.setValue(this.viewDate); this.hidePopup(); return; } @@ -776,8 +856,7 @@ this.date = this.UTCDate(year, month, day,0,0,0,0); this.viewDate = this.UTCDate(year, month, Math.min(28, day),0,0,0,0); // this.fill(); - //Roo.log(this.formatDate(this.date)); - this.setValue(this.formatDate(this.date)); + this.setValue(this.date); this.hidePopup(); } break; @@ -788,7 +867,8 @@ { this.startDate = startDate || -Infinity; if (this.startDate !== -Infinity) { - this.startDate = this.parseDate(this.startDate); + var date = this.parseDate(this.startDate); + this.startDate = date ? date : -Infinity; } this.update(); this.updateNavArrows(); @@ -798,7 +878,8 @@ { this.endDate = endDate || Infinity; if (this.endDate !== Infinity) { - this.endDate = this.parseDate(this.endDate); + var date = this.parseDate(this.endDate); + this.endDate = date ? date : Infinity; } this.update(); this.updateNavArrows(); @@ -967,7 +1048,7 @@ return false; } - if(typeof(this.parseDate(value)) == 'undefined'){ + if(!this.parseDate(value)){ return false; } @@ -1053,16 +1134,9 @@ ] }, - dates:{ - en: { - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], - daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], - months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - today: "Today" - } - }, + dates : {}, + + todayText : "Today", modes: [ { diff --git a/docs/src/Roo_bootstrap_form_Input.js.html b/docs/src/Roo_bootstrap_form_Input.js.html index 7e06fd6f5e..4992006f82 100644 --- a/docs/src/Roo_bootstrap_form_Input.js.html +++ b/docs/src/Roo_bootstrap_form_Input.js.html @@ -1056,7 +1056,7 @@ this.el.select('.form-control-feedback', true).first().addClass([this.invalidFeedbackClass]); - feedback.update(this.invalidText); + feedback.update(typeof(msg) == 'undefined' ? this.invalidText : msg); if(!this.allowBlank && !this.getRawValue().length){ feedback.update(this.blankText); diff --git a/docs/src/Roo_bootstrap_form_SecurePass.js.html b/docs/src/Roo_bootstrap_form_SecurePass.js.html index b4b3846950..79c1e041de 100644 --- a/docs/src/Roo_bootstrap_form_SecurePass.js.html +++ b/docs/src/Roo_bootstrap_form_SecurePass.js.html @@ -9,6 +9,7 @@ * @class Roo.bootstrap.form.SecurePass * @extends Roo.bootstrap.form.Input * Bootstrap SecurePass class + * @cfg {Number} minimumStrength invalid if the strength of the password input is less than the minimum strength (from 0 to 3) (default 2) * * * @constructor @@ -17,63 +18,15 @@ */ Roo.bootstrap.form.SecurePass = function (config) { - // these go here, so the translation tool can replace them.. - this.errors = { - PwdEmpty: "Please type a password, and then retype it to confirm.", - PwdShort: "Your password must be at least 6 characters long. Please type a different password.", - PwdLong: "Your password can't contain more than 16 characters. Please type a different password.", - PwdBadChar: "The password contains characters that aren't allowed. Please type a different password.", - IDInPwd: "Your password can't include the part of your ID. Please type a different password.", - FNInPwd: "Your password can't contain your first name. Please type a different password.", - LNInPwd: "Your password can't contain your last name. Please type a different password.", - TooWeak: "Your password is Too Weak." - }, - this.meterLabel = "Password strength:"; - this.pwdStrengths = ["Too Weak", "Weak", "Medium", "Strong"]; - this.meterClass = [ - "roo-password-meter-tooweak", - "roo-password-meter-weak", - "roo-password-meter-medium", - "roo-password-meter-strong", - "roo-password-meter-grey" - ]; - - this.errors = {}; Roo.bootstrap.form.SecurePass.superclass.constructor.call(this, config); } Roo.extend(Roo.bootstrap.form.SecurePass, Roo.bootstrap.form.Input, { - /** - * @cfg {String/Object} errors A Error spec, or true for a default spec (defaults to - * { - * PwdEmpty: "Please type a password, and then retype it to confirm.", - * PwdShort: "Your password must be at least 6 characters long. Please type a different password.", - * PwdLong: "Your password can't contain more than 16 characters. Please type a different password.", - * PwdBadChar: "The password contains characters that aren't allowed. Please type a different password.", - * IDInPwd: "Your password can't include the part of your ID. Please type a different password.", - * FNInPwd: "Your password can't contain your first name. Please type a different password.", - * LNInPwd: "Your password can't contain your last name. Please type a different password." - * }) - */ - // private - + minimumStrength : 2, + // private meterWidth: 300, - errorMsg :'', - errors: false, imageRoot: '/', - /** - * @cfg {String/Object} Label for the strength meter (defaults to - * 'Password strength:') - */ - // private - meterLabel: '', - /** - * @cfg {String/Object} pwdStrengths A pwdStrengths spec, or true for a default spec (defaults to - * ['Weak', 'Medium', 'Strong']) - */ - // private - pwdStrengths: false, // private strength: 0, // private @@ -161,13 +114,13 @@ //var pm = this.trigger.child('div/div/div').dom; var pm = this.trigger.child('div/div'); - pm.removeClass(this.meterClass); - pm.addClass(this.meterClass[strength]); + pm.removeClass(Roo.bootstrap.form.SecurePass.meterClass); + pm.addClass(Roo.bootstrap.form.SecurePass.meterClass[strength]); var pt = this.trigger.child('/div').child('>*[class=roo-password-meter-text]').dom; - pt.innerHTML = this.meterLabel + '&nbsp;' + this.pwdStrengths[strength]; + pt.innerHTML = Roo.bootstrap.form.SecurePass.meterLabel + '&nbsp;' + Roo.bootstrap.form.SecurePass.pwdStrengths[strength]; this._lastPwd = pwd; }, @@ -178,7 +131,7 @@ this._lastPwd = ''; var pm = this.trigger.child('div/div'); - pm.removeClass(this.meterClass); + pm.removeClass(Roo.bootstrap.form.SecurePass.meterClass); pm.addClass('roo-password-meter-grey'); @@ -199,8 +152,7 @@ return true; } - this.markInvalid(this.errors.PwdEmpty); - this.errorMsg = this.errors.PwdEmpty; + this.invalidText = Roo.bootstrap.form.SecurePass.errors.PwdEmpty; return false; } @@ -209,18 +161,15 @@ } if (!value.match(/[\x21-\x7e]+/)) { - this.markInvalid(this.errors.PwdBadChar); - this.errorMsg = this.errors.PwdBadChar; + this.invalidText = Roo.bootstrap.form.SecurePass.errors.PwdBadChar; return false; } if (value.length < 6) { - this.markInvalid(this.errors.PwdShort); - this.errorMsg = this.errors.PwdShort; + this.invalidText = Roo.bootstrap.form.SecurePass.errors.PwdShort; return false; } if (value.length > 16) { - this.markInvalid(this.errors.PwdLong); - this.errorMsg = this.errors.PwdLong; + this.invalidText = Roo.bootstrap.form.SecurePass.errors.PwdLong; return false; } var strength; @@ -235,11 +184,10 @@ } - if (strength < 2) { - //this.markInvalid(this.errors.TooWeak); - this.errorMsg = this.errors.TooWeak; - //return false; - } + if (strength < this.minimumStrength) { + this.invalidText = Roo.bootstrap.form.SecurePass.errors.TooWeak; + return false; + } console.log('strength2: ' + strength); @@ -247,14 +195,13 @@ //var pm = this.trigger.child('div/div/div').dom; var pm = this.trigger.child('div/div'); - pm.removeClass(this.meterClass); - pm.addClass(this.meterClass[strength]); + pm.removeClass(Roo.bootstrap.form.SecurePass.meterClass); + pm.addClass(Roo.bootstrap.form.SecurePass.meterClass[strength]); var pt = this.trigger.child('/div').child('>*[class=roo-password-meter-text]').dom; - pt.innerHTML = this.meterLabel + '&nbsp;' + this.pwdStrengths[strength]; + pt.innerHTML = Roo.bootstrap.form.SecurePass.meterLabel + '&nbsp;' + Roo.bootstrap.form.SecurePass.pwdStrengths[strength]; - this.errorMsg = ''; return true; }, // private @@ -351,4 +298,25 @@ return this.IsLongEnough(pwd, 6) || !this.IsLongEnough(pwd, 0); } -}); \ No newline at end of file +}); + +Roo.bootstrap.form.SecurePass.errors = { + PwdEmpty: "Please type a password, and then retype it to confirm.", + PwdShort: "Your password must be at least 6 characters long. Please type a different password.", + PwdLong: "Your password can't contain more than 16 characters. Please type a different password.", + PwdBadChar: "The password contains characters that aren't allowed. Please type a different password.", + IDInPwd: "Your password can't include the part of your ID. Please type a different password.", + FNInPwd: "Your password can't contain your first name. Please type a different password.", + LNInPwd: "Your password can't contain your last name. Please type a different password.", + TooWeak: "Your password is Too Weak." +}; + +Roo.bootstrap.form.SecurePass.meterLabel = "Password strength:"; +Roo.bootstrap.form.SecurePass.pwdStrengths = ["Too Weak", "Weak", "Medium", "Strong"]; +Roo.bootstrap.form.SecurePass.meterClass = [ + "roo-password-meter-tooweak", + "roo-password-meter-weak", + "roo-password-meter-medium", + "roo-password-meter-strong", + "roo-password-meter-grey" +]; \ No newline at end of file diff --git a/docs/src/Roo_bootstrap_form_TimeField.js.html b/docs/src/Roo_bootstrap_form_TimeField.js.html index 82547ff77c..6c228ac346 100644 --- a/docs/src/Roo_bootstrap_form_TimeField.js.html +++ b/docs/src/Roo_bootstrap_form_TimeField.js.html @@ -53,7 +53,8 @@ */ format : "H:i", minuteStep : 1, - + language : 'en', + hiddenField : false, getAutoCreate : function() { this.after = '<i class="fa far fa-clock"></i>'; @@ -66,6 +67,8 @@ Roo.bootstrap.form.TimeField.superclass.onRender.call(this, ct, position); + this.language = this.language in Roo.bootstrap.form.TimeField.periodText ? this.language : "en"; + this.pickerEl = Roo.get(document.body).createChild(Roo.bootstrap.form.TimeField.template); this.picker().setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block'; @@ -87,6 +90,14 @@ this.pop.select('.minutes-down', true).first().on('click', this.onDecrementMinutes, this); this.pop.select('button.period', true).first().on('click', this.onTogglePeriod, this); this.pop.select('button.ok', true).first().on('click', this.setTime, this); + this.pop.select('button.ok', true).first().dom.innerHTML = Roo.bootstrap.form.TimeField.okText; + + this.hiddenField = this.inputEl().insertSibling( + {tag : 'input', type : 'hidden', name : this.name}, + 'before', + true + ); + this.inputEl().dom.setAttribute('name', this.name + '____hidden___'); }, @@ -294,10 +305,10 @@ { var hours = this.time.getHours(); var minutes = this.time.getMinutes(); - var period = 'AM'; + var period = Roo.bootstrap.form.TimeField.periodText[this.language]['am']; if(hours > 11){ - period = 'PM'; + period = Roo.bootstrap.form.TimeField.periodText[this.language]['pm']; } if(hours == 0){ @@ -393,7 +404,7 @@ this.update(); this.place(); - this.fireEvent('show', this, this.date); + this.fireEvent('show', this, this.time); }, hide : function() @@ -401,19 +412,108 @@ this.picker().hide(); this.pop.hide(); - this.fireEvent('hide', this, this.date); + this.fireEvent('hide', this, this.time); }, setTime : function() { this.hide(); - this.setValue(this.time.format(this.format)); + this.setValue(this.time); - this.fireEvent('select', this, this.date); + this.fireEvent('select', this, this.time); }, + // return false when it fails + parseTime : function(value) + { + if(!value) { + return false; + } + if(value instanceof Date){ + return value; + } + var v = Date.parseDate(value, 'H:i:s'); + + return (typeof(v) == 'undefined') ? false : v; + }, + + translateTime : function(time) + { + switch(this.language) { + case 'zh_CN': + return new Intl.DateTimeFormat('zh-CN', { + hour : 'numeric', + minute : 'numeric', + hour12 : true + }).format(time); + default : + return time.format(this.format); + } + }, + + setValue: function(v) + { + var t = this.parseTime(v); + + if(!t) { + this.time = this.value = this.hiddenField.value = ''; + if(this.rendered){ + this.inputEl().dom.value = ''; + this.validate(); + } + return; + } + + this.value = this.hiddenField.value = t.dateFormat('H:i:s'); + + v = this.translateTime(t); + + if(this.rendered){ + this.inputEl().dom.value = (v === null || v === undefined ? '' : v); + this.validate(); + } + + this.time = t; + + this.update(); + }, + + setRawValue: function(v) + { + var t = this.parseTime(v); + + if(!t) { + this.time = this.value = this.hiddenField.value = ''; + if(this.rendered){ + this.inputEl().dom.value = (v === null || v === undefined ? '' : v); + } + return; + } + + this.value = this.hiddenField.value = t.dateFormat('H:i:s'); + + v = this.translateTime(t); + + if(this.rendered){ + this.inputEl().dom.value = (v === null || v === undefined ? '' : v); + } + + this.time = t; + + this.update(); + }, + + getValue: function() + { + return this.value; + }, + + getRawValue : function(){ + return this.getValue(); + }, + onMousedown: function(e){ e.stopPropagation(); e.preventDefault(); @@ -459,10 +559,21 @@ }); - - Roo.apply(Roo.bootstrap.form.TimeField, { + okText : 'OK', + periodText : { + en : { + am : 'AM', + pm : 'PM' + }, + zh_CN : { + am : '上午', + pm : '下午' + } + } +}); +Roo.apply(Roo.bootstrap.form.TimeField, { template : { tag: 'div', cls: 'datepicker dropdown-menu', @@ -503,7 +614,7 @@ { tag: 'button', cls: 'btn btn-info ok', - html: 'OK' + html: "OK" // this is overridden on construciton } ] } diff --git a/docs/src/Roo_form_Field.js.html b/docs/src/Roo_form_Field.js.html index 5826f20cb2..4d79119823 100644 --- a/docs/src/Roo_form_Field.js.html +++ b/docs/src/Roo_form_Field.js.html @@ -24,6 +24,9 @@ Roo.extend(Roo.form.Field, Roo.BoxComponent, { /** * @cfg {String} fieldLabel Label to use when rendering a form. + */ + /** + * @cfg {String} labelSeparator the ':' after a field label (default :) = set it to empty string to hide the field label. */ /** * @cfg {String} qtip Mouse over tip diff --git a/docs/symbols/Roo.bootstrap.form.DateField.json b/docs/symbols/Roo.bootstrap.form.DateField.json index dad6babef9..d9699c9c8a 100644 --- a/docs/symbols/Roo.bootstrap.form.DateField.json +++ b/docs/symbols/Roo.bootstrap.form.DateField.json @@ -170,14 +170,6 @@ "isOptional" : false, "optvals" : [] }, - { - "name" : "altFormats", - "type" : "String", - "desc" : "Multiple date formats separated by \"|\" to try when parsing a user input value and it doesn't match the defined\nformat (defaults to 'm/d/Y|m-d-y|m-d-Y|m/d|m-d|d').", - "memberOf" : "", - "isOptional" : false, - "optvals" : [] - }, { "name" : "viewMode", "type" : "String", diff --git a/docs/symbols/Roo.bootstrap.form.SecurePass.json b/docs/symbols/Roo.bootstrap.form.SecurePass.json index 7e039cae5b..56c2f8f7d5 100644 --- a/docs/symbols/Roo.bootstrap.form.SecurePass.json +++ b/docs/symbols/Roo.bootstrap.form.SecurePass.json @@ -162,14 +162,6 @@ "isOptional" : false, "optvals" : [] }, - { - "name" : "errors", - "type" : "String/Object", - "desc" : "A Error spec, or true for a default spec (defaults to\n{\n PwdEmpty: \"Please type a password, and then retype it to confirm.\",\n PwdShort: \"Your password must be at least 6 characters long. Please type a different password.\",\n PwdLong: \"Your password can't contain more than 16 characters. Please type a different password.\",\n PwdBadChar: \"The password contains characters that aren't allowed. Please type a different password.\",\n IDInPwd: \"Your password can't include the part of your ID. Please type a different password.\",\n FNInPwd: \"Your password can't contain your first name. Please type a different password.\",\n LNInPwd: \"Your password can't contain your last name. Please type a different password.\"\n})", - "memberOf" : "", - "isOptional" : false, - "optvals" : [] - }, { "name" : "allowDomMove", "type" : "Boolean", @@ -202,14 +194,6 @@ "isOptional" : false, "optvals" : [] }, - { - "name" : "Label", - "type" : "String/Object", - "desc" : "for the strength meter (defaults to\n'Password strength:')", - "memberOf" : "", - "isOptional" : false, - "optvals" : [] - }, { "name" : "hasFeedback", "type" : "Boolean", @@ -403,14 +387,6 @@ "isOptional" : false, "optvals" : [] }, - { - "name" : "pwdStrengths", - "type" : "String/Object", - "desc" : "A pwdStrengths spec, or true for a default spec (defaults to\n['Weak', 'Medium', 'Strong'])", - "memberOf" : "", - "isOptional" : false, - "optvals" : [] - }, { "name" : "fieldLabel", "type" : "string", @@ -427,6 +403,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "minimumStrength", + "type" : "Number", + "desc" : "invalid if the strength of the password input is less than the minimum strength (from 0 to 3) (default 2)", + "memberOf" : "", + "isOptional" : false, + "optvals" : [] + }, { "name" : "before", "type" : "string", diff --git a/docs/symbols/Roo.form.Checkbox.json b/docs/symbols/Roo.form.Checkbox.json index 4f4bd7d90e..5ae47d7ea2 100644 --- a/docs/symbols/Roo.form.Checkbox.json +++ b/docs/symbols/Roo.form.Checkbox.json @@ -135,6 +135,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "tabIndex", "type" : "Number", @@ -256,17 +264,17 @@ "optvals" : [] }, { - "name" : "name", + "name" : "qtip", "type" : "String", - "desc" : "The field's HTML name attribute.", + "desc" : "Mouse over tip", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] }, { - "name" : "qtip", + "name" : "name", "type" : "String", - "desc" : "Mouse over tip", + "desc" : "The field's HTML name attribute.", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] diff --git a/docs/symbols/Roo.form.ComboBox.json b/docs/symbols/Roo.form.ComboBox.json index b6dd751493..bdb70705b6 100644 --- a/docs/symbols/Roo.form.ComboBox.json +++ b/docs/symbols/Roo.form.ComboBox.json @@ -362,6 +362,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "cls", "type" : "String", diff --git a/docs/symbols/Roo.form.ComboBoxArray.json b/docs/symbols/Roo.form.ComboBoxArray.json index 62c2deb375..cc01b6419f 100644 --- a/docs/symbols/Roo.form.ComboBoxArray.json +++ b/docs/symbols/Roo.form.ComboBoxArray.json @@ -220,6 +220,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "hiddenName", "type" : "String", @@ -260,14 +268,6 @@ "isOptional" : false, "optvals" : [] }, - { - "name" : "autoCreate", - "type" : "String/Object", - "desc" : "A DomHelper element spec, or true for a default element spec (defaults to\n{tag: \"input\", type: \"text\", size: \"20\", autocomplete: \"off\"})", - "memberOf" : "Roo.form.Field", - "isOptional" : false, - "optvals" : [] - }, { "name" : "maskRe", "type" : "String", @@ -300,6 +300,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "autoCreate", + "type" : "String/Object", + "desc" : "A DomHelper element spec, or true for a default element spec (defaults to\n{tag: \"input\", type: \"text\", size: \"20\", autocomplete: \"off\"})", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "validationEvent", "type" : "String/Boolean", diff --git a/docs/symbols/Roo.form.ComboCheck.json b/docs/symbols/Roo.form.ComboCheck.json index b13763fa93..0df925b4a0 100644 --- a/docs/symbols/Roo.form.ComboCheck.json +++ b/docs/symbols/Roo.form.ComboCheck.json @@ -358,6 +358,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "cls", "type" : "String", diff --git a/docs/symbols/Roo.form.ComboNested.json b/docs/symbols/Roo.form.ComboNested.json index 56e31b79eb..70b9b17997 100644 --- a/docs/symbols/Roo.form.ComboNested.json +++ b/docs/symbols/Roo.form.ComboNested.json @@ -358,6 +358,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "cls", "type" : "String", diff --git a/docs/symbols/Roo.form.DateField.json b/docs/symbols/Roo.form.DateField.json index f54463531a..e685950368 100644 --- a/docs/symbols/Roo.form.DateField.json +++ b/docs/symbols/Roo.form.DateField.json @@ -301,6 +301,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "validateOnBlur", "type" : "Boolean", diff --git a/docs/symbols/Roo.form.DayPicker.json b/docs/symbols/Roo.form.DayPicker.json index de5a12e8c0..aa141ce883 100644 --- a/docs/symbols/Roo.form.DayPicker.json +++ b/docs/symbols/Roo.form.DayPicker.json @@ -123,6 +123,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "tabIndex", "type" : "Number", @@ -220,17 +228,17 @@ "optvals" : [] }, { - "name" : "name", + "name" : "qtip", "type" : "String", - "desc" : "The field's HTML name attribute.", + "desc" : "Mouse over tip", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] }, { - "name" : "qtip", + "name" : "name", "type" : "String", - "desc" : "Mouse over tip", + "desc" : "The field's HTML name attribute.", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] diff --git a/docs/symbols/Roo.form.DisplayField.json b/docs/symbols/Roo.form.DisplayField.json index 8c219e6364..fb4c475d05 100644 --- a/docs/symbols/Roo.form.DisplayField.json +++ b/docs/symbols/Roo.form.DisplayField.json @@ -131,6 +131,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "tabIndex", "type" : "Number", @@ -239,17 +247,17 @@ "optvals" : [] }, { - "name" : "name", + "name" : "qtip", "type" : "String", - "desc" : "The field's HTML name attribute.", + "desc" : "Mouse over tip", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] }, { - "name" : "qtip", + "name" : "name", "type" : "String", - "desc" : "Mouse over tip", + "desc" : "The field's HTML name attribute.", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] diff --git a/docs/symbols/Roo.form.FCKeditor.json b/docs/symbols/Roo.form.FCKeditor.json index 3410c1b5a8..abcce7df1d 100644 --- a/docs/symbols/Roo.form.FCKeditor.json +++ b/docs/symbols/Roo.form.FCKeditor.json @@ -213,6 +213,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "cls", "type" : "String", @@ -253,14 +261,6 @@ "isOptional" : false, "optvals" : [] }, - { - "name" : "validationEvent", - "type" : "String/Boolean", - "desc" : "The event that should initiate field validation. Set to false to disable\n automatic validation (defaults to \"keyup\").", - "memberOf" : "Roo.form.Field", - "isOptional" : false, - "optvals" : [] - }, { "name" : "autoCreate", "type" : "String/Object", @@ -301,6 +301,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "validationEvent", + "type" : "String/Boolean", + "desc" : "The event that should initiate field validation. Set to false to disable\n automatic validation (defaults to \"keyup\").", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "fieldLabel", "type" : "String", diff --git a/docs/symbols/Roo.form.Field.json b/docs/symbols/Roo.form.Field.json index 036a8d845a..77c9c19e4b 100644 --- a/docs/symbols/Roo.form.Field.json +++ b/docs/symbols/Roo.form.Field.json @@ -155,6 +155,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "", + "isOptional" : false, + "optvals" : [] + }, { "name" : "tabIndex", "type" : "Number", @@ -236,17 +244,17 @@ "optvals" : [] }, { - "name" : "name", + "name" : "qtip", "type" : "String", - "desc" : "The field's HTML name attribute.", + "desc" : "Mouse over tip", "memberOf" : "", "isOptional" : false, "optvals" : [] }, { - "name" : "qtip", + "name" : "name", "type" : "String", - "desc" : "Mouse over tip", + "desc" : "The field's HTML name attribute.", "memberOf" : "", "isOptional" : false, "optvals" : [] diff --git a/docs/symbols/Roo.form.GridField.json b/docs/symbols/Roo.form.GridField.json index 85dcb10f5a..38afc6064d 100644 --- a/docs/symbols/Roo.form.GridField.json +++ b/docs/symbols/Roo.form.GridField.json @@ -131,6 +131,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "tabIndex", "type" : "Number", @@ -228,17 +236,17 @@ "optvals" : [] }, { - "name" : "name", + "name" : "qtip", "type" : "String", - "desc" : "The field's HTML name attribute.", + "desc" : "Mouse over tip", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] }, { - "name" : "qtip", + "name" : "name", "type" : "String", - "desc" : "Mouse over tip", + "desc" : "The field's HTML name attribute.", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] diff --git a/docs/symbols/Roo.form.Hidden.json b/docs/symbols/Roo.form.Hidden.json index ec05c3e658..5be2ede0d8 100644 --- a/docs/symbols/Roo.form.Hidden.json +++ b/docs/symbols/Roo.form.Hidden.json @@ -196,6 +196,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "cls", "type" : "String", diff --git a/docs/symbols/Roo.form.HtmlEditor.json b/docs/symbols/Roo.form.HtmlEditor.json index ad57f63f1c..8d13be1b55 100644 --- a/docs/symbols/Roo.form.HtmlEditor.json +++ b/docs/symbols/Roo.form.HtmlEditor.json @@ -188,6 +188,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "cls", "type" : "String", diff --git a/docs/symbols/Roo.form.MonthField.json b/docs/symbols/Roo.form.MonthField.json index e2171b0e62..e4c7bc1d35 100644 --- a/docs/symbols/Roo.form.MonthField.json +++ b/docs/symbols/Roo.form.MonthField.json @@ -285,6 +285,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "cls", "type" : "String", diff --git a/docs/symbols/Roo.form.NumberField.json b/docs/symbols/Roo.form.NumberField.json index 467eec66b5..f3265f0f01 100644 --- a/docs/symbols/Roo.form.NumberField.json +++ b/docs/symbols/Roo.form.NumberField.json @@ -268,6 +268,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "fieldClass", "type" : "String", diff --git a/docs/symbols/Roo.form.Radio.json b/docs/symbols/Roo.form.Radio.json index d41ae41913..506e833e95 100644 --- a/docs/symbols/Roo.form.Radio.json +++ b/docs/symbols/Roo.form.Radio.json @@ -132,6 +132,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "tabIndex", "type" : "Number", @@ -253,17 +261,17 @@ "optvals" : [] }, { - "name" : "name", + "name" : "qtip", "type" : "String", - "desc" : "The field's HTML name attribute.", + "desc" : "Mouse over tip", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] }, { - "name" : "qtip", + "name" : "name", "type" : "String", - "desc" : "Mouse over tip", + "desc" : "The field's HTML name attribute.", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] diff --git a/docs/symbols/Roo.form.Select.json b/docs/symbols/Roo.form.Select.json index 58c7ead8a9..667680710d 100644 --- a/docs/symbols/Roo.form.Select.json +++ b/docs/symbols/Roo.form.Select.json @@ -373,6 +373,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "validateOnBlur", "type" : "Boolean", diff --git a/docs/symbols/Roo.form.Signature.json b/docs/symbols/Roo.form.Signature.json index 7d6a35ed04..6a35582100 100644 --- a/docs/symbols/Roo.form.Signature.json +++ b/docs/symbols/Roo.form.Signature.json @@ -131,6 +131,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "tabIndex", "type" : "Number", @@ -228,17 +236,17 @@ "optvals" : [] }, { - "name" : "name", + "name" : "qtip", "type" : "String", - "desc" : "The field's HTML name attribute.", + "desc" : "Mouse over tip", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] }, { - "name" : "qtip", + "name" : "name", "type" : "String", - "desc" : "Mouse over tip", + "desc" : "The field's HTML name attribute.", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] diff --git a/docs/symbols/Roo.form.TextArea.json b/docs/symbols/Roo.form.TextArea.json index 0277424320..7a1683c2e9 100644 --- a/docs/symbols/Roo.form.TextArea.json +++ b/docs/symbols/Roo.form.TextArea.json @@ -209,17 +209,25 @@ "optvals" : [] }, { - "name" : "validateOnBlur", - "type" : "Boolean", - "desc" : "Whether the field should validate when it loses focus (defaults to true).", + "name" : "cls", + "type" : "String", + "desc" : "A CSS class to apply to the field's underlying element.", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] }, { - "name" : "cls", + "name" : "labelSeparator", "type" : "String", - "desc" : "A CSS class to apply to the field's underlying element.", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, + { + "name" : "validateOnBlur", + "type" : "Boolean", + "desc" : "Whether the field should validate when it loses focus (defaults to true).", "memberOf" : "Roo.form.Field", "isOptional" : false, "optvals" : [] diff --git a/docs/symbols/Roo.form.TextField.json b/docs/symbols/Roo.form.TextField.json index 3cd09c5997..d8ccce4d99 100644 --- a/docs/symbols/Roo.form.TextField.json +++ b/docs/symbols/Roo.form.TextField.json @@ -216,6 +216,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "cls", "type" : "String", diff --git a/docs/symbols/Roo.form.TriggerField.json b/docs/symbols/Roo.form.TriggerField.json index b8ce86c1a6..4e87b9f4bf 100644 --- a/docs/symbols/Roo.form.TriggerField.json +++ b/docs/symbols/Roo.form.TriggerField.json @@ -231,6 +231,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "labelSeparator", + "type" : "String", + "desc" : "the ':' after a field label (default :) = set it to empty string to hide the field label.", + "memberOf" : "Roo.form.Field", + "isOptional" : false, + "optvals" : [] + }, { "name" : "validateOnBlur", "type" : "Boolean", -- 2.39.2