diff --git a/ChangeLog b/ChangeLog index c6ab5e03e3..c3319c1d38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ phpMyAdmin - ChangeLog - bug #4205 Add a user shows additional "edit user group" link - bug #4202 Cannot read property 'token' of undefined - bug #4203 On refreshing designer, $.FullScreen is undefined +- bug #3920 Lost space in navigation area 4.1.2.0 (2013-12-23) - bug #4178 Quick edit for BIT type does not work diff --git a/js/navigation.js b/js/navigation.js index 8a8655fc6a..9132cd4453 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -43,10 +43,19 @@ $(function () { */ $('#pma_navigation_reload').live('click', function (event) { event.preventDefault(); - $('#pma_navigation .throbber') - .first() - .css('visibility', 'visible'); + // reload icon object + var $icon = $(this).find('img'); + // source of the hidden throbber icon + var icon_throbber_src = $('#pma_navigation .throbber').attr('src'); + // source of the reload icon + var icon_reload_src = $icon.attr('src'); + // replace the source of the reload icon with the one for throbber + $icon.attr('src', icon_throbber_src); PMA_reloadNavigation(); + // after one second, put back the reload icon + setTimeout(function () { + $icon.attr('src', icon_reload_src); + }, 1000); }); /** @@ -260,7 +269,7 @@ function expandTreeNode($expandElem, callback) var $throbber = $('#pma_navigation .throbber') .first() .clone() - .css('visibility', 'visible') + .css({visibility: 'visible', display: 'block'}) .click(false); $icon.hide(); $throbber.insertBefore($icon); @@ -557,12 +566,6 @@ function PMA_showCurrentNavigation() * @return void */ function PMA_reloadNavigation(callback) { - var $throbber = $('#pma_navigation .throbber') - .first() - .css({ - 'visibility' : 'visible', - 'display' : 'block' - }); var params = { reload: true, pos: $('#pma_navigation_tree').find('a.expander:first > span.pos').text() @@ -605,10 +608,6 @@ function PMA_reloadNavigation(callback) { }); var url = $('#pma_navigation').find('a.navigation_url').attr('href'); $.post(url, params, function (data) { - // Hide throbber if it's visible - $('#pma_navigation .throbber') - .first() - .css('visibility', 'hidden'); if (data.success) { $('#pma_navigation_tree').html(data.message).children('div').show(); PMA_showCurrentNavigation(); @@ -1127,7 +1126,7 @@ PMA_fastFilter.filter.prototype.request = function () $('#pma_navigation_content') .find('img.throbber') .clone() - .css('visibility', 'visible') + .css({visibility: 'visible', display: 'block'}) ) ); } diff --git a/libraries/navigation/NavigationHeader.class.php b/libraries/navigation/NavigationHeader.class.php index 554f5d7a26..ea6e2f2d5c 100644 --- a/libraries/navigation/NavigationHeader.class.php +++ b/libraries/navigation/NavigationHeader.class.php @@ -53,7 +53,7 @@ class PMA_NavigationHeader $buffer .= PMA_Util::getImage( 'ajax_clock_small.gif', __('Loading…'), - array('style' => 'visibility: hidden;', 'class' => 'throbber') + array('style' => 'visibility: hidden; display:none', 'class' => 'throbber') ); $buffer .= ''; // pma_navigation_header $buffer .= '
';