Merge pull request #718 from WebCentrum/dev-v7-gridsort2
Fixed bug in U4-6593 - After sort, reset the TinyMCE editors with previous settings
This commit is contained in:
@@ -129,6 +129,9 @@ angular.module("umbraco")
|
||||
},
|
||||
|
||||
start: function (e, ui) {
|
||||
// reset dragged RTE settings in case a RTE isn't dragged
|
||||
draggedRteSettings = undefined;
|
||||
|
||||
ui.item.find('.mceNoEditor').each(function () {
|
||||
notIncludedRte = [];
|
||||
|
||||
@@ -148,12 +151,14 @@ angular.module("umbraco")
|
||||
}
|
||||
});
|
||||
$timeout(function () {
|
||||
// reconstruct the dragged RTE
|
||||
tinyMCE.init(draggedRteSettings);
|
||||
// reconstruct the dragged RTE (could be undefined when dragging something else than RTE)
|
||||
if (draggedRteSettings !== undefined) {
|
||||
tinyMCE.init(draggedRteSettings);
|
||||
}
|
||||
|
||||
_.forEach(notIncludedRte, function (id) {
|
||||
// reset all the other RTEs
|
||||
if (id != draggedRteSettings.id) {
|
||||
if (draggedRteSettings === undefined || id != draggedRteSettings.id) {
|
||||
var rteSettings = _.findWhere(tinyMCE.editors, { id: id }).settings;
|
||||
tinyMCE.execCommand('mceRemoveEditor', false, id);
|
||||
tinyMCE.init(rteSettings);
|
||||
|
||||
Reference in New Issue
Block a user