mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 15:05:54 +00:00
Merge pull request #126 from torleif/patch-1
#125 - FIX: disconnect tinyMCE while dragging
This commit is contained in:
commit
4aa66af42d
@ -20,9 +20,23 @@
|
|||||||
$(this).find('.usedWidgets').sortable({
|
$(this).find('.usedWidgets').sortable({
|
||||||
opacity: 0.6,
|
opacity: 0.6,
|
||||||
handle: '.handle',
|
handle: '.handle',
|
||||||
update: function(e, ui) {parentRef.updateWidgets(e, ui)},
|
update: function (e, ui) {
|
||||||
|
parentRef.updateWidgets(e, ui)
|
||||||
|
},
|
||||||
placeholder: 'ui-state-highlight',
|
placeholder: 'ui-state-highlight',
|
||||||
forcePlaceholderSize: true
|
forcePlaceholderSize: true,
|
||||||
|
start: function (e, ui) {
|
||||||
|
htmleditors = $(ui.item).closest('.Widget').find('textarea.htmleditor');
|
||||||
|
$.each(htmleditors, function (k, i) {
|
||||||
|
tinyMCE.execCommand('mceRemoveControl', false, $(i).attr('id'));
|
||||||
|
})
|
||||||
|
},
|
||||||
|
stop: function (e, ui) {
|
||||||
|
htmleditors = $(ui.item).closest('.Widget').find('textarea.htmleditor');
|
||||||
|
$.each(htmleditors, function (k, i) {
|
||||||
|
tinyMCE.execCommand('mceAddControl', true, $(i).attr('id'));
|
||||||
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Figure out maxid, this is used when creating new widgets
|
// Figure out maxid, this is used when creating new widgets
|
||||||
|
Loading…
x
Reference in New Issue
Block a user