roojs-ui.js
authorAlan <alan@roojs.com>
Mon, 10 Jan 2022 07:08:15 +0000 (15:08 +0800)
committerAlan <alan@roojs.com>
Mon, 10 Jan 2022 07:08:15 +0000 (15:08 +0800)
roojs-ui-debug.js
roojs-bootstrap.js
roojs-bootstrap-debug.js
roojs-all.js
roojs-debug.js
Roo/htmleditor/BlockFigure.js

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

index 0eda7fe..723f867 100644 (file)
@@ -82,6 +82,8 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                             fn: function(val){
                                 block().image_src = val;
                                 block().updateElement();
+                                syncValue();
+                                toolbar.editorcore.onEditorEvent();
                             },
                             minWidth:250,
                             prompt:true,
index fd0de23..9143c07 100644 (file)
@@ -1985,7 +1985,8 @@ Roo.htmleditor.Block=function(A){};Roo.htmleditor.Block.factory=function(A){var
 ;},readElement:function(A){}};
 // 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:'',caption_display:'block',width:'100%',cls:'',href:'',video_url:'',text_align:'left',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:"Source: ",xns:C.Toolbar},{xtype:'TextField',allowBlank:false,width:150,name:'image_src',listeners:{keyup:function(F,e){A.editorcore.selectNode(A.tb.selectedNode);
+};var C=typeof(Roo.bootstrap)=='undefined'?Roo:Roo.bootstrap;var D=A.editorcore.syncValue;var E={};return [{xtype:'TextItem',text:"Source: ",xns:C.Toolbar},{xtype:'Button',text:'Edit Src',name:'image_src',listeners:{click:function(F,G){Roo.MessageBox.show({title:"Image Source URL",msg:"Enter the url for the image",buttons:this.OKCANCEL,fn:function(H){B().image_src=H;
+B().updateElement();D();A.editorcore.onEditorEvent();},minWidth:250,prompt:true,modal:true,value:B().image_src});}},xns:C.Toolbar},{xtype:'TextField',allowBlank:false,width:150,name:'image_src',listeners:{keyup:function(F,e){A.editorcore.selectNode(A.tb.selectedNode);
 var b=B();b.image_src=this.getValue();b.updateElement();D();A.editorcore.onEditorEvent();}},xns:C.form},{xtype:'TextItem',text:"Width: ",xns:C.Toolbar},{xtype:'ComboBox',allowBlank:false,displayField:'val',editable:true,listWidth:100,triggerAction:'all',typeAhead:true,valueField:'val',width:70,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:70,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:'Button',text:'Hide Caption',name:'caption_display',pressed:false,enableToggle:true,setValue:function(v){this.toggle(v=='block'?false:true);
index e66fdc2..09a40fa 100644 (file)
@@ -27035,6 +27035,37 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                 text : "Source: ",
                 xns : rooui.Toolbar  //Boostrap?
             },
+            {
+                xtype : 'Button',
+                text: 'Edit Src',
+                name : 'image_src',
+                
+                listeners : {
+                    click: function (btn, state)
+                    {
+                        
+                        
+                        Roo.MessageBox.show({
+                            title : "Image Source URL",
+                            msg : "Enter the url for the image",
+                            buttons: this.OKCANCEL,
+                            fn: function(val){
+                                block().image_src = val;
+                                block().updateElement();
+                                syncValue();
+                                toolbar.editorcore.onEditorEvent();
+                            },
+                            minWidth:250,
+                            prompt:true,
+                            //multiline: multiline,
+                            modal : true,
+                            value : block().image_src
+                        });
+                    }
+                },
+                xns : rooui.Toolbar
+            },
+         
             {
                 xtype : 'TextField',
                 allowBlank : false,
index 1854804..59cbacc 100644 (file)
@@ -1175,7 +1175,8 @@ Roo.htmleditor.Block=function(A){};Roo.htmleditor.Block.factory=function(A){var
 ;},readElement:function(A){}};
 // 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:'',caption_display:'block',width:'100%',cls:'',href:'',video_url:'',text_align:'left',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:"Source: ",xns:C.Toolbar},{xtype:'TextField',allowBlank:false,width:150,name:'image_src',listeners:{keyup:function(F,e){A.editorcore.selectNode(A.tb.selectedNode);
+};var C=typeof(Roo.bootstrap)=='undefined'?Roo:Roo.bootstrap;var D=A.editorcore.syncValue;var E={};return [{xtype:'TextItem',text:"Source: ",xns:C.Toolbar},{xtype:'Button',text:'Edit Src',name:'image_src',listeners:{click:function(F,G){Roo.MessageBox.show({title:"Image Source URL",msg:"Enter the url for the image",buttons:this.OKCANCEL,fn:function(H){B().image_src=H;
+B().updateElement();D();A.editorcore.onEditorEvent();},minWidth:250,prompt:true,modal:true,value:B().image_src});}},xns:C.Toolbar},{xtype:'TextField',allowBlank:false,width:150,name:'image_src',listeners:{keyup:function(F,e){A.editorcore.selectNode(A.tb.selectedNode);
 var b=B();b.image_src=this.getValue();b.updateElement();D();A.editorcore.onEditorEvent();}},xns:C.form},{xtype:'TextItem',text:"Width: ",xns:C.Toolbar},{xtype:'ComboBox',allowBlank:false,displayField:'val',editable:true,listWidth:100,triggerAction:'all',typeAhead:true,valueField:'val',width:70,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:70,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:'Button',text:'Hide Caption',name:'caption_display',pressed:false,enableToggle:true,setValue:function(v){this.toggle(v=='block'?false:true);
index f370891..ca9f42c 100644 (file)
@@ -47865,6 +47865,37 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                 text : "Source: ",
                 xns : rooui.Toolbar  //Boostrap?
             },
+            {
+                xtype : 'Button',
+                text: 'Edit Src',
+                name : 'image_src',
+                
+                listeners : {
+                    click: function (btn, state)
+                    {
+                        
+                        
+                        Roo.MessageBox.show({
+                            title : "Image Source URL",
+                            msg : "Enter the url for the image",
+                            buttons: this.OKCANCEL,
+                            fn: function(val){
+                                block().image_src = val;
+                                block().updateElement();
+                                syncValue();
+                                toolbar.editorcore.onEditorEvent();
+                            },
+                            minWidth:250,
+                            prompt:true,
+                            //multiline: multiline,
+                            modal : true,
+                            value : block().image_src
+                        });
+                    }
+                },
+                xns : rooui.Toolbar
+            },
+         
             {
                 xtype : 'TextField',
                 allowBlank : false,
index 7e8e6b4..09b8331 100644 (file)
@@ -23396,6 +23396,37 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                 text : "Source: ",
                 xns : rooui.Toolbar  //Boostrap?
             },
+            {
+                xtype : 'Button',
+                text: 'Edit Src',
+                name : 'image_src',
+                
+                listeners : {
+                    click: function (btn, state)
+                    {
+                        
+                        
+                        Roo.MessageBox.show({
+                            title : "Image Source URL",
+                            msg : "Enter the url for the image",
+                            buttons: this.OKCANCEL,
+                            fn: function(val){
+                                block().image_src = val;
+                                block().updateElement();
+                                syncValue();
+                                toolbar.editorcore.onEditorEvent();
+                            },
+                            minWidth:250,
+                            prompt:true,
+                            //multiline: multiline,
+                            modal : true,
+                            value : block().image_src
+                        });
+                    }
+                },
+                xns : rooui.Toolbar
+            },
+         
             {
                 xtype : 'TextField',
                 allowBlank : false,
index 7c24529..bab6322 100644 (file)
@@ -1040,7 +1040,8 @@ Roo.htmleditor.Block=function(A){};Roo.htmleditor.Block.factory=function(A){var
 ;},readElement:function(A){}};
 // 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:'',caption_display:'block',width:'100%',cls:'',href:'',video_url:'',text_align:'left',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:"Source: ",xns:C.Toolbar},{xtype:'TextField',allowBlank:false,width:150,name:'image_src',listeners:{keyup:function(F,e){A.editorcore.selectNode(A.tb.selectedNode);
+};var C=typeof(Roo.bootstrap)=='undefined'?Roo:Roo.bootstrap;var D=A.editorcore.syncValue;var E={};return [{xtype:'TextItem',text:"Source: ",xns:C.Toolbar},{xtype:'Button',text:'Edit Src',name:'image_src',listeners:{click:function(F,G){Roo.MessageBox.show({title:"Image Source URL",msg:"Enter the url for the image",buttons:this.OKCANCEL,fn:function(H){B().image_src=H;
+B().updateElement();D();A.editorcore.onEditorEvent();},minWidth:250,prompt:true,modal:true,value:B().image_src});}},xns:C.Toolbar},{xtype:'TextField',allowBlank:false,width:150,name:'image_src',listeners:{keyup:function(F,e){A.editorcore.selectNode(A.tb.selectedNode);
 var b=B();b.image_src=this.getValue();b.updateElement();D();A.editorcore.onEditorEvent();}},xns:C.form},{xtype:'TextItem',text:"Width: ",xns:C.Toolbar},{xtype:'ComboBox',allowBlank:false,displayField:'val',editable:true,listWidth:100,triggerAction:'all',typeAhead:true,valueField:'val',width:70,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:70,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:'Button',text:'Hide Caption',name:'caption_display',pressed:false,enableToggle:true,setValue:function(v){this.toggle(v=='block'?false:true);