fix #1749 (don't create a new history entry when renaming a list)

This commit is contained in:
rolux 2013-08-03 19:35:29 +00:00
parent 2377269391
commit 9942e4aa16
2 changed files with 7 additions and 3 deletions

View file

@ -446,7 +446,7 @@ pandora.URL = (function() {
title = pandora.getPageTitle(stateOrURL)
|| pandora.getDocumentTitle(),
url;
pandora.expandURL = expandURL;
pandora.replaceURL = expandURL;
if (Ox.isObject(stateOrURL)) {
state = stateOrURL;
} else {
@ -486,7 +486,7 @@ pandora.URL = (function() {
} else {
if (
!pandora.$ui.appPanel
|| pandora.expandURL
|| pandora.replaceURL
|| keys.every(function(key) {
return [
'listColumnWidth', 'listColumns', 'listSelection',
@ -505,7 +505,7 @@ pandora.URL = (function() {
state,
pandora.getPageTitle(state) || pandora.getDocumentTitle()
);
pandora.expandURL = false;
pandora.replaceURL = false;
}
};

View file

@ -1723,6 +1723,9 @@ pandora.renameList = function(oldId, newId, newName, folder) {
pandora.$ui.folderList[folder].value(oldId, 'id', newId);
if (pandora.user.ui.section == 'items') {
pandora.$ui.toolbar.updateListName(newId);
// fixme: ugly
// ... does this always coincide with triggerEvents = false, as below?
pandora.replaceURL = true;
pandora.UI.set({
find: {
conditions: [{key: 'list', value: newId, operator: '=='}],
@ -1730,6 +1733,7 @@ pandora.renameList = function(oldId, newId, newName, folder) {
}
}, false);
} else {
pandora.replaceURL = true;
pandora.UI.set(pandora.user.ui.section.slice(0, -1), newId);
}
};