The branch, master has been updated via 48b951996997742574fbe2935f51a56e56986e7f (commit) via 7e4fe589f399352c048df5acab7a09a400b686f2 (commit) from ac95cf21a82c7617338e1abb7c07821a62bd3f98 (commit)
- Log ----------------------------------------------------------------- commit 48b951996997742574fbe2935f51a56e56986e7f Merge: 7e4fe58 ac95cf2 Author: Madhura Jayaratne madhura.cj@gmail.com Date: Sat Jan 21 20:29:33 2012 +0530
Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit 7e4fe589f399352c048df5acab7a09a400b686f2 Author: Madhura Jayaratne madhura.cj@gmail.com Date: Fri Jan 20 23:10:37 2012 +0530
Improve the look and feel of the fast filter
-----------------------------------------------------------------------
Summary of changes: js/navigation.js | 33 +++++++++++++++++++++++-------- navigation.php | 2 +- themes/original/css/theme_left.css.php | 4 +++ themes/pmahomme/css/theme_left.css.php | 4 +++ 4 files changed, 33 insertions(+), 10 deletions(-)
diff --git a/js/navigation.js b/js/navigation.js index 15ac62a..21e05b8 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -170,10 +170,9 @@ function fast_filter(value) */ function clear_fast_filter() { - var elm = $('#NavFilter input'); - elm.val(''); + var $elm = $('#fast_filter'); + $elm.val(''); fast_filter(''); - elm.focus(); }
/** @@ -197,14 +196,30 @@ function PMA_reloadRecentTable() $(document).ready(function(){ /* Display filter */ $('#NavFilter').css('display', 'inline'); - $('input[id="fast_filter"]').focus(function() { - if($(this).attr("value") === "filter tables by name") { - clear_fast_filter(); + var txt = $('#fast_filter').val(); + + $('#fast_filter.gray').live('focus', function() { + $(this).removeClass('gray'); + clear_fast_filter(); + }); + + $('#fast_filter:not(.gray)').live('focusout', function() { + var $input = $(this); + if ($input.val() == '') { + $input + .addClass('gray') + .val(txt); } }); - $('#clear_fast_filter').click(clear_fast_filter); - $('#fast_filter').focus(function (evt) {evt.target.select();}); - $('#fast_filter').keyup(function (evt) {fast_filter(evt.target.value);}); + + $('#clear_fast_filter').click(function() { + clear_fast_filter(); + $('#fast_filter').focus(); + }); + + $('#fast_filter').keyup(function(evt) { + fast_filter($(this).val()); + });
/* Jump to recent table */ $('#recentTable').change(function() { diff --git a/navigation.php b/navigation.php index 4b21236..748c9ab 100644 --- a/navigation.php +++ b/navigation.php @@ -267,7 +267,7 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { ?> <span id="NavFilter"> <span id="clear_fast_filter" title="<?php echo __('Clear'); ?>">X</span> - <input type="text" name="fast_filter" id="fast_filter" title="<?php echo __('Filter tables by name'); ?>" value="<?php echo __('Filter tables by name'); ?>" /> + <input type="text" class="gray" name="fast_filter" id="fast_filter" title="<?php echo __('Filter tables by name'); ?>" value="<?php echo __('Filter tables by name'); ?>" /> </span> <?php } diff --git a/themes/original/css/theme_left.css.php b/themes/original/css/theme_left.css.php index 31dd39a..a8f3faf 100644 --- a/themes/original/css/theme_left.css.php +++ b/themes/original/css/theme_left.css.php @@ -248,3 +248,7 @@ div#left_tableList ul ul { margin: 0; border: 0; } + +#fast_filter.gray { + color: gray; +} \ No newline at end of file diff --git a/themes/pmahomme/css/theme_left.css.php b/themes/pmahomme/css/theme_left.css.php index c9f6132..0c2c29d 100644 --- a/themes/pmahomme/css/theme_left.css.php +++ b/themes/pmahomme/css/theme_left.css.php @@ -306,3 +306,7 @@ div#left_tableList ul ul { width: 85%; padding: 0.1em; } + +#fast_filter.gray { + color: gray; +} \ No newline at end of file
hooks/post-receive