From 490b87a0c58508cb0f7fe8fece1b1e56a4e2239b Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 8 Feb 2012 21:43:45 +0100 Subject: [PATCH] MINOR Changed 'insert image' form names, removed dynamic node change events for links (modal dialog doesn't allow for changes while the dialog is open) --- javascript/tinymce_ssbuttons/editor_plugin_src.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/javascript/tinymce_ssbuttons/editor_plugin_src.js b/javascript/tinymce_ssbuttons/editor_plugin_src.js index 0b0892b1..1be75784 100644 --- a/javascript/tinymce_ssbuttons/editor_plugin_src.js +++ b/javascript/tinymce_ssbuttons/editor_plugin_src.js @@ -23,25 +23,19 @@ init : function(ed, url) { ed.addButton('sslink', {title : ed.getLang('tinymce_ssbuttons.insertlink'), cmd : 'sslink', 'class' : 'mce_link'}); ed.addButton('ssimage', {title : ed.getLang('tinymce_ssbuttons.insertimage'), cmd : 'ssimage', 'class' : 'mce_image'}); - ed.addButton('ssflash', {title : ed.getLang('tinymce_ssbuttons.insertflash'), cmd : 'ssflash', 'class' : 'mce_flash', 'image': url + '/img/flash.gif'}); ed.addCommand("sslink", function(ed) { jQuery('#Form_EditorToolbarLinkForm').entwine('ss').open(); }); ed.addCommand("ssimage", function(ed) { - jQuery('#Form_EditorToolbarImageForm')[0].open(); - }); - - ed.addCommand("ssflash", function(ed) { - jQuery('#Form_EditorToolbarFlashForm')[0].open(); + jQuery('#Form_EditorToolbarMediaForm').entwine('ss').open(); }); + // Disable link button when no link is selected ed.onNodeChange.add(function(ed, cm, n, co) { cm.setDisabled('sslink', co && n.nodeName != 'A'); cm.setActive('sslink', n.nodeName == 'A' && !n.name); - - jQuery('Form_EditorToolbarLinkForm').entwine('ss').respondToNodeChange(); }); } });