diff options
author | Atul Pratap Singh <atulpratapsingh05@gmail.com> | 2013-08-26 16:45:48 +0400 |
---|---|---|
committer | Atul Pratap Singh <atulpratapsingh05@gmail.com> | 2013-08-26 16:45:48 +0400 |
commit | 3dd1c765047cc44f650644448c1126e4d99585b7 (patch) | |
tree | 8163570b3d4c2ae8686871961539f012cd81e2a5 /js/common.js | |
parent | 77c4cbed7fa8a425e4d6b45aae01423af10671b7 (diff) | |
parent | 15d03b227305a46c6ab9b6c1b9ad8c38c35f558f (diff) |
Merge commit '15d03b2'
Diffstat (limited to 'js/common.js')
-rw-r--r-- | js/common.js | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/js/common.js b/js/common.js index b18229d8f4..f7405b7a8e 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(); } |