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();
},
prompt:true,
//multiline: multiline,
modal : true,
- value : block().image_src
+ value : b.image_src
});
}
},
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(val){
- block().href = val;
- block().updateElement();
+ fn: function(btn, val){
+ if (btn != 'ok') {
+ return;
+ }
+ b.href = val;
+ b.updateElement();
syncValue();
toolbar.editorcore.onEditorEvent();
},
prompt:true,
//multiline: multiline,
modal : true,
- value : block().href
+ value : b.href
});
}
},
*/
});
- // <script type="text/javascript">
-/*
+ /*
* Based on
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
*/
/**
- * @class Roo.form.HtmlEditorToolbar1
+ * @class Roo.form.HtmlEditor.ToolbarStandard
* Basic Toolbar
- *
+
* Usage:
*
new Roo.form.HtmlEditor({
*
* @cfg {Object} disable List of elements to disable..
- * @cfg {Array} btns List of additional buttons.
+ * @cfg {Roo.Toolbar.Item|Roo.Toolbar.Button|Roo.Toolbar.SplitButton|Roo.form.Field} btns[] List of additional buttons.
*
*
* NEEDS Extra CSS?
// dont call parent... till later.
}
-Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype, {
+Roo.form.HtmlEditor.ToolbarStandard.prototype = {
tb: false,
},
// private used internally
createLink : function(){
- Roo.log("create link?");
+ //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);
}
item.enable();
});
}
-});
+};