code review: important filter option senseless for exception filters

This commit is contained in:
gorhill 2015-06-06 18:45:30 -04:00
parent 2d27cc28ce
commit 91cb61ce9c
1 changed files with 7 additions and 8 deletions

View File

@ -658,19 +658,15 @@ var filteringDialog = (function() {
var parseStaticInputs = function() { var parseStaticInputs = function() {
var filter = ''; var filter = '';
var value; var options = [];
value = selectValue('select.static.action'); var block = selectValue('select.static.action') === '';
if ( value !== '' ) { if ( !block ) {
filter = '@@'; filter = '@@';
} }
value = selectValue('select.static.url'); var value = selectValue('select.static.url');
if ( value !== '' ) { if ( value !== '' ) {
filter += '||' + value; filter += '||' + value;
} }
var options = [];
if ( selectValue('select.static.importance') !== '' ) {
options.push('important');
}
value = selectValue('select.static.type'); value = selectValue('select.static.type');
if ( value !== '' ) { if ( value !== '' ) {
options.push(uglyTypeFromSelector('static')); options.push(uglyTypeFromSelector('static'));
@ -683,6 +679,9 @@ var filteringDialog = (function() {
options.push('domain=' + value); options.push('domain=' + value);
} }
} }
if ( block && selectValue('select.static.importance') !== '' ) {
options.push('important');
}
if ( options.length ) { if ( options.length ) {
filter += '$' + options.join(','); filter += '$' + options.join(',');
} }