Bug #3163256 Ajax copy database does not refresh the database list in case the "switch to copied database" option is not ticked

This commit is contained in:
Marc Delisle
2011-01-24 06:20:26 -05:00
parent dec8229eae
commit 251ecae49d
2 changed files with 21 additions and 8 deletions

View File

@@ -187,15 +187,23 @@ function refreshMain(url) {
* @uses lang * @uses lang
* @uses collation_connection * @uses collation_connection
* @uses encodeURIComponent() * @uses encodeURIComponent()
* @param boolean force force reloading
*/ */
function refreshNavigation() { function refreshNavigation(force) {
goTo('navigation.php?server=' + encodeURIComponent(server) + // The goTo() function won't refresh in case the target
'&token=' + encodeURIComponent(token) + // url is the same as the url given as parameter, but sometimes
'&db=' + encodeURIComponent(db) + // we want to refresh anyway.
'&table=' + encodeURIComponent(table) + if (typeof force != undefined && force && window.parent && window.parent.frame_navigation) {
'&lang=' + encodeURIComponent(lang) + window.parent.frame_navigation.location.reload();
'&collation_connection=' + encodeURIComponent(collation_connection) } else {
); goTo('navigation.php?server=' + encodeURIComponent(server) +
'&token=' + encodeURIComponent(token) +
'&db=' + encodeURIComponent(db) +
'&table=' + encodeURIComponent(table) +
'&lang=' + encodeURIComponent(lang) +
'&collation_connection=' + encodeURIComponent(collation_connection)
);
}
} }
/** /**

View File

@@ -100,6 +100,11 @@ $(document).ready(function() {
window.parent.db = data.newname; window.parent.db = data.newname;
window.parent.refreshMain(); window.parent.refreshMain();
window.parent.refreshNavigation(); window.parent.refreshNavigation();
} else {
// Here we force a refresh because the navigation
// frame url is not changing so this function would
// not refresh it
window.parent.refreshNavigation(true);
} }
} }
else { else {