Move input event binding to separate js file.

This commit is contained in:
Michal Čihař
2010-04-02 13:33:12 +02:00
parent 829a7d8146
commit e049a44f59
2 changed files with 3 additions and 4 deletions

View File

@@ -188,4 +188,6 @@ jQuery(document).ready(function(){
/* Display filter */ /* Display filter */
jQuery('#NavFilter').css('display', 'inline'); jQuery('#NavFilter').css('display', 'inline');
jQuery('#clear_fast_filter').click(clear_fast_filter); jQuery('#clear_fast_filter').click(clear_fast_filter);
jQuery('#fast_filter').focus(function (evt) {evt.target.select();});
jQuery('#fast_filter').keyup(function (evt) {fast_filter(evt.target.value);});
}); });

View File

@@ -317,10 +317,7 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
if ($table_count) { if ($table_count) {
?> ?>
<span id="NavFilter"> <span id="NavFilter">
<input type="text" name="fast_filter" id="fast_filter" <input type="text" name="fast_filter" id="fast_filter" title="<?php echo $strNavTableFilter; ?>" />
title="<?php echo $strNavTableFilter; ?>"
onkeyup="setTimeout(function(word){ return function(){ fast_filter(word);}}(this.value),1000);"
onfocus="this.select();" />
<span id="clear_fast_filter" title="<?php echo $strReset; ?>">X</span> <span id="clear_fast_filter" title="<?php echo $strReset; ?>">X</span>
</span> </span>
<?php <?php