The branch, master has been updated via 251ecae49d17dafbccd802c1e004b8e8adffd01f (commit) from dec8229eaeb6ce91db2886f2842c4eb2458acaa7 (commit)
- Log ----------------------------------------------------------------- commit 251ecae49d17dafbccd802c1e004b8e8adffd01f Author: Marc Delisle marc@infomarc.info Date: Mon Jan 24 06:20:26 2011 -0500
Bug #3163256 Ajax copy database does not refresh the database list in case the "switch to copied database" option is not ticked
-----------------------------------------------------------------------
Summary of changes: js/common.js | 24 ++++++++++++++++-------- js/db_operations.js | 5 +++++ 2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/js/common.js b/js/common.js index 9a690c6..0ab1e88 100644 --- a/js/common.js +++ b/js/common.js @@ -187,15 +187,23 @@ function refreshMain(url) { * @uses lang * @uses collation_connection * @uses encodeURIComponent() + * @param boolean force force reloading */ -function refreshNavigation() { - goTo('navigation.php?server=' + encodeURIComponent(server) + - '&token=' + encodeURIComponent(token) + - '&db=' + encodeURIComponent(db) + - '&table=' + encodeURIComponent(table) + - '&lang=' + encodeURIComponent(lang) + - '&collation_connection=' + encodeURIComponent(collation_connection) - ); +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) + + '&token=' + encodeURIComponent(token) + + '&db=' + encodeURIComponent(db) + + '&table=' + encodeURIComponent(table) + + '&lang=' + encodeURIComponent(lang) + + '&collation_connection=' + encodeURIComponent(collation_connection) + ); + } }
/** diff --git a/js/db_operations.js b/js/db_operations.js index 0f9240a..12b17c1 100644 --- a/js/db_operations.js +++ b/js/db_operations.js @@ -100,6 +100,11 @@ $(document).ready(function() { window.parent.db = data.newname; window.parent.refreshMain(); 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 {
hooks/post-receive