From: Alan Date: Tue, 15 Aug 2023 04:15:53 +0000 (+0800) Subject: fix #7771 - prefer the caption content for the value, over the data-caption value X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=f1652ebb6a8635cd6d62fad269495a5275a8a763 fix #7771 - prefer the caption content for the value, over the data-caption value --- diff --git a/docs/src/Roo_bootstrap_form_DateField.js.html b/docs/src/Roo_bootstrap_form_DateField.js.html index ecd83b4a6e..105f19a4c7 100644 --- a/docs/src/Roo_bootstrap_form_DateField.js.html +++ b/docs/src/Roo_bootstrap_form_DateField.js.html @@ -186,7 +186,7 @@ } translation.months.push(month); - translation/monthsShort.push(monthShort); + translation.monthsShort.push(monthShort); } }, diff --git a/docs/src/Roo_bootstrap_form_TimeField.js.html b/docs/src/Roo_bootstrap_form_TimeField.js.html index 6c228ac346..0fc421bd81 100644 --- a/docs/src/Roo_bootstrap_form_TimeField.js.html +++ b/docs/src/Roo_bootstrap_form_TimeField.js.html @@ -292,11 +292,11 @@ update: function() { // default minute is a multiple of minuteStep - if(typeof(this.time) === 'undefined') { + if(typeof(this.time) === 'undefined' || this.time.length == 0) { this.time = new Date(); this.time = this.time.add(Date.MINUTE, Math.round(parseInt(this.time.format('i')) / this.minuteStep) * this.minuteStep - parseInt(this.time.format('i'))); } - this.time = (typeof(this.time) === 'undefined') ? new Date() : this.time; + this.time = (typeof(this.time) === 'undefined' || this.time.length == 0) ? new Date() : this.time; this.fill(); }, diff --git a/docs/src/Roo_htmleditor_BlockFigure.js.html b/docs/src/Roo_htmleditor_BlockFigure.js.html index 4991c1e3c3..1fbf950d68 100644 --- a/docs/src/Roo_htmleditor_BlockFigure.js.html +++ b/docs/src/Roo_htmleditor_BlockFigure.js.html @@ -406,7 +406,7 @@ this.caption_display = this.getVal(node, 'figcaption', 'data-display'); var dc = this.getVal(node, true, 'data-caption'); - if (dc && dc.length) { + if (this.caption_display == 'none' && figcaption != '' && dc && dc.length) { this.caption = dc; } //this.text_align = this.getVal(node, 'figcaption', 'style','text-align'); diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 36753f305b..9de4f7fa3b 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -29788,7 +29788,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { this.caption_display = this.getVal(node, 'figcaption', 'data-display'); var dc = this.getVal(node, true, 'data-caption'); - if (dc && dc.length) { + if (this.caption_display == 'none' && figcaption != '' && dc && dc.length) { this.caption = dc; } //this.text_align = this.getVal(node, 'figcaption', 'style','text-align'); @@ -31065,7 +31065,7 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { * LGPL * */ - + /** * @class Roo.HtmlEditorCore * @extends Roo.Component diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 760dd67418..f58d8a128b 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1291,7 +1291,7 @@ var C={tag:'figure','data-block':'Figure','data-width':this.width,'data-caption' ,align:this.align,cn:[A,{tag:'figcaption','data-display':this.caption_display,style:{textAlign:'left',fontSize:'16px',lineHeight:'24px',display:this.caption_display,maxWidth:(this.align=='center'?this.width:'100%')+' !important',margin:m,width:this.align=='center'?this.width:'100%'} ,cls:this.cls.length>0?(this.cls+'-thumbnail'):'',cn:[{tag:'div',style:{marginTop:'16px',textAlign:'left'},align:'left',cn:[{tag:'i',contenteditable:true,html:B}]}]}]};return C;},readElement:function(A){this.video_url=this.getVal(A,'div','src');this.cls=this.getVal(A,'div','class'); this.href=this.getVal(A,'a','href');this.image_src=this.getVal(A,'img','src');this.align=this.getVal(A,'figure','align');var B=this.getVal(A,'figcaption',false);if(B!==''){this.caption=this.getVal(B,'i','html');}this.caption_display=this.getVal(A,'figcaption','data-display'); -var dc=this.getVal(A,true,'data-caption');if(dc&&dc.length){this.caption=dc;}this.width=this.getVal(A,true,'data-width');},removeNode:function(){return this.node;}}) +var dc=this.getVal(A,true,'data-caption');if(this.caption_display=='none'&&B!=''&&dc&&dc.length){this.caption=dc;}this.width=this.getVal(A,true,'data-width');},removeNode:function(){return this.node;}}) // Roo/htmleditor/BlockTable.js Roo.htmleditor.BlockTable=function(A){if(A.node){this.readElement(A.node);this.updateElement(A.node);}Roo.apply(this,A);if(!A.node){this.rows=[];for(var r=0;r