From 91cb61ce9cb61b0fa82780d2ba12a42b2293c169 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 6 Jun 2015 18:45:30 -0400 Subject: [PATCH] code review: important filter option senseless for exception filters --- src/js/logger-ui.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/js/logger-ui.js b/src/js/logger-ui.js index dcfe894f3..93bab0eeb 100644 --- a/src/js/logger-ui.js +++ b/src/js/logger-ui.js @@ -658,19 +658,15 @@ var filteringDialog = (function() { var parseStaticInputs = function() { var filter = ''; - var value; - value = selectValue('select.static.action'); - if ( value !== '' ) { + var options = []; + var block = selectValue('select.static.action') === ''; + if ( !block ) { filter = '@@'; } - value = selectValue('select.static.url'); + var value = selectValue('select.static.url'); if ( value !== '' ) { filter += '||' + value; } - var options = []; - if ( selectValue('select.static.importance') !== '' ) { - options.push('important'); - } value = selectValue('select.static.type'); if ( value !== '' ) { options.push(uglyTypeFromSelector('static')); @@ -683,6 +679,9 @@ var filteringDialog = (function() { options.push('domain=' + value); } } + if ( block && selectValue('select.static.importance') !== '' ) { + options.push('important'); + } if ( options.length ) { filter += '$' + options.join(','); }