Permalink
Browse files

MINOR Using entwine calls in ssbuttons TinyMCE plugin

  • Loading branch information...
chillu committed Jan 4, 2012
1 parent 4140dda commit 7a29a4a0ca5c9561fc08bc87636dd70185f8a905
Showing with 3 additions and 7 deletions.
  1. +3 −7 javascript/tinymce_ssbuttons/editor_plugin_src.js
@@ -20,14 +20,13 @@
};
},
-
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')[0].open();
+ jQuery('#Form_EditorToolbarLinkForm').entwine('ss').open();
});
ed.addCommand("ssimage", function(ed) {
@@ -39,15 +38,12 @@
});
ed.onNodeChange.add(function(ed, o) {
- if ($('Form_EditorToolbarLinkForm').updateSelection) {
- $('Form_EditorToolbarLinkForm').updateSelection(ed);
- $('Form_EditorToolbarLinkForm').respondToNodeChange(ed);
- }
+ jQuery('Form_EditorToolbarLinkForm').entwine('ss').updateSelection();
+ jQuery('Form_EditorToolbarLinkForm').entwine('ss').respondToNodeChange();
});
}
});
-
// Adds the plugin class to the list of available TinyMCE plugins
tinymce.PluginManager.add("ssbuttons", tinymce.plugins.SSButtons);
})();

0 comments on commit 7a29a4a

Please sign in to comment.