roojs-bootstrap.js
authorAlan <alan@roojs.com>
Thu, 30 Dec 2021 04:13:52 +0000 (12:13 +0800)
committerAlan <alan@roojs.com>
Thu, 30 Dec 2021 04:13:52 +0000 (12:13 +0800)
roojs-bootstrap-debug.js
roojs-all.js
roojs-debug.js
Roo/htmleditor/BlockFigure.js

Roo/htmleditor/BlockFigure.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 3c4bd64..5bb5ef1 100644 (file)
@@ -143,7 +143,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                 xtype : 'TextField',
                 allowBlank : false,
                 width : 150,
-                name : 'src',
+                name : 'image_src',
                 listeners : {
                     change : function (combo, r, index)
                     {
index d485b24..fb5ef4c 100644 (file)
@@ -27077,7 +27077,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                 typeAhead : true,
                 valueField : 'val',
                 width : 100,
-                name : 'width',
+                name : 'align',
                 listeners : {
                     select : function (combo, r, index)
                     {
@@ -27109,8 +27109,8 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
             {
                 xtype : 'TextField',
                 allowBlank : false,
-                width : 100,
-                name : 'width',
+                width : 150,
+                name : 'src',
                 listeners : {
                     change : function (combo, r, index)
                     {
index 85f459a..e32244f 100644 (file)
@@ -1176,8 +1176,8 @@ Roo.htmleditor.Block=function(A){};Roo.htmleditor.Block.factory=function(A){var
 // Roo/htmleditor/BlockFigure.js
 Roo.htmleditor.BlockFigure=function(A){if(A.node){this.readElement(A.node);this.updateElement(A.node);}Roo.apply(this,A);};Roo.extend(Roo.htmleditor.BlockFigure,Roo.htmleditor.Block,{image_src:'',align:'center',caption:'',text_align:'left',width:'100%',margin:'2%',friendly_name:'Image with caption',deleteTitle:"Delete Image and Caption",contextMenu:function(A){var B=function(){return Roo.htmleditor.Block.factory(A.tb.selectedNode);
 };var C=typeof(Roo.bootstrap)=='undefined'?Roo:Roo.bootstrap;var D=A.editorcore.syncValue;var E={};return [{xtype:'TextItem',text:"Width: ",xns:C.Toolbar},{xtype:'ComboBox',allowBlank:false,displayField:'val',editable:true,listWidth:100,triggerAction:'all',typeAhead:true,valueField:'val',width:100,name:'width',listeners:{select:function(F,r,G){A.editorcore.selectNode(A.tb.selectedNode);
-var b=B();b.width=r.get('val');b.updateElement();D();A.editorcore.onEditorEvent();}},xns:C.form,store:{xtype:'SimpleStore',data:[['auto'],['50%'],['100%']],fields:['val'],xns:Roo.data}},{xtype:'TextItem',text:"Align: ",xns:C.Toolbar},{xtype:'ComboBox',allowBlank:false,displayField:'val',editable:true,listWidth:100,triggerAction:'all',typeAhead:true,valueField:'val',width:100,name:'width',listeners:{select:function(F,r,G){A.editorcore.selectNode(A.tb.selectedNode);
-var b=B();b.align=r.get('val');b.updateElement();D();A.editorcore.onEditorEvent();}},xns:C.form,store:{xtype:'SimpleStore',data:[['left'],['right'],['center']],fields:['val'],xns:Roo.data}},{xtype:'TextItem',text:"Image Source: ",xns:C.Toolbar},{xtype:'TextField',allowBlank:false,width:100,name:'width',listeners:{change:function(F,r,G){return;
+var b=B();b.width=r.get('val');b.updateElement();D();A.editorcore.onEditorEvent();}},xns:C.form,store:{xtype:'SimpleStore',data:[['auto'],['50%'],['100%']],fields:['val'],xns:Roo.data}},{xtype:'TextItem',text:"Align: ",xns:C.Toolbar},{xtype:'ComboBox',allowBlank:false,displayField:'val',editable:true,listWidth:100,triggerAction:'all',typeAhead:true,valueField:'val',width:100,name:'align',listeners:{select:function(F,r,G){A.editorcore.selectNode(A.tb.selectedNode);
+var b=B();b.align=r.get('val');b.updateElement();D();A.editorcore.onEditorEvent();}},xns:C.form,store:{xtype:'SimpleStore',data:[['left'],['right'],['center']],fields:['val'],xns:Roo.data}},{xtype:'TextItem',text:"Image Source: ",xns:C.Toolbar},{xtype:'TextField',allowBlank:false,width:150,name:'src',listeners:{change:function(F,r,G){return;
 A.editorcore.selectNode(A.tb.selectedNode);var b=B();b.align=r.get('val');b.updateElement();D();A.editorcore.onEditorEvent();}},xns:C.form}];},toObject:function(){var d=document.createElement('div');d.innerHTML=this.caption;return {tag:'figure','data-block':'Figure',contenteditable:'false',style:{display:'table',float:this.align,width:this.width,margin:this.margin}
 ,cn:[{tag:'img',src:this.image_src,alt:d.innerText.replace(/\n/g," "),style:{width:'100%'}},{tag:'figcaption',contenteditable:true,style:{'text-align':this.text_align},html:this.caption}]};},readElement:function(A){this.image_src=this.getVal(A,'img','src');
 this.align=this.getVal(A,'figure','style','float');this.caption=this.getVal(A,'figcaption','html');this.text_align=this.getVal(A,'figcaption','style','text-align');this.width=this.getVal(A,'figure','style','width');this.margin=this.getVal(A,'figure','style','margin');