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:
10
js/common.js
10
js/common.js
@@ -187,8 +187,15 @@ 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) {
|
||||||
|
// The goTo() function won't refresh in case the target
|
||||||
|
// url is the same as the url given as parameter, but sometimes
|
||||||
|
// we want to refresh anyway.
|
||||||
|
if (typeof force != undefined && force && window.parent && window.parent.frame_navigation) {
|
||||||
|
window.parent.frame_navigation.location.reload();
|
||||||
|
} else {
|
||||||
goTo('navigation.php?server=' + encodeURIComponent(server) +
|
goTo('navigation.php?server=' + encodeURIComponent(server) +
|
||||||
'&token=' + encodeURIComponent(token) +
|
'&token=' + encodeURIComponent(token) +
|
||||||
'&db=' + encodeURIComponent(db) +
|
'&db=' + encodeURIComponent(db) +
|
||||||
@@ -196,6 +203,7 @@ function refreshNavigation() {
|
|||||||
'&lang=' + encodeURIComponent(lang) +
|
'&lang=' + encodeURIComponent(lang) +
|
||||||
'&collation_connection=' + encodeURIComponent(collation_connection)
|
'&collation_connection=' + encodeURIComponent(collation_connection)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -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 {
|
||||||
|
Reference in New Issue
Block a user