roojs-core.js
authorleon <leon@roojs.com>
Mon, 25 Sep 2023 03:16:49 +0000 (11:16 +0800)
committerleon <leon@roojs.com>
Mon, 25 Sep 2023 03:16:49 +0000 (11:16 +0800)
roojs-core-debug.js
roojs-ui.js
roojs-ui-debug.js
roojs-all.js
roojs-debug.js

roojs-all.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index 29bf442..72a2f0d 100644 (file)
@@ -2019,8 +2019,9 @@ A.editorcore.onEditorEvent();}},xns:C.Toolbar},{xtype:'ComboBox',allowBlank:fals
 ,align:this.align,cn:[A]};if(this.caption_display=='block'){B['cn'].push({tag:'figcaption',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:this.width=='100%'?this.caption_align:'left'},align:'left',cn:[{tag:'i',contenteditable:Roo.htmleditor.BlockFigure.caption_edit,html:this.caption.length?this.caption:"Caption"}
 ]}]});}return B;},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');this.caption_display=this.getVal(A,true,'data-caption-display');
-if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');}this.caption_align=this.getVal(A,true,'data-caption-align');var B=this.getVal(A,'figcaption',false);if(B!==''){this.caption=this.getVal(B,'i','html');}var dc=this.getVal(A,true,'data-caption');
-if(this.caption_display=='none'&&dc&&dc.length){this.caption=dc;}this.width=this.getVal(A,true,'data-width');},removeNode:function(){return this.node;}});Roo.apply(Roo.htmleditor.BlockFigure,{caption_edit:true});
+if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');}this.caption_align=this.getVal(A,'figcaption','data-caption-align');Roo.log('READ CAPTION ALIGN');Roo.log(this.caption_align);var B=this.getVal(A,'figcaption',false);
+if(B!==''){this.caption=this.getVal(B,'i','html');}var dc=this.getVal(A,true,'data-caption');if(this.caption_display=='none'&&dc&&dc.length){this.caption=dc;}this.width=this.getVal(A,true,'data-width');},removeNode:function(){return this.node;}});Roo.apply(Roo.htmleditor.BlockFigure,{caption_edit:true}
+);
 // 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<this.no_row;r++){this.rows[r]=[];for(var c=0;c<this.no_col;c++){this.rows[r][c]=this.emptyCell();
 }}}};Roo.extend(Roo.htmleditor.BlockTable,Roo.htmleditor.Block,{rows:false,no_col:1,no_row:1,width:'100%',friendly_name:'Table',deleteTitle:'Delete Table',contextMenu:function(A){var B=function(){return Roo.htmleditor.Block.factory(A.tb.selectedNode);};var C=typeof(Roo.bootstrap)=='undefined'?Roo:Roo.bootstrap;
index 3cb422c..e97a21e 100644 (file)
@@ -48286,6 +48286,7 @@ Roo.htmleditor.Block.prototype = {
  * @cfg {String} align (left|right) alignment for the block default left
  * @cfg {String} caption the text to appear below  (and in the alt tag)
  * @cfg {String} caption_display (block|none) display or not the caption
+ * @cfg {String} caption_align {left|right} alignment for the figcaption default left
  * @cfg {String|number} image_width the width of the image number or %?
  * @cfg {String|number} image_height the height of the image number or %?
  * 
@@ -48731,7 +48732,10 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
             this.caption_display = this.getVal(node, 'figcaption', 'data-display');
         }
 
-        this.caption_align = this.getVal(node, true, 'data-caption-align');
+        this.caption_align = this.getVal(node, 'figcaption', 'data-caption-align');
+
+        Roo.log('READ CAPTION ALIGN');
+        Roo.log(this.caption_align);
 
         // read caption from figcaption
         var figcaption = this.getVal(node, 'figcaption', false);
index 458ab4f..de568d9 100644 (file)
@@ -23784,6 +23784,7 @@ Roo.htmleditor.Block.prototype = {
  * @cfg {String} align (left|right) alignment for the block default left
  * @cfg {String} caption the text to appear below  (and in the alt tag)
  * @cfg {String} caption_display (block|none) display or not the caption
+ * @cfg {String} caption_align {left|right} alignment for the figcaption default left
  * @cfg {String|number} image_width the width of the image number or %?
  * @cfg {String|number} image_height the height of the image number or %?
  * 
@@ -24229,7 +24230,10 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
             this.caption_display = this.getVal(node, 'figcaption', 'data-display');
         }
 
-        this.caption_align = this.getVal(node, true, 'data-caption-align');
+        this.caption_align = this.getVal(node, 'figcaption', 'data-caption-align');
+
+        Roo.log('READ CAPTION ALIGN');
+        Roo.log(this.caption_align);
 
         // read caption from figcaption
         var figcaption = this.getVal(node, 'figcaption', false);
index dbb8659..b33c236 100644 (file)
@@ -1072,8 +1072,9 @@ A.editorcore.onEditorEvent();}},xns:C.Toolbar},{xtype:'ComboBox',allowBlank:fals
 ,align:this.align,cn:[A]};if(this.caption_display=='block'){B['cn'].push({tag:'figcaption',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:this.width=='100%'?this.caption_align:'left'},align:'left',cn:[{tag:'i',contenteditable:Roo.htmleditor.BlockFigure.caption_edit,html:this.caption.length?this.caption:"Caption"}
 ]}]});}return B;},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');this.caption_display=this.getVal(A,true,'data-caption-display');
-if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');}this.caption_align=this.getVal(A,true,'data-caption-align');var B=this.getVal(A,'figcaption',false);if(B!==''){this.caption=this.getVal(B,'i','html');}var dc=this.getVal(A,true,'data-caption');
-if(this.caption_display=='none'&&dc&&dc.length){this.caption=dc;}this.width=this.getVal(A,true,'data-width');},removeNode:function(){return this.node;}});Roo.apply(Roo.htmleditor.BlockFigure,{caption_edit:true});
+if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');}this.caption_align=this.getVal(A,'figcaption','data-caption-align');Roo.log('READ CAPTION ALIGN');Roo.log(this.caption_align);var B=this.getVal(A,'figcaption',false);
+if(B!==''){this.caption=this.getVal(B,'i','html');}var dc=this.getVal(A,true,'data-caption');if(this.caption_display=='none'&&dc&&dc.length){this.caption=dc;}this.width=this.getVal(A,true,'data-width');},removeNode:function(){return this.node;}});Roo.apply(Roo.htmleditor.BlockFigure,{caption_edit:true}
+);
 // 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<this.no_row;r++){this.rows[r]=[];for(var c=0;c<this.no_col;c++){this.rows[r][c]=this.emptyCell();
 }}}};Roo.extend(Roo.htmleditor.BlockTable,Roo.htmleditor.Block,{rows:false,no_col:1,no_row:1,width:'100%',friendly_name:'Table',deleteTitle:'Delete Table',contextMenu:function(A){var B=function(){return Roo.htmleditor.Block.factory(A.tb.selectedNode);};var C=typeof(Roo.bootstrap)=='undefined'?Roo:Roo.bootstrap;