From c4cdedafbbaddf1ae92c9087fcf1e7aa4cfde14a Mon Sep 17 00:00:00 2001 From: Alan Date: Mon, 10 Jan 2022 15:31:42 +0800 Subject: [PATCH] sync --- ...oo_form_HtmlEditor_ToolbarStandard.js.html | 5 +- docs/src/Roo_htmleditor_BlockFigure.js.html | 84 ++++++++++++++++--- 2 files changed, 77 insertions(+), 12 deletions(-) diff --git a/docs/src/Roo_form_HtmlEditor_ToolbarStandard.js.html b/docs/src/Roo_form_HtmlEditor_ToolbarStandard.js.html index 41169d33fc..b8c6c1e6c4 100644 --- a/docs/src/Roo_form_HtmlEditor_ToolbarStandard.js.html +++ b/docs/src/Roo_form_HtmlEditor_ToolbarStandard.js.html @@ -527,7 +527,10 @@ createLink : function(){ Roo.log("create link?"); var ec = this.editorcore; - Roo.MessageBox.prompt("Add Link URL",this.createLinkText, function(url) { + Roo.MessageBox.prompt("Add Link URL",this.createLinkText, function(btn, url) { + if (btn != 'ok') { + return; + } if(url && url != 'http:/'+'/'){ ec.relayCmd('createlink', url); } diff --git a/docs/src/Roo_htmleditor_BlockFigure.js.html b/docs/src/Roo_htmleditor_BlockFigure.js.html index eaf6609c3c..8948576088 100644 --- a/docs/src/Roo_htmleditor_BlockFigure.js.html +++ b/docs/src/Roo_htmleditor_BlockFigure.js.html @@ -66,24 +66,86 @@ xns : rooui.Toolbar //Boostrap? }, { - xtype : 'TextField', - allowBlank : false, - width : 150, - name : 'image_src', + xtype : 'Button', + text: 'Change Image URL', + listeners : { - keyup : function (combo, e) + click: function (btn, state) { - toolbar.editorcore.selectNode(toolbar.tb.selectedNode); var b = block(); - b.image_src = this.getValue(); - b.updateElement(); - syncValue(); - toolbar.editorcore.onEditorEvent(); + + Roo.MessageBox.show({ + title : "Image Source URL", + msg : "Enter the url for the image", + buttons: Roo.MessageBox.OKCANCEL, + fn: function(btn, val){ + if (btn != 'ok') { + return; + } + b.image_src = val; + b.updateElement(); + syncValue(); + toolbar.editorcore.onEditorEvent(); + }, + minWidth:250, + prompt:true, + //multiline: multiline, + modal : true, + value : b.image_src + }); } }, - xns : rooui.form + xns : rooui.Toolbar + }, + + { + xtype : 'Button', + text: 'Change Link URL', + listeners : { + click: function (btn, state) + { + var b = block(); + + 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(btn, val){ + if (btn != 'ok') { + return; + } + b.href = val; + b.updateElement(); + syncValue(); + toolbar.editorcore.onEditorEvent(); + }, + minWidth:250, + prompt:true, + //multiline: multiline, + modal : true, + value : b.href + }); + } + }, + xns : rooui.Toolbar }, + { + xtype : 'Button', + text: 'Show Video URL', + + listeners : { + click: function (btn, state) + { + Roo.MessageBox.alert("Video URL", + block().video_url == '' ? 'This image is not linked ot a video' : + 'The image is linked to: <a target="_new" href="' + block().video_url + '">' + block().video_url + '</a>'); + } + }, + xns : rooui.Toolbar + }, + + { xtype : 'TextItem', text : "Width: ", -- 2.39.2