Index: trunk/extensions/SemanticResultFormats/Filtered/libs/ext.srf.filtered.value-filter.js |
— | — | @@ -49,10 +49,19 @@ |
50 | 50 | } else { |
51 | 51 | var selected = ( printoutValues.length > 0 ); |
52 | 52 | |
53 | | - for ( var j in printoutValues ) { |
| 53 | + if ( selected ) { |
| 54 | + // try to find each required value |
| 55 | + selectedInputs.each(function(){ |
54 | 56 | |
55 | | - selectedInputs.each(function(){ |
56 | | - selected = selected && ( printoutValues[j] == $(this).attr('value') ); |
| 57 | + var selectedFoundInPrintout = false; |
| 58 | + for ( var j in printoutValues ) { |
| 59 | + selectedFoundInPrintout = selectedFoundInPrintout || ( printoutValues[j] == $(this).attr('value') ); |
| 60 | + |
| 61 | + if ( selectedFoundInPrintout ) { |
| 62 | + break; |
| 63 | + } |
| 64 | + } |
| 65 | + selected = selected && selectedFoundInPrintout; |
57 | 66 | }); |
58 | 67 | } |
59 | 68 | } |
— | — | @@ -101,7 +110,7 @@ |
102 | 111 | filtercontrols.append('<div class="filtered-value-label"><span>' + values[i]['printouts'][target]['label'] + '</span></div>'); |
103 | 112 | |
104 | 113 | // set default config values |
105 | | - filtered.filtered( 'setFilterData', {filter: 'value', printout: target, configvar: 'use or', configvalue: true } ); |
| 114 | + filtered.filtered( 'setFilterData', {filter: 'value', printout: target, configvar: 'use or', configvalue: true} ); |
106 | 115 | |
107 | 116 | |
108 | 117 | // insert switches |