From a4731897f6fa72bebc326910310b0630b2ce26df Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 17 Nov 2022 17:29:37 +0800 Subject: [PATCH] support cdata wrappers on enclosed html return --- docs/json/roodata.json | 8 ++++++++ docs/src/Roo_bootstrap_Table.js.html | 9 ++++++++- docs/src/Roo_bootstrap_Tooltip.js.html | 11 +++++++++++ docs/src/Roo_bootstrap_form_Input.js.html | 6 +++--- docs/src/Roo_form_Action.js.html | 8 +++++++- docs/symbols/Roo.bootstrap.Table.json | 8 ++++++++ roojs-bootstrap-debug.js | 14 ++++++++++---- roojs-bootstrap.js | 11 ++++++----- 8 files changed, 61 insertions(+), 14 deletions(-) diff --git a/docs/json/roodata.json b/docs/json/roodata.json index 5296558a7e..bcbe5e3a28 100644 --- a/docs/json/roodata.json +++ b/docs/json/roodata.json @@ -107573,6 +107573,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "disableAutoSize", + "type" : "Boolean", + "desc" : "disable autoSize() and initCSS()", + "memberOf" : "", + "isOptional" : false, + "optvals" : [] + }, { "name" : "disableClass", "type" : "String", diff --git a/docs/src/Roo_bootstrap_Table.js.html b/docs/src/Roo_bootstrap_Table.js.html index 3d8d38c31a..e25ab4d9a1 100644 --- a/docs/src/Roo_bootstrap_Table.js.html +++ b/docs/src/Roo_bootstrap_Table.js.html @@ -88,6 +88,7 @@ Currently the Table uses multiple headers to try and handle XL / Medium etc... * @cfg {Boolean} lazyLoad auto load data while scrolling to the end (default false) * @cfg {Boolean} auto_hide_footer auto hide footer if only one page (default false) * @cfg {Boolean} enableColumnResize default true if columns can be resized = needs scrollBody to be set to work (drag/drop) + * @cfg {Boolean} disableAutoSize disable autoSize() and initCSS() * * * @cfg {Number} minColumnWidth default 50 pixels minimum column width @@ -265,6 +266,7 @@ Currently the Table uses multiple headers to try and handle XL / Medium etc... footerShow : true, headerShow : true, enableColumnResize: true, + disableAutoSize: false, rowSelection : false, cellSelection : false, @@ -426,7 +428,9 @@ Currently the Table uses multiple headers to try and handle XL / Medium etc... initCSS : function() { - + if(this.disableAutoSize) { + return; + } var cm = this.cm, styles = []; this.CSS.removeStyleSheet(this.id + '-cssrules'); @@ -1430,6 +1434,9 @@ Currently the Table uses multiple headers to try and handle XL / Medium etc... */ autoSize : function() { + if(this.disableAutoSize) { + return; + } //var ctr = Roo.get(this.container.dom.parentElement); var ctr = Roo.get(this.el.dom); diff --git a/docs/src/Roo_bootstrap_Tooltip.js.html b/docs/src/Roo_bootstrap_Tooltip.js.html index 249b3fd34b..99758e5817 100644 --- a/docs/src/Roo_bootstrap_Tooltip.js.html +++ b/docs/src/Roo_bootstrap_Tooltip.js.html @@ -246,10 +246,18 @@ this.el.removeClass(['fade','top','bottom', 'left', 'right','in', 'bs-tooltip-top','bs-tooltip-bottom', 'bs-tooltip-left', 'bs-tooltip-right']); + if(this.bindEl.attr('tooltip-class')) { + this.el.addClass(this.bindEl.attr('tooltip-class')); + } + var placement = typeof this.placement == 'function' ? this.placement.call(this, this.el, on_el) : this.placement; + if(this.bindEl.attr('tooltip-placement')) { + placement = this.bindEl.attr('tooltip-placement'); + } + var autoToken = /\s?auto?\s?/i; var autoPlace = autoToken.test(placement); if (autoPlace) { @@ -338,6 +346,9 @@ return; } //this.el.setXY([0,0]); + if(this.bindEl.attr('tooltip-class')) { + this.el.removeClass(this.bindEl.attr('tooltip-class')); + } this.el.removeClass(['show', 'in']); //this.el.hide(); diff --git a/docs/src/Roo_bootstrap_form_Input.js.html b/docs/src/Roo_bootstrap_form_Input.js.html index 80b3405df0..b330fd523f 100644 --- a/docs/src/Roo_bootstrap_form_Input.js.html +++ b/docs/src/Roo_bootstrap_form_Input.js.html @@ -707,12 +707,12 @@ } if(typeof this.validator == "function"){ var msg = this.validator(value); - if(msg !== true){ - return false; - } if (typeof(msg) == 'string') { this.invalidText = msg; } + if(msg !== true){ + return false; + } } if(this.regex && !this.regex.test(value)){ diff --git a/docs/src/Roo_form_Action.js.html b/docs/src/Roo_form_Action.js.html index 1a9f3cbd02..4adbc8b1df 100644 --- a/docs/src/Roo_form_Action.js.html +++ b/docs/src/Roo_form_Action.js.html @@ -289,7 +289,13 @@ } var ret = false; try { - ret = Roo.decode(response.responseText); + var rt = response.responseText; + if (rt.match(/^\<!--\[CDATA\[/)) { + rt = rt.replace(/^\<!--\[CDATA\[/,''); + rt = rt.replace(/\]\]--\>$/,''); + } + + ret = Roo.decode(rt); } catch (e) { ret = { success: false, diff --git a/docs/symbols/Roo.bootstrap.Table.json b/docs/symbols/Roo.bootstrap.Table.json index a0c9fbc036..6c6dffa55a 100644 --- a/docs/symbols/Roo.bootstrap.Table.json +++ b/docs/symbols/Roo.bootstrap.Table.json @@ -213,6 +213,14 @@ "isOptional" : false, "optvals" : [] }, + { + "name" : "disableAutoSize", + "type" : "Boolean", + "desc" : "disable autoSize() and initCSS()", + "memberOf" : "", + "isOptional" : false, + "optvals" : [] + }, { "name" : "lazyLoad", "type" : "Boolean", diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 41681fed64..8f4f9b513b 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -11284,7 +11284,13 @@ Roo.extend(Roo.form.Action.Submit, Roo.form.Action, { } var ret = false; try { - ret = Roo.decode(response.responseText); + var rt = response.responseText; + if (rt.match(/^\