fix #1749 (don't create a new history entry when renaming a list)
This commit is contained in:
parent
2377269391
commit
9942e4aa16
2 changed files with 7 additions and 3 deletions
|
@ -446,7 +446,7 @@ pandora.URL = (function() {
|
||||||
title = pandora.getPageTitle(stateOrURL)
|
title = pandora.getPageTitle(stateOrURL)
|
||||||
|| pandora.getDocumentTitle(),
|
|| pandora.getDocumentTitle(),
|
||||||
url;
|
url;
|
||||||
pandora.expandURL = expandURL;
|
pandora.replaceURL = expandURL;
|
||||||
if (Ox.isObject(stateOrURL)) {
|
if (Ox.isObject(stateOrURL)) {
|
||||||
state = stateOrURL;
|
state = stateOrURL;
|
||||||
} else {
|
} else {
|
||||||
|
@ -486,7 +486,7 @@ pandora.URL = (function() {
|
||||||
} else {
|
} else {
|
||||||
if (
|
if (
|
||||||
!pandora.$ui.appPanel
|
!pandora.$ui.appPanel
|
||||||
|| pandora.expandURL
|
|| pandora.replaceURL
|
||||||
|| keys.every(function(key) {
|
|| keys.every(function(key) {
|
||||||
return [
|
return [
|
||||||
'listColumnWidth', 'listColumns', 'listSelection',
|
'listColumnWidth', 'listColumns', 'listSelection',
|
||||||
|
@ -505,7 +505,7 @@ pandora.URL = (function() {
|
||||||
state,
|
state,
|
||||||
pandora.getPageTitle(state) || pandora.getDocumentTitle()
|
pandora.getPageTitle(state) || pandora.getDocumentTitle()
|
||||||
);
|
);
|
||||||
pandora.expandURL = false;
|
pandora.replaceURL = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1723,6 +1723,9 @@ pandora.renameList = function(oldId, newId, newName, folder) {
|
||||||
pandora.$ui.folderList[folder].value(oldId, 'id', newId);
|
pandora.$ui.folderList[folder].value(oldId, 'id', newId);
|
||||||
if (pandora.user.ui.section == 'items') {
|
if (pandora.user.ui.section == 'items') {
|
||||||
pandora.$ui.toolbar.updateListName(newId);
|
pandora.$ui.toolbar.updateListName(newId);
|
||||||
|
// fixme: ugly
|
||||||
|
// ... does this always coincide with triggerEvents = false, as below?
|
||||||
|
pandora.replaceURL = true;
|
||||||
pandora.UI.set({
|
pandora.UI.set({
|
||||||
find: {
|
find: {
|
||||||
conditions: [{key: 'list', value: newId, operator: '=='}],
|
conditions: [{key: 'list', value: newId, operator: '=='}],
|
||||||
|
@ -1730,6 +1733,7 @@ pandora.renameList = function(oldId, newId, newName, folder) {
|
||||||
}
|
}
|
||||||
}, false);
|
}, false);
|
||||||
} else {
|
} else {
|
||||||
|
pandora.replaceURL = true;
|
||||||
pandora.UI.set(pandora.user.ui.section.slice(0, -1), newId);
|
pandora.UI.set(pandora.user.ui.section.slice(0, -1), newId);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue