From cc433c1d983531ed885cd2a5893261304f7514d2 Mon Sep 17 00:00:00 2001 From: mcramer <m.cramer@pixcept.de> Date: Fri, 19 Oct 2012 11:43:39 -0400 Subject: [PATCH] Fixed: do not display hidden option elements in the jquery combo box --- interface/web/js/jquery.tipsy.js | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/web/js/jquery.tipsy.js b/interface/web/js/jquery.tipsy.js index bd52335..efe9612 100644 --- a/interface/web/js/jquery.tipsy.js +++ b/interface/web/js/jquery.tipsy.js @@ -269,7 +269,7 @@ response( select.children( "option" ).map(function() { var text = $( this ).text(); //if ( this.value && ( !request.term || matcher.test(text) ) ) - if ( !request.term || matcher.test(text) ) + if ( (!request.term || matcher.test(text)) && $(this).css('display') != 'none' ) return { label: (text == "" ? " " : text.replace( new RegExp( @@ -305,7 +305,7 @@ matchtext = $(this).val(); valid = false; select.children( "option" ).each(function() { - if( ($(this).text() == "" && matchtext == "") || $( this ).text().match( matcher ) ) { + if( (($(this).text() == "" && matchtext == "") || $( this ).text().match( matcher )) && $(this).css('display') != 'none' ) { select.val($(this).val()); this.selected = valid = true; return false; @@ -329,7 +329,7 @@ valid = false, selected = false; select.children( "option" ).each(function() { - if( ($(this).val() == "" && matchtext == "") || $( this ).text().match( matcher ) ) { + if( (($(this).val() == "" && matchtext == "") || $( this ).text().match( matcher )) && $(this).css('display') != 'none' ) { valid = true; selected = $(this); return false; @@ -357,7 +357,7 @@ valid = false, selected = false; select.children( "option" ).each(function() { - if( ($(this).val() == "" && matchtext == "") || $( this ).text().match( matcher ) ) { + if( (($(this).val() == "" && matchtext == "") || $( this ).text().match( matcher )) && $(this).css('display') != 'none' ) { valid = true; selected = $(this); return false; -- Gitblit v1.9.1