X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-ui-debug.js;h=6b60c80261174c91c8e0b6ffa31d67c8c4d7765f;hb=b0d30caf9e3b263510c29db0caff01cc1444a907;hp=0c0ff86d80520d6c7592bdc3e364bd1202c8956a;hpb=8a1a418f70e8a6148911cf8ab25b3f1f03263cfb;p=roojs1 diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 0c0ff86d80..6b60c80261 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -23398,20 +23398,23 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { }, { xtype : 'Button', - text: 'Edit Src', + text: 'Change Image URL', listeners : { click: function (btn, state) { - + var b = block(); Roo.MessageBox.show({ title : "Image Source URL", msg : "Enter the url for the image", buttons: Roo.MessageBox.OKCANCEL, - fn: function(val){ - block().image_src = val; - block().updateElement(); + fn: function(btn, val){ + if (btn != 'ok') { + return; + } + b.image_src = val; + b.updateElement(); syncValue(); toolbar.editorcore.onEditorEvent(); }, @@ -23419,7 +23422,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { prompt:true, //multiline: multiline, modal : true, - value : block().image_src + value : b.image_src }); } }, @@ -23427,24 +23430,53 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { }, { - xtype : 'TextField', - allowBlank : false, - width : 150, - name : 'image_src', + xtype : 'Button', + text: 'Change Link URL', + listeners : { - keyup : function (combo, e) - { - toolbar.editorcore.selectNode(toolbar.tb.selectedNode); + click: function (btn, state) + { var b = block(); - b.image_src = this.getValue(); - b.updateElement(); - syncValue(); - toolbar.editorcore.onEditorEvent(); + + 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.form - + 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: ' + block().video_url + ''); + } + }, + xns : rooui.Toolbar }, + + { xtype : 'TextItem', text : "Width: ", @@ -27176,8 +27208,7 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, { */ }); - //