From 1cebb6d16aa3004663d63bdbc4d604fbcd8f2f5d Mon Sep 17 00:00:00 2001 From: Alan Date: Mon, 25 Apr 2022 11:31:54 +0800 Subject: [PATCH] Fix #7197 - fix form layout files and doc labelalign --- Roo/form/Column.js | 34 ++++ Roo/form/FieldSet.js | 41 +++++ Roo/form/Layout.js | 154 +---------------- Roo/form/Row.js | 77 +++++++++ buildSDK/dependancy_ui.txt | 3 + docs/json/roodata.json | 32 +++- docs/src/Roo_form_Column.js.html | 35 ++++ docs/src/Roo_form_FieldSet.js.html | 41 +++++ docs/src/Roo_form_Layout.js.html | 155 +----------------- docs/src/Roo_form_Row.js.html | 78 +++++++++ docs/symbols/Roo.form.Column.json | 8 +- docs/symbols/Roo.form.FieldSet.json | 8 +- docs/symbols/Roo.form.Layout.json | 8 +- docs/symbols/Roo.form.Row.json | 8 +- .../Roo.htmleditor.FilterFileWarning.json | 32 ++++ roojs-all.js | 12 +- roojs-debug.js | 4 +- roojs-ui-debug.js | 4 +- roojs-ui.js | 12 +- 19 files changed, 414 insertions(+), 332 deletions(-) create mode 100644 Roo/form/Column.js create mode 100644 Roo/form/FieldSet.js create mode 100644 Roo/form/Row.js create mode 100644 docs/src/Roo_form_Column.js.html create mode 100644 docs/src/Roo_form_FieldSet.js.html create mode 100644 docs/src/Roo_form_Row.js.html create mode 100644 docs/symbols/Roo.htmleditor.FilterFileWarning.json diff --git a/Roo/form/Column.js b/Roo/form/Column.js new file mode 100644 index 0000000000..3b9971fb21 --- /dev/null +++ b/Roo/form/Column.js @@ -0,0 +1,34 @@ + +/** + * @class Roo.form.Column + * @extends Roo.form.Layout + * @children Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem Roo.form.FieldSet + * Creates a column container for layout and rendering of fields in an {@link Roo.form.Form}. + * @constructor + * @param {Object} config Configuration options + */ +Roo.form.Column = function(config){ + Roo.form.Column.superclass.constructor.call(this, config); +}; + +Roo.extend(Roo.form.Column, Roo.form.Layout, { + /** + * @cfg {Number/String} width + * The fixed width of the column in pixels or CSS value (defaults to "auto") + */ + /** + * @cfg {String/Object} autoCreate + * A DomHelper element spec used to autocreate the column (defaults to {tag: 'div', cls: 'x-form-ct x-form-column'}) + */ + + // private + defaultAutoCreate : {tag: 'div', cls: 'x-form-ct x-form-column'}, + + // private + onRender : function(ct, position){ + Roo.form.Column.superclass.onRender.call(this, ct, position); + if(this.width){ + this.el.setWidth(this.width); + } + } +}); diff --git a/Roo/form/FieldSet.js b/Roo/form/FieldSet.js new file mode 100644 index 0000000000..56a7f965ab --- /dev/null +++ b/Roo/form/FieldSet.js @@ -0,0 +1,41 @@ + +/** + * @class Roo.form.FieldSet + * @extends Roo.form.Layout + * @children Roo.form.Column Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem + * Creates a fieldset container for layout and rendering of fields in an {@link Roo.form.Form}. + * @constructor + * @param {Object} config Configuration options + */ +Roo.form.FieldSet = function(config){ + Roo.form.FieldSet.superclass.constructor.call(this, config); +}; + +Roo.extend(Roo.form.FieldSet, Roo.form.Layout, { + /** + * @cfg {String} legend + * The text to display as the legend for the FieldSet (defaults to '') + */ + /** + * @cfg {String/Object} autoCreate + * A DomHelper element spec used to autocreate the fieldset (defaults to {tag: 'fieldset', cn: {tag:'legend'}}) + */ + + // private + defaultAutoCreate : {tag: 'fieldset', cn: {tag:'legend'}}, + + // private + onRender : function(ct, position){ + Roo.form.FieldSet.superclass.onRender.call(this, ct, position); + if(this.legend){ + this.setLegend(this.legend); + } + }, + + // private + setLegend : function(text){ + if(this.rendered){ + this.el.child('legend').update(text); + } + } +}); \ No newline at end of file diff --git a/Roo/form/Layout.js b/Roo/form/Layout.js index bea152474f..e9dbb44dfe 100644 --- a/Roo/form/Layout.js +++ b/Roo/form/Layout.js @@ -40,7 +40,7 @@ Roo.extend(Roo.form.Layout, Roo.Component, { * a function which returns such a specification. */ /** - * @cfg {String} labelAlign + * @cfg {String} labelAlign (left|top|right) * Valid values are "left," "top" and "right" (defaults to "left") */ /** @@ -160,155 +160,3 @@ Roo.extend(Roo.form.Layout, Roo.Component, { } }); -/** - * @class Roo.form.Column - * @extends Roo.form.Layout - * @children Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem Roo.form.FieldSet - * Creates a column container for layout and rendering of fields in an {@link Roo.form.Form}. - * @constructor - * @param {Object} config Configuration options - */ -Roo.form.Column = function(config){ - Roo.form.Column.superclass.constructor.call(this, config); -}; - -Roo.extend(Roo.form.Column, Roo.form.Layout, { - /** - * @cfg {Number/String} width - * The fixed width of the column in pixels or CSS value (defaults to "auto") - */ - /** - * @cfg {String/Object} autoCreate - * A DomHelper element spec used to autocreate the column (defaults to {tag: 'div', cls: 'x-form-ct x-form-column'}) - */ - - // private - defaultAutoCreate : {tag: 'div', cls: 'x-form-ct x-form-column'}, - - // private - onRender : function(ct, position){ - Roo.form.Column.superclass.onRender.call(this, ct, position); - if(this.width){ - this.el.setWidth(this.width); - } - } -}); - - -/** - * @class Roo.form.Row - * @extends Roo.form.Layout - * @children Roo.form.Column Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem Roo.form.FieldSet - * Creates a row container for layout and rendering of fields in an {@link Roo.form.Form}. - * @constructor - * @param {Object} config Configuration options - */ - - -Roo.form.Row = function(config){ - Roo.form.Row.superclass.constructor.call(this, config); -}; - -Roo.extend(Roo.form.Row, Roo.form.Layout, { - /** - * @cfg {Number/String} width - * The fixed width of the column in pixels or CSS value (defaults to "auto") - */ - /** - * @cfg {Number/String} height - * The fixed height of the column in pixels or CSS value (defaults to "auto") - */ - defaultAutoCreate : {tag: 'div', cls: 'x-form-ct x-form-row'}, - - padWidth : 20, - // private - onRender : function(ct, position){ - //console.log('row render'); - if(!this.rowTpl){ - var t = new Roo.Template( - '
', - '', - '
', - '
', - '
' - ); - t.disableFormats = true; - t.compile(); - Roo.form.Layout.prototype.rowTpl = t; - } - this.fieldTpl = this.rowTpl; - - //console.log('lw' + this.labelWidth +', la:' + this.labelAlign); - var labelWidth = 100; - - if ((this.labelAlign != 'top')) { - if (typeof this.labelWidth == 'number') { - labelWidth = this.labelWidth - } - this.padWidth = 20 + labelWidth; - - } - - Roo.form.Column.superclass.onRender.call(this, ct, position); - if(this.width){ - this.el.setWidth(this.width); - } - if(this.height){ - this.el.setHeight(this.height); - } - }, - - // private - renderField : function(f){ - f.fieldEl = this.fieldTpl.append(this.el, [ - f.id, f.fieldLabel, - f.labelStyle||this.labelStyle||'', - this.elementStyle||'', - typeof f.labelSeparator == 'undefined' ? this.labelSeparator : f.labelSeparator, - f.itemCls||this.itemCls||'', - f.width ? f.width + this.padWidth : 160 + this.padWidth - ],true); - } -}); - - -/** - * @class Roo.form.FieldSet - * @extends Roo.form.Layout - * @children Roo.form.Column Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem - * Creates a fieldset container for layout and rendering of fields in an {@link Roo.form.Form}. - * @constructor - * @param {Object} config Configuration options - */ -Roo.form.FieldSet = function(config){ - Roo.form.FieldSet.superclass.constructor.call(this, config); -}; - -Roo.extend(Roo.form.FieldSet, Roo.form.Layout, { - /** - * @cfg {String} legend - * The text to display as the legend for the FieldSet (defaults to '') - */ - /** - * @cfg {String/Object} autoCreate - * A DomHelper element spec used to autocreate the fieldset (defaults to {tag: 'fieldset', cn: {tag:'legend'}}) - */ - - // private - defaultAutoCreate : {tag: 'fieldset', cn: {tag:'legend'}}, - - // private - onRender : function(ct, position){ - Roo.form.FieldSet.superclass.onRender.call(this, ct, position); - if(this.legend){ - this.setLegend(this.legend); - } - }, - - // private - setLegend : function(text){ - if(this.rendered){ - this.el.child('legend').update(text); - } - } -}); \ No newline at end of file diff --git a/Roo/form/Row.js b/Roo/form/Row.js new file mode 100644 index 0000000000..2b3247b5df --- /dev/null +++ b/Roo/form/Row.js @@ -0,0 +1,77 @@ + +/** + * @class Roo.form.Row + * @extends Roo.form.Layout + * @children Roo.form.Column Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem Roo.form.FieldSet + * Creates a row container for layout and rendering of fields in an {@link Roo.form.Form}. + * @constructor + * @param {Object} config Configuration options + */ + + +Roo.form.Row = function(config){ + Roo.form.Row.superclass.constructor.call(this, config); +}; + +Roo.extend(Roo.form.Row, Roo.form.Layout, { + /** + * @cfg {Number/String} width + * The fixed width of the column in pixels or CSS value (defaults to "auto") + */ + /** + * @cfg {Number/String} height + * The fixed height of the column in pixels or CSS value (defaults to "auto") + */ + defaultAutoCreate : {tag: 'div', cls: 'x-form-ct x-form-row'}, + + padWidth : 20, + // private + onRender : function(ct, position){ + //console.log('row render'); + if(!this.rowTpl){ + var t = new Roo.Template( + '
', + '', + '
', + '
', + '
' + ); + t.disableFormats = true; + t.compile(); + Roo.form.Layout.prototype.rowTpl = t; + } + this.fieldTpl = this.rowTpl; + + //console.log('lw' + this.labelWidth +', la:' + this.labelAlign); + var labelWidth = 100; + + if ((this.labelAlign != 'top')) { + if (typeof this.labelWidth == 'number') { + labelWidth = this.labelWidth + } + this.padWidth = 20 + labelWidth; + + } + + Roo.form.Column.superclass.onRender.call(this, ct, position); + if(this.width){ + this.el.setWidth(this.width); + } + if(this.height){ + this.el.setHeight(this.height); + } + }, + + // private + renderField : function(f){ + f.fieldEl = this.fieldTpl.append(this.el, [ + f.id, f.fieldLabel, + f.labelStyle||this.labelStyle||'', + this.elementStyle||'', + typeof f.labelSeparator == 'undefined' ? this.labelSeparator : f.labelSeparator, + f.itemCls||this.itemCls||'', + f.width ? f.width + this.padWidth : 160 + this.padWidth + ],true); + } +}); + diff --git a/buildSDK/dependancy_ui.txt b/buildSDK/dependancy_ui.txt index 1a1846f884..5a8e5a9ac5 100644 --- a/buildSDK/dependancy_ui.txt +++ b/buildSDK/dependancy_ui.txt @@ -135,6 +135,9 @@ Roo.form.BasicForm Roo.form.Form Roo.form.Action Roo.form.Layout +Roo.form.Column +Roo.form.Row +Roo.form.FieldSet Roo.form.VTypes Roo.form.FCKeditor Roo.form.GridField diff --git a/docs/json/roodata.json b/docs/json/roodata.json index 2b6f3f40b2..883e834671 100644 --- a/docs/json/roodata.json +++ b/docs/json/roodata.json @@ -217048,10 +217048,14 @@ { "name" : "labelAlign", "type" : "String", - "desc" : "Valid values are \"left,\" \"top\" and \"right\" (defaults to \"left\")", + "desc" : "t)\nValid values are \"left,\" \"top\" and \"right\" (defaults to \"left", "memberOf" : "Roo.form.Layout", "isOptional" : false, - "optvals" : [] + "optvals" : [ + "left", + "top", + "right" + ] }, { "name" : "labelSeparator", @@ -241046,10 +241050,14 @@ { "name" : "labelAlign", "type" : "String", - "desc" : "Valid values are \"left,\" \"top\" and \"right\" (defaults to \"left\")", + "desc" : "t)\nValid values are \"left,\" \"top\" and \"right\" (defaults to \"left", "memberOf" : "Roo.form.Layout", "isOptional" : false, - "optvals" : [] + "optvals" : [ + "left", + "top", + "right" + ] }, { "name" : "labelSeparator", @@ -250426,10 +250434,14 @@ { "name" : "labelAlign", "type" : "String", - "desc" : "Valid values are \"left,\" \"top\" and \"right\" (defaults to \"left\")", + "desc" : "t)\nValid values are \"left,\" \"top\" and \"right\" (defaults to \"left", "memberOf" : "", "isOptional" : false, - "optvals" : [] + "optvals" : [ + "left", + "top", + "right" + ] }, { "name" : "labelSeparator", @@ -258132,10 +258144,14 @@ { "name" : "labelAlign", "type" : "String", - "desc" : "Valid values are \"left,\" \"top\" and \"right\" (defaults to \"left\")", + "desc" : "t)\nValid values are \"left,\" \"top\" and \"right\" (defaults to \"left", "memberOf" : "Roo.form.Layout", "isOptional" : false, - "optvals" : [] + "optvals" : [ + "left", + "top", + "right" + ] }, { "name" : "labelSeparator", diff --git a/docs/src/Roo_form_Column.js.html b/docs/src/Roo_form_Column.js.html new file mode 100644 index 0000000000..8f16da1e7e --- /dev/null +++ b/docs/src/Roo_form_Column.js.html @@ -0,0 +1,35 @@ +Roo/form/Column.js +/** + * @class Roo.form.Column + * @extends Roo.form.Layout + * @children Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem Roo.form.FieldSet + * Creates a column container for layout and rendering of fields in an {@link Roo.form.Form}. + * @constructor + * @param {Object} config Configuration options + */ +Roo.form.Column = function(config){ + Roo.form.Column.superclass.constructor.call(this, config); +}; + +Roo.extend(Roo.form.Column, Roo.form.Layout, { + /** + * @cfg {Number/String} width + * The fixed width of the column in pixels or CSS value (defaults to "auto") + */ + /** + * @cfg {String/Object} autoCreate + * A DomHelper element spec used to autocreate the column (defaults to {tag: 'div', cls: 'x-form-ct x-form-column'}) + */ + + // private + defaultAutoCreate : {tag: 'div', cls: 'x-form-ct x-form-column'}, + + // private + onRender : function(ct, position){ + Roo.form.Column.superclass.onRender.call(this, ct, position); + if(this.width){ + this.el.setWidth(this.width); + } + } +}); + \ No newline at end of file diff --git a/docs/src/Roo_form_FieldSet.js.html b/docs/src/Roo_form_FieldSet.js.html new file mode 100644 index 0000000000..63cd7042d2 --- /dev/null +++ b/docs/src/Roo_form_FieldSet.js.html @@ -0,0 +1,41 @@ +Roo/form/FieldSet.js +/** + * @class Roo.form.FieldSet + * @extends Roo.form.Layout + * @children Roo.form.Column Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem + * Creates a fieldset container for layout and rendering of fields in an {@link Roo.form.Form}. + * @constructor + * @param {Object} config Configuration options + */ +Roo.form.FieldSet = function(config){ + Roo.form.FieldSet.superclass.constructor.call(this, config); +}; + +Roo.extend(Roo.form.FieldSet, Roo.form.Layout, { + /** + * @cfg {String} legend + * The text to display as the legend for the FieldSet (defaults to '') + */ + /** + * @cfg {String/Object} autoCreate + * A DomHelper element spec used to autocreate the fieldset (defaults to {tag: 'fieldset', cn: {tag:'legend'}}) + */ + + // private + defaultAutoCreate : {tag: 'fieldset', cn: {tag:'legend'}}, + + // private + onRender : function(ct, position){ + Roo.form.FieldSet.superclass.onRender.call(this, ct, position); + if(this.legend){ + this.setLegend(this.legend); + } + }, + + // private + setLegend : function(text){ + if(this.rendered){ + this.el.child('legend').update(text); + } + } +}); \ No newline at end of file diff --git a/docs/src/Roo_form_Layout.js.html b/docs/src/Roo_form_Layout.js.html index 1dec91c98c..db1054f04c 100644 --- a/docs/src/Roo_form_Layout.js.html +++ b/docs/src/Roo_form_Layout.js.html @@ -40,7 +40,7 @@ * a function which returns such a specification. */ /** - * @cfg {String} labelAlign + * @cfg {String} labelAlign (left|top|right) * Valid values are "left," "top" and "right" (defaults to "left") */ /** @@ -160,155 +160,4 @@ } }); -/** - * @class Roo.form.Column - * @extends Roo.form.Layout - * @children Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem Roo.form.FieldSet - * Creates a column container for layout and rendering of fields in an {@link Roo.form.Form}. - * @constructor - * @param {Object} config Configuration options - */ -Roo.form.Column = function(config){ - Roo.form.Column.superclass.constructor.call(this, config); -}; - -Roo.extend(Roo.form.Column, Roo.form.Layout, { - /** - * @cfg {Number/String} width - * The fixed width of the column in pixels or CSS value (defaults to "auto") - */ - /** - * @cfg {String/Object} autoCreate - * A DomHelper element spec used to autocreate the column (defaults to {tag: 'div', cls: 'x-form-ct x-form-column'}) - */ - - // private - defaultAutoCreate : {tag: 'div', cls: 'x-form-ct x-form-column'}, - - // private - onRender : function(ct, position){ - Roo.form.Column.superclass.onRender.call(this, ct, position); - if(this.width){ - this.el.setWidth(this.width); - } - } -}); - - -/** - * @class Roo.form.Row - * @extends Roo.form.Layout - * @children Roo.form.Column Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem Roo.form.FieldSet - * Creates a row container for layout and rendering of fields in an {@link Roo.form.Form}. - * @constructor - * @param {Object} config Configuration options - */ - - -Roo.form.Row = function(config){ - Roo.form.Row.superclass.constructor.call(this, config); -}; - -Roo.extend(Roo.form.Row, Roo.form.Layout, { - /** - * @cfg {Number/String} width - * The fixed width of the column in pixels or CSS value (defaults to "auto") - */ - /** - * @cfg {Number/String} height - * The fixed height of the column in pixels or CSS value (defaults to "auto") - */ - defaultAutoCreate : {tag: 'div', cls: 'x-form-ct x-form-row'}, - - padWidth : 20, - // private - onRender : function(ct, position){ - //console.log('row render'); - if(!this.rowTpl){ - var t = new Roo.Template( - '<div class="x-form-item {5}" style="float:left;width:{6}px">', - '<label for="{0}" style="{2}">{1}{4}</label>', - '<div class="x-form-element" id="x-form-el-{0}" style="{3}">', - '</div>', - '</div>' - ); - t.disableFormats = true; - t.compile(); - Roo.form.Layout.prototype.rowTpl = t; - } - this.fieldTpl = this.rowTpl; - - //console.log('lw' + this.labelWidth +', la:' + this.labelAlign); - var labelWidth = 100; - - if ((this.labelAlign != 'top')) { - if (typeof this.labelWidth == 'number') { - labelWidth = this.labelWidth - } - this.padWidth = 20 + labelWidth; - - } - - Roo.form.Column.superclass.onRender.call(this, ct, position); - if(this.width){ - this.el.setWidth(this.width); - } - if(this.height){ - this.el.setHeight(this.height); - } - }, - - // private - renderField : function(f){ - f.fieldEl = this.fieldTpl.append(this.el, [ - f.id, f.fieldLabel, - f.labelStyle||this.labelStyle||'', - this.elementStyle||'', - typeof f.labelSeparator == 'undefined' ? this.labelSeparator : f.labelSeparator, - f.itemCls||this.itemCls||'', - f.width ? f.width + this.padWidth : 160 + this.padWidth - ],true); - } -}); - - -/** - * @class Roo.form.FieldSet - * @extends Roo.form.Layout - * @children Roo.form.Column Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem - * Creates a fieldset container for layout and rendering of fields in an {@link Roo.form.Form}. - * @constructor - * @param {Object} config Configuration options - */ -Roo.form.FieldSet = function(config){ - Roo.form.FieldSet.superclass.constructor.call(this, config); -}; - -Roo.extend(Roo.form.FieldSet, Roo.form.Layout, { - /** - * @cfg {String} legend - * The text to display as the legend for the FieldSet (defaults to '') - */ - /** - * @cfg {String/Object} autoCreate - * A DomHelper element spec used to autocreate the fieldset (defaults to {tag: 'fieldset', cn: {tag:'legend'}}) - */ - - // private - defaultAutoCreate : {tag: 'fieldset', cn: {tag:'legend'}}, - - // private - onRender : function(ct, position){ - Roo.form.FieldSet.superclass.onRender.call(this, ct, position); - if(this.legend){ - this.setLegend(this.legend); - } - }, - - // private - setLegend : function(text){ - if(this.rendered){ - this.el.child('legend').update(text); - } - } -}); \ No newline at end of file + \ No newline at end of file diff --git a/docs/src/Roo_form_Row.js.html b/docs/src/Roo_form_Row.js.html new file mode 100644 index 0000000000..3253955e75 --- /dev/null +++ b/docs/src/Roo_form_Row.js.html @@ -0,0 +1,78 @@ +Roo/form/Row.js +/** + * @class Roo.form.Row + * @extends Roo.form.Layout + * @children Roo.form.Column Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem Roo.form.FieldSet + * Creates a row container for layout and rendering of fields in an {@link Roo.form.Form}. + * @constructor + * @param {Object} config Configuration options + */ + + +Roo.form.Row = function(config){ + Roo.form.Row.superclass.constructor.call(this, config); +}; + +Roo.extend(Roo.form.Row, Roo.form.Layout, { + /** + * @cfg {Number/String} width + * The fixed width of the column in pixels or CSS value (defaults to "auto") + */ + /** + * @cfg {Number/String} height + * The fixed height of the column in pixels or CSS value (defaults to "auto") + */ + defaultAutoCreate : {tag: 'div', cls: 'x-form-ct x-form-row'}, + + padWidth : 20, + // private + onRender : function(ct, position){ + //console.log('row render'); + if(!this.rowTpl){ + var t = new Roo.Template( + '<div class="x-form-item {5}" style="float:left;width:{6}px">', + '<label for="{0}" style="{2}">{1}{4}</label>', + '<div class="x-form-element" id="x-form-el-{0}" style="{3}">', + '</div>', + '</div>' + ); + t.disableFormats = true; + t.compile(); + Roo.form.Layout.prototype.rowTpl = t; + } + this.fieldTpl = this.rowTpl; + + //console.log('lw' + this.labelWidth +', la:' + this.labelAlign); + var labelWidth = 100; + + if ((this.labelAlign != 'top')) { + if (typeof this.labelWidth == 'number') { + labelWidth = this.labelWidth + } + this.padWidth = 20 + labelWidth; + + } + + Roo.form.Column.superclass.onRender.call(this, ct, position); + if(this.width){ + this.el.setWidth(this.width); + } + if(this.height){ + this.el.setHeight(this.height); + } + }, + + // private + renderField : function(f){ + f.fieldEl = this.fieldTpl.append(this.el, [ + f.id, f.fieldLabel, + f.labelStyle||this.labelStyle||'', + this.elementStyle||'', + typeof f.labelSeparator == 'undefined' ? this.labelSeparator : f.labelSeparator, + f.itemCls||this.itemCls||'', + f.width ? f.width + this.padWidth : 160 + this.padWidth + ],true); + } +}); + + \ No newline at end of file diff --git a/docs/symbols/Roo.form.Column.json b/docs/symbols/Roo.form.Column.json index 50c0bcb0bb..8d9a5f7c3e 100644 --- a/docs/symbols/Roo.form.Column.json +++ b/docs/symbols/Roo.form.Column.json @@ -63,10 +63,14 @@ { "name" : "labelAlign", "type" : "String", - "desc" : "Valid values are \"left,\" \"top\" and \"right\" (defaults to \"left\")", + "desc" : "t)\nValid values are \"left,\" \"top\" and \"right\" (defaults to \"left", "memberOf" : "Roo.form.Layout", "isOptional" : false, - "optvals" : [] + "optvals" : [ + "left", + "top", + "right" + ] }, { "name" : "listeners", diff --git a/docs/symbols/Roo.form.FieldSet.json b/docs/symbols/Roo.form.FieldSet.json index 19bc1d66f6..f8fb804b20 100644 --- a/docs/symbols/Roo.form.FieldSet.json +++ b/docs/symbols/Roo.form.FieldSet.json @@ -63,10 +63,14 @@ { "name" : "labelAlign", "type" : "String", - "desc" : "Valid values are \"left,\" \"top\" and \"right\" (defaults to \"left\")", + "desc" : "t)\nValid values are \"left,\" \"top\" and \"right\" (defaults to \"left", "memberOf" : "Roo.form.Layout", "isOptional" : false, - "optvals" : [] + "optvals" : [ + "left", + "top", + "right" + ] }, { "name" : "listeners", diff --git a/docs/symbols/Roo.form.Layout.json b/docs/symbols/Roo.form.Layout.json index e0365c2b85..33cd2a41f8 100644 --- a/docs/symbols/Roo.form.Layout.json +++ b/docs/symbols/Roo.form.Layout.json @@ -69,10 +69,14 @@ { "name" : "labelAlign", "type" : "String", - "desc" : "Valid values are \"left,\" \"top\" and \"right\" (defaults to \"left\")", + "desc" : "t)\nValid values are \"left,\" \"top\" and \"right\" (defaults to \"left", "memberOf" : "", "isOptional" : false, - "optvals" : [] + "optvals" : [ + "left", + "top", + "right" + ] }, { "name" : "listeners", diff --git a/docs/symbols/Roo.form.Row.json b/docs/symbols/Roo.form.Row.json index 938d380858..72746ebec6 100644 --- a/docs/symbols/Roo.form.Row.json +++ b/docs/symbols/Roo.form.Row.json @@ -64,10 +64,14 @@ { "name" : "labelAlign", "type" : "String", - "desc" : "Valid values are \"left,\" \"top\" and \"right\" (defaults to \"left\")", + "desc" : "t)\nValid values are \"left,\" \"top\" and \"right\" (defaults to \"left", "memberOf" : "Roo.form.Layout", "isOptional" : false, - "optvals" : [] + "optvals" : [ + "left", + "top", + "right" + ] }, { "name" : "listeners", diff --git a/docs/symbols/Roo.htmleditor.FilterFileWarning.json b/docs/symbols/Roo.htmleditor.FilterFileWarning.json new file mode 100644 index 0000000000..d05a9152d9 --- /dev/null +++ b/docs/symbols/Roo.htmleditor.FilterFileWarning.json @@ -0,0 +1,32 @@ +{ + "name" : "Roo.htmleditor.FilterFileWarning", + "augments" : [], + "childClasses" : { }, + "tree_children" : [], + "tree_parent" : [], + "desc" : "clean attributes and styles including http:// etc.. in attribute", + "isSingleton" : false, + "isStatic" : false, + "isBuiltin" : false, + "isAbstract" : false, + "isBuilderTop" : false, + "memberOf" : "FilterFileWarning", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "config", + "type" : "Object", + "desc" : "Configuration options", + "isOptional" : false + } + ], + "returns" : [], + "throws" : "", + "requires" : "", + "config" : [], + "methods" : [], + "events" : [] +} \ No newline at end of file diff --git a/roojs-all.js b/roojs-all.js index 12958c71a8..9d9fc1f28f 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -2287,11 +2287,17 @@ Roo.form.Layout=function(A){var B=[];if(A.items){B=A.items;delete A.items;}Roo.f }if(this.labelAlign=='top'){this.labelStyle="width:auto;";this.elementStyle="padding-left:0;";}}var C=this.stack;var D=C.length;if(D>0){if(!this.fieldTpl){var t=new Roo.Template('
','','
','
','
'); t.disableFormats=true;t.compile();Roo.form.Layout.prototype.fieldTpl=t;}for(var i=0;i','','
','
',''); +}); +// Roo/form/Column.js +Roo.form.Column=function(A){Roo.form.Column.superclass.constructor.call(this,A);};Roo.extend(Roo.form.Column,Roo.form.Layout,{defaultAutoCreate:{tag:'div',cls:'x-form-ct x-form-column'},onRender:function(ct,A){Roo.form.Column.superclass.onRender.call(this,ct,A); +if(this.width){this.el.setWidth(this.width);}}}); +// Roo/form/Row.js +Roo.form.Row=function(A){Roo.form.Row.superclass.constructor.call(this,A);};Roo.extend(Roo.form.Row,Roo.form.Layout,{defaultAutoCreate:{tag:'div',cls:'x-form-ct x-form-row'},padWidth:20,onRender:function(ct,A){if(!this.rowTpl){var t=new Roo.Template('
','','
','
','
'); t.disableFormats=true;t.compile();Roo.form.Layout.prototype.rowTpl=t;}this.fieldTpl=this.rowTpl;var B=100;if((this.labelAlign!='top')){if(typeof this.labelWidth=='number'){B=this.labelWidth}this.padWidth=20+B;}Roo.form.Column.superclass.onRender.call(this,ct,A); if(this.width){this.el.setWidth(this.width);}if(this.height){this.el.setHeight(this.height);}},renderField:function(f){f.fieldEl=this.fieldTpl.append(this.el,[f.id,f.fieldLabel,f.labelStyle||this.labelStyle||'',this.elementStyle||'',typeof f.labelSeparator=='undefined'?this.labelSeparator:f.labelSeparator,f.itemCls||this.itemCls||'',f.width?f.width+this.padWidth:160+this.padWidth],true); -}});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); +}}); +// Roo/form/FieldSet.js +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); diff --git a/roojs-debug.js b/roojs-debug.js index 4e8aca4c3f..5e539c7e68 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -55301,7 +55301,7 @@ Roo.extend(Roo.form.Layout, Roo.Component, { * a function which returns such a specification. */ /** - * @cfg {String} labelAlign + * @cfg {String} labelAlign (left|top|right) * Valid values are "left," "top" and "right" (defaults to "left") */ /** @@ -55421,6 +55421,7 @@ Roo.extend(Roo.form.Layout, Roo.Component, { } }); + /** * @class Roo.form.Column * @extends Roo.form.Layout @@ -55455,7 +55456,6 @@ Roo.extend(Roo.form.Column, Roo.form.Layout, { } }); - /** * @class Roo.form.Row * @extends Roo.form.Layout diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index a25511bd64..4458d38422 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -30809,7 +30809,7 @@ Roo.extend(Roo.form.Layout, Roo.Component, { * a function which returns such a specification. */ /** - * @cfg {String} labelAlign + * @cfg {String} labelAlign (left|top|right) * Valid values are "left," "top" and "right" (defaults to "left") */ /** @@ -30929,6 +30929,7 @@ Roo.extend(Roo.form.Layout, Roo.Component, { } }); + /** * @class Roo.form.Column * @extends Roo.form.Layout @@ -30963,7 +30964,6 @@ Roo.extend(Roo.form.Column, Roo.form.Layout, { } }); - /** * @class Roo.form.Row * @extends Roo.form.Layout diff --git a/roojs-ui.js b/roojs-ui.js index a47d1b6c76..98443d0ddf 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -1341,11 +1341,17 @@ Roo.form.Layout=function(A){var B=[];if(A.items){B=A.items;delete A.items;}Roo.f }if(this.labelAlign=='top'){this.labelStyle="width:auto;";this.elementStyle="padding-left:0;";}}var C=this.stack;var D=C.length;if(D>0){if(!this.fieldTpl){var t=new Roo.Template('
','','
','
','
'); t.disableFormats=true;t.compile();Roo.form.Layout.prototype.fieldTpl=t;}for(var i=0;i','','
','
',''); +}); +// Roo/form/Column.js +Roo.form.Column=function(A){Roo.form.Column.superclass.constructor.call(this,A);};Roo.extend(Roo.form.Column,Roo.form.Layout,{defaultAutoCreate:{tag:'div',cls:'x-form-ct x-form-column'},onRender:function(ct,A){Roo.form.Column.superclass.onRender.call(this,ct,A); +if(this.width){this.el.setWidth(this.width);}}}); +// Roo/form/Row.js +Roo.form.Row=function(A){Roo.form.Row.superclass.constructor.call(this,A);};Roo.extend(Roo.form.Row,Roo.form.Layout,{defaultAutoCreate:{tag:'div',cls:'x-form-ct x-form-row'},padWidth:20,onRender:function(ct,A){if(!this.rowTpl){var t=new Roo.Template('
','','
','
','
'); t.disableFormats=true;t.compile();Roo.form.Layout.prototype.rowTpl=t;}this.fieldTpl=this.rowTpl;var B=100;if((this.labelAlign!='top')){if(typeof this.labelWidth=='number'){B=this.labelWidth}this.padWidth=20+B;}Roo.form.Column.superclass.onRender.call(this,ct,A); if(this.width){this.el.setWidth(this.width);}if(this.height){this.el.setHeight(this.height);}},renderField:function(f){f.fieldEl=this.fieldTpl.append(this.el,[f.id,f.fieldLabel,f.labelStyle||this.labelStyle||'',this.elementStyle||'',typeof f.labelSeparator=='undefined'?this.labelSeparator:f.labelSeparator,f.itemCls||this.itemCls||'',f.width?f.width+this.padWidth:160+this.padWidth],true); -}});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); +}}); +// Roo/form/FieldSet.js +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); -- 2.39.2