keep list/edit/text settings on rename, fixes #1264 and #2228

This commit is contained in:
j 2014-02-17 12:59:32 +00:00
parent f710d39567
commit 668368ea35

View file

@ -2000,15 +2000,21 @@ pandora.renameList = function(oldId, newId, newName, folder) {
// fixme: ugly
// ... does this always coincide with triggerEvents = false, as below?
pandora.replaceURL = true;
pandora.UI.set('lists.' + pandora.UI.encode(newId), pandora.user.ui.lists[oldId], false);
pandora.UI.set({
find: {
conditions: [{key: 'list', value: newId, operator: '=='}],
operator: '&'
}
}, false);
pandora.UI.set('lists.' + pandora.UI.encode(oldId), null, false);
} else {
pandora.replaceURL = true;
pandora.UI.set(pandora.user.ui.section + '.' + pandora.UI.encode(newId),
pandora.user.ui[pandora.user.ui.section][oldId], false);
pandora.UI.set(pandora.user.ui.section.slice(0, -1), newId);
pandora.UI.set(pandora.user.ui.section + '.' + pandora.UI.encode(oldId), null, false);
}
};