Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtul Pratap Singh <atulpratapsingh05@gmail.com>2013-08-17 01:32:38 +0400
committerAtul Pratap Singh <atulpratapsingh05@gmail.com>2013-08-17 01:32:38 +0400
commit15d03b227305a46c6ab9b6c1b9ad8c38c35f558f (patch)
tree8d90e3d00e99be71ccbe02bda95a10aaf6be1005 /js/common.js
parent42a8ad5abbeccc98109a25d93d13e2033339bfa8 (diff)
Move autoexpand to a function
Diffstat (limited to 'js/common.js')
-rw-r--r--js/common.js20
1 files changed, 7 insertions, 13 deletions
diff --git a/js/common.js b/js/common.js
index 00521c2473..0fe08b6328 100644
--- a/js/common.js
+++ b/js/common.js
@@ -43,19 +43,7 @@ var PMA_commonParams = (function () {
}
// To expand the database in use and collapse the previous one
if(i == 'db' && obj[i] !== '') {
- var $expandElem, $icon;
- if(params['db'] !== '' && params['db'] !== obj[i]) {
- $expandElem = $('#pma_navigation_tree a.dbLink:contains("' + params['db'] + '")')
- .parent().find('a.expander').eq(0);
- $icon = $expandElem.find('img');
- if ($icon.is('.ic_b_minus'))
- PMA_expandNavigationTree($expandElem);
- }
- $expandElem = $('#pma_navigation_tree a.dbLink:contains("' + obj[i] + '")')
- .parent().find('a.expander').eq(0);
- $icon = $expandElem.find('img');
- if ($icon.is('.ic_b_plus'))
- PMA_expandNavigationTree($expandElem);
+ PMA_autoExpandDatabaseInUse(params['db'], obj[i]);
}
params[i] = obj[i];
}
@@ -87,6 +75,9 @@ var PMA_commonParams = (function () {
PMA_querywindow.refresh();
PMA_reloadNavigation();
}
+ if(name == 'db' && value !== '') {
+ PMA_autoExpandDatabaseInUse(params['db'], value);
+ }
params[name] = value;
return this;
},
@@ -124,6 +115,9 @@ var PMA_commonActions = {
*/
setDb: function (new_db) {
if (new_db != PMA_commonParams.get('db')) {
+ if(new_db !== '') {
+ PMA_autoExpandDatabaseInUse(PMA_commonParams.get('db'), new_db);
+ }
PMA_commonParams.set('db', new_db);
PMA_querywindow.refresh();
}