Merge pull request #126 from torleif/patch-1

#125 - FIX: disconnect tinyMCE while dragging
This commit is contained in:
Stevie Mayhew 2016-06-21 13:20:39 +12:00 committed by GitHub
commit 4aa66af42d

View File

@ -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