diff options
author | Madhura Jayaratne <madhura.cj@gmail.com> | 2015-02-13 10:36:34 +0300 |
---|---|---|
committer | Madhura Jayaratne <madhura.cj@gmail.com> | 2015-02-13 10:36:34 +0300 |
commit | cf666bcfe3d5e0cc89ef03882d14c9c2dece215e (patch) | |
tree | 52910f87574620224709ec400e52b1e6f41d6198 | |
parent | a744d44b62067a2a7933d898d01a7696556706f1 (diff) |
Fix scope
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
-rw-r--r-- | js/navigation.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/js/navigation.js b/js/navigation.js index 4a212d7ec7..b20ccf9446 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -15,15 +15,16 @@ * @returns void */ function loadChildNodes(isNode, $expandElem, callback) { + + var $destination = null; + var params = null; + if (isNode) { if (!$expandElem.hasClass('expander')) { return; } - var $destination = $expandElem.closest('li'); - var searchClause = PMA_fastFilter.getSearchClause(); - var searchClause2 = PMA_fastFilter.getSearchClause2($expandElem); - - var params = { + $destination = $expandElem.closest('li'); + params = { aPath: $expandElem.find('span.aPath').text(), vPath: $expandElem.find('span.vPath').text(), pos: $expandElem.find('span.pos').text(), @@ -32,14 +33,13 @@ function loadChildNodes(isNode, $expandElem, callback) { searchClause: '', searchClause2: '' }; - if ($expandElem.closest('ul').hasClass('search_results') - ) { - params.searchClause = searchClause; - params.searchClause2 = searchClause2; + if ($expandElem.closest('ul').hasClass('search_results')) { + params.searchClause = PMA_fastFilter.getSearchClause(); + params.searchClause2 = PMA_fastFilter.getSearchClause2($expandElem); } } else { - var $destination = $('#pma_navigation_tree_content'); - var params = { + $destination = $('#pma_navigation_tree_content'); + params = { aPath: $expandElem.attr('aPath'), vPath: $expandElem.attr('vPath'), pos: $expandElem.attr('pos'), |