mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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)
This commit is contained in:
parent
21289128bb
commit
490b87a0c5
@ -23,25 +23,19 @@
|
|||||||
init : function(ed, url) {
|
init : function(ed, url) {
|
||||||
ed.addButton('sslink', {title : ed.getLang('tinymce_ssbuttons.insertlink'), cmd : 'sslink', 'class' : 'mce_link'});
|
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('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) {
|
ed.addCommand("sslink", function(ed) {
|
||||||
jQuery('#Form_EditorToolbarLinkForm').entwine('ss').open();
|
jQuery('#Form_EditorToolbarLinkForm').entwine('ss').open();
|
||||||
});
|
});
|
||||||
|
|
||||||
ed.addCommand("ssimage", function(ed) {
|
ed.addCommand("ssimage", function(ed) {
|
||||||
jQuery('#Form_EditorToolbarImageForm')[0].open();
|
jQuery('#Form_EditorToolbarMediaForm').entwine('ss').open();
|
||||||
});
|
|
||||||
|
|
||||||
ed.addCommand("ssflash", function(ed) {
|
|
||||||
jQuery('#Form_EditorToolbarFlashForm')[0].open();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Disable link button when no link is selected
|
||||||
ed.onNodeChange.add(function(ed, cm, n, co) {
|
ed.onNodeChange.add(function(ed, cm, n, co) {
|
||||||
cm.setDisabled('sslink', co && n.nodeName != 'A');
|
cm.setDisabled('sslink', co && n.nodeName != 'A');
|
||||||
cm.setActive('sslink', n.nodeName == 'A' && !n.name);
|
cm.setActive('sslink', n.nodeName == 'A' && !n.name);
|
||||||
|
|
||||||
jQuery('Form_EditorToolbarLinkForm').entwine('ss').respondToNodeChange();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user