diff --git a/Source/files/search.js b/Source/files/search.js index c064b0d..ecef314 100644 --- a/Source/files/search.js +++ b/Source/files/search.js @@ -29,7 +29,7 @@ //continue; } - var show = $(this).hasClass( "SourceAny" ); + var show = types.length < 1 || $(this).hasClass( "SourceAny" ); for(var i = 0; !show && i < types.length; i++) { if ( types[i] == "SourceType" || $(this).hasClass( types[i] ) ) { show = true; @@ -44,12 +44,12 @@ } }); - SourceRepoChange(); + reposelect.each( SourceRepoChange ); } function SourceRepoChange() { var options = $(this).children("option:selected"); - var types = new Array(); + var repos = new Array(); options.each( function(index) { repos.push( "SourceRepo" + this.value ) }); @@ -58,7 +58,7 @@ //continue; } - var show = $(this).hasClass( "SourceAny" ); + var show = repos.length < 1 || $(this).hasClass( "SourceAny" ); for(var i = 0; !show && i < repos.length; i++) { if ( repos[i] == "SourceRepo" || $(this).hasClass( repos[i] ) ) { show = true;