From 3c725212884dba01e8addd6e5420a7c56728aa68 Mon Sep 17 00:00:00 2001 From: leon Date: Tue, 26 Apr 2022 16:30:01 +0800 Subject: [PATCH] roojs-ui.js roojs-ui-debug.js --- roojs-ui-debug.js | 2 +- roojs-ui.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index aae8b1dfe4..17971d03c3 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -23500,7 +23500,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { // used by context menu friendly_name : 'Image with caption', - deleteTitle : "Delete Image and Captionn", + deleteTitle : "Delete Image and Caption", contextMenu : function(toolbar) { diff --git a/roojs-ui.js b/roojs-ui.js index b7de664d75..4daf04f0d4 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -1044,7 +1044,7 @@ Roo.htmleditor.Block=function(A){};Roo.htmleditor.Block.factory=function(A){var },getVal:function(A,B,C,D){var n=A;if(B!==true&&n.tagName!=B.toUpperCase()){n=A.getElementsByTagName(B).item(0);}if(!n){return '';}if(C===false){return n;}if(C=='html'){return n.innerHTML;}if(C=='style'){return n.style[D];}return n.hasAttribute(C)?n.getAttribute(C):''; },toObject:function(){return {};},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 Captionn",contextMenu:function(A){var B=function(){return Roo.htmleditor.Block.factory(A.tb.selectedNode); +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:'Button',text:'Change Image URL',listeners:{click:function(F,G){var b=B();Roo.MessageBox.show({title:"Image Source URL",msg:"Enter the url for the image",buttons:Roo.MessageBox.OKCANCEL,fn:function(H,I){if(H!='ok'){return; }b.image_src=I;b.updateElement();D();A.editorcore.onEditorEvent();},minWidth:250,prompt:true,modal:true,value:b.image_src});}},xns:C.Toolbar},{xtype:'Button',text:'Change Link URL',listeners:{click:function(F,G){var b=B();Roo.MessageBox.show({title:"Link URL",msg:"Enter the url for the link - leave blank to have no link",buttons:Roo.MessageBox.OKCANCEL,fn:function(H,I){if(H!='ok'){return; }b.href=I;b.updateElement();D();A.editorcore.onEditorEvent();},minWidth:250,prompt:true,modal:true,value:b.href});}},xns:C.Toolbar},{xtype:'Button',text:'Show Video URL',listeners:{click:function(F,G){Roo.MessageBox.alert("Video URL",B().video_url==''?'This image is not linked ot a video':'The image is linked to: '+B().video_url+''); -- 2.39.2