roojs-ui.js
authorleon <leon@roojs.com>
Mon, 28 Aug 2023 03:06:16 +0000 (11:06 +0800)
committerleon <leon@roojs.com>
Mon, 28 Aug 2023 03:06:16 +0000 (11:06 +0800)
roojs-ui-debug.js
roojs-core.js
roojs-core-debug.js
roojs-all.js
roojs-debug.js
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index d5ff573..fd3f0da 100644 (file)
@@ -2016,9 +2016,9 @@ A.editorcore.onEditorEvent();}},xns:C.Toolbar}];},toObject:function(){var d=docu
 var C={tag:'figure','data-block':'Figure','data-width':this.width,'data-caption':this.caption,contenteditable:'false',style:{display:'block',float:this.align,maxWidth:this.align=='center'?'100% !important':(this.width+' !important'),width:this.align=='center'?'100%':this.width,margin:'0px',padding:this.align=='center'?'0':'0 10px',textAlign:this.align}
 ,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:Roo.htmleditor.BlockFigure.caption_edit,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');this.caption_display=this.getVal(A,true,'data-display');Roo.log('CAPTION DISPLAY');Roo.log(this.caption_display);
-if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');Roo.log(this.caption_display);}var B=this.getVal(A,'figcaption',false);Roo.log('CAPTION');if(B!==''){this.caption=this.getVal(B,'i','html');Roo.log(this.caption);
-}var dc=this.getVal(A,true,'data-caption');if(this.caption_display=='none'&&B!=''&&dc&&dc.length){this.caption=dc;Roo.log(this.caption);}this.width=this.getVal(A,true,'data-width');},removeNode:function(){return this.node;}});Roo.apply(Roo.htmleditor.BlockFigure,{caption_edit:true}
+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');Roo.log('CAPTION DISPLAY');Roo.log(this.caption_display);
+if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');}Roo.log(this.caption_display);var B=this.getVal(A,'figcaption',false);Roo.log('CAPTION');if(B!==''){this.caption=this.getVal(B,'i','html');Roo.log('FIGCAPTION');
+}Roo.log(this.caption);var dc=this.getVal(A,true,'data-caption');if(this.caption==''&&dc&&dc.length){this.caption=dc;Roo.log('DATA CAPTION');}Roo.log(this.caption);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();
index 11f8a40..17b26db 100644 (file)
@@ -29780,8 +29780,8 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
          
         this.align = this.getVal(node, 'figure', 'align');
 
-        // data-display is stored in figure
-        this.caption_display = this.getVal(node, true, 'data-display');
+        // caption display is stored in figure
+        this.caption_display = this.getVal(node, true, 'data-caption-display');
         Roo.log('CAPTION DISPLAY');
         Roo.log(this.caption_display);
 
@@ -29789,8 +29789,8 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
         // it was stored in figcaption
         if(this.caption_display == '') {
             this.caption_display = this.getVal(node, 'figcaption', 'data-display');
-            Roo.log(this.caption_display);
         }
+        Roo.log(this.caption_display);
 
         // read caption from figcaption
         var figcaption = this.getVal(node, 'figcaption', false);
@@ -29798,16 +29798,20 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
 
         if (figcaption !== '') {
             this.caption = this.getVal(figcaption, 'i', 'html');
-            Roo.log(this.caption);
+            Roo.log('FIGCAPTION');
         }
+        Roo.log(this.caption);
                 
 
-        // read caption from data-caption in figure if empty figcaption
+        // read caption from data-caption in figure if no caption from figcaption
         var dc = this.getVal(node, true, 'data-caption');
-        if (this.caption_display == 'none' && figcaption != '' && dc && dc.length) {
+        // if (this.caption_display == 'none' && figcaption != '' && dc && dc.length) {
+        if(this.caption == '' && dc && dc.length){
             this.caption = dc;
-            Roo.log(this.caption);
+            Roo.log('DATA CAPTION');
         }
+        Roo.log(this.caption);
+
         //this.text_align = this.getVal(node, 'figcaption', 'style','text-align');
         this.width = this.getVal(node, true, 'data-width');
         //this.margin = this.getVal(node, 'figure', 'style', 'margin');
index 7e4f69a..63e99b0 100644 (file)
@@ -1290,9 +1290,9 @@ A.editorcore.onEditorEvent();}},xns:C.Toolbar}];},toObject:function(){var d=docu
 var C={tag:'figure','data-block':'Figure','data-width':this.width,'data-caption':this.caption,contenteditable:'false',style:{display:'block',float:this.align,maxWidth:this.align=='center'?'100% !important':(this.width+' !important'),width:this.align=='center'?'100%':this.width,margin:'0px',padding:this.align=='center'?'0':'0 10px',textAlign:this.align}
 ,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:Roo.htmleditor.BlockFigure.caption_edit,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');this.caption_display=this.getVal(A,true,'data-display');Roo.log('CAPTION DISPLAY');Roo.log(this.caption_display);
-if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');Roo.log(this.caption_display);}var B=this.getVal(A,'figcaption',false);Roo.log('CAPTION');if(B!==''){this.caption=this.getVal(B,'i','html');Roo.log(this.caption);
-}var dc=this.getVal(A,true,'data-caption');if(this.caption_display=='none'&&B!=''&&dc&&dc.length){this.caption=dc;Roo.log(this.caption);}this.width=this.getVal(A,true,'data-width');},removeNode:function(){return this.node;}});Roo.apply(Roo.htmleditor.BlockFigure,{caption_edit:true}
+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');Roo.log('CAPTION DISPLAY');Roo.log(this.caption_display);
+if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');}Roo.log(this.caption_display);var B=this.getVal(A,'figcaption',false);Roo.log('CAPTION');if(B!==''){this.caption=this.getVal(B,'i','html');Roo.log('FIGCAPTION');
+}Roo.log(this.caption);var dc=this.getVal(A,true,'data-caption');if(this.caption==''&&dc&&dc.length){this.caption=dc;Roo.log('DATA CAPTION');}Roo.log(this.caption);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();
index 8a3d9cc..c312f1a 100644 (file)
@@ -48673,8 +48673,8 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
          
         this.align = this.getVal(node, 'figure', 'align');
 
-        // data-display is stored in figure
-        this.caption_display = this.getVal(node, true, 'data-display');
+        // caption display is stored in figure
+        this.caption_display = this.getVal(node, true, 'data-caption-display');
         Roo.log('CAPTION DISPLAY');
         Roo.log(this.caption_display);
 
@@ -48682,8 +48682,8 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
         // it was stored in figcaption
         if(this.caption_display == '') {
             this.caption_display = this.getVal(node, 'figcaption', 'data-display');
-            Roo.log(this.caption_display);
         }
+        Roo.log(this.caption_display);
 
         // read caption from figcaption
         var figcaption = this.getVal(node, 'figcaption', false);
@@ -48691,16 +48691,20 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
 
         if (figcaption !== '') {
             this.caption = this.getVal(figcaption, 'i', 'html');
-            Roo.log(this.caption);
+            Roo.log('FIGCAPTION');
         }
+        Roo.log(this.caption);
                 
 
-        // read caption from data-caption in figure if empty figcaption
+        // read caption from data-caption in figure if no caption from figcaption
         var dc = this.getVal(node, true, 'data-caption');
-        if (this.caption_display == 'none' && figcaption != '' && dc && dc.length) {
+        // if (this.caption_display == 'none' && figcaption != '' && dc && dc.length) {
+        if(this.caption == '' && dc && dc.length){
             this.caption = dc;
-            Roo.log(this.caption);
+            Roo.log('DATA CAPTION');
         }
+        Roo.log(this.caption);
+
         //this.text_align = this.getVal(node, 'figcaption', 'style','text-align');
         this.width = this.getVal(node, true, 'data-width');
         //this.margin = this.getVal(node, 'figure', 'style', 'margin');
index e90d72d..506af6a 100644 (file)
@@ -24171,8 +24171,8 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
          
         this.align = this.getVal(node, 'figure', 'align');
 
-        // data-display is stored in figure
-        this.caption_display = this.getVal(node, true, 'data-display');
+        // caption display is stored in figure
+        this.caption_display = this.getVal(node, true, 'data-caption-display');
         Roo.log('CAPTION DISPLAY');
         Roo.log(this.caption_display);
 
@@ -24180,8 +24180,8 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
         // it was stored in figcaption
         if(this.caption_display == '') {
             this.caption_display = this.getVal(node, 'figcaption', 'data-display');
-            Roo.log(this.caption_display);
         }
+        Roo.log(this.caption_display);
 
         // read caption from figcaption
         var figcaption = this.getVal(node, 'figcaption', false);
@@ -24189,16 +24189,20 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
 
         if (figcaption !== '') {
             this.caption = this.getVal(figcaption, 'i', 'html');
-            Roo.log(this.caption);
+            Roo.log('FIGCAPTION');
         }
+        Roo.log(this.caption);
                 
 
-        // read caption from data-caption in figure if empty figcaption
+        // read caption from data-caption in figure if no caption from figcaption
         var dc = this.getVal(node, true, 'data-caption');
-        if (this.caption_display == 'none' && figcaption != '' && dc && dc.length) {
+        // if (this.caption_display == 'none' && figcaption != '' && dc && dc.length) {
+        if(this.caption == '' && dc && dc.length){
             this.caption = dc;
-            Roo.log(this.caption);
+            Roo.log('DATA CAPTION');
         }
+        Roo.log(this.caption);
+
         //this.text_align = this.getVal(node, 'figcaption', 'style','text-align');
         this.width = this.getVal(node, true, 'data-width');
         //this.margin = this.getVal(node, 'figure', 'style', 'margin');
index 1aa6815..4294d68 100644 (file)
@@ -1069,9 +1069,9 @@ A.editorcore.onEditorEvent();}},xns:C.Toolbar}];},toObject:function(){var d=docu
 var C={tag:'figure','data-block':'Figure','data-width':this.width,'data-caption':this.caption,contenteditable:'false',style:{display:'block',float:this.align,maxWidth:this.align=='center'?'100% !important':(this.width+' !important'),width:this.align=='center'?'100%':this.width,margin:'0px',padding:this.align=='center'?'0':'0 10px',textAlign:this.align}
 ,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:Roo.htmleditor.BlockFigure.caption_edit,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');this.caption_display=this.getVal(A,true,'data-display');Roo.log('CAPTION DISPLAY');Roo.log(this.caption_display);
-if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');Roo.log(this.caption_display);}var B=this.getVal(A,'figcaption',false);Roo.log('CAPTION');if(B!==''){this.caption=this.getVal(B,'i','html');Roo.log(this.caption);
-}var dc=this.getVal(A,true,'data-caption');if(this.caption_display=='none'&&B!=''&&dc&&dc.length){this.caption=dc;Roo.log(this.caption);}this.width=this.getVal(A,true,'data-width');},removeNode:function(){return this.node;}});Roo.apply(Roo.htmleditor.BlockFigure,{caption_edit:true}
+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');Roo.log('CAPTION DISPLAY');Roo.log(this.caption_display);
+if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');}Roo.log(this.caption_display);var B=this.getVal(A,'figcaption',false);Roo.log('CAPTION');if(B!==''){this.caption=this.getVal(B,'i','html');Roo.log('FIGCAPTION');
+}Roo.log(this.caption);var dc=this.getVal(A,true,'data-caption');if(this.caption==''&&dc&&dc.length){this.caption=dc;Roo.log('DATA CAPTION');}Roo.log(this.caption);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();