diff --git a/omega-pac/src/rule_list.coffee b/omega-pac/src/rule_list.coffee index 083a538..988815e 100644 --- a/omega-pac/src/rule_list.coffee +++ b/omega-pac/src/rule_list.coffee @@ -57,17 +57,18 @@ module.exports = exports = normal_rules = [] exclusive_rules = [] begin = false + section = 'WILDCARD' for line in text.split(/\n|\r/) line = line.trim() continue if line.length == 0 || line[0] == ';' if not begin - if line == '#BEGIN' + if line.toUpperCase() == '#BEGIN' begin = true continue - if line == '#END' + if line.toUpperCase() == '#END' break if line[0] == '[' and line[line.length - 1] == ']' - section = line.substring(1, line.length - 1) + section = line.substring(1, line.length - 1).toUpperCase() continue source = line profile = matchProfileName @@ -77,10 +78,10 @@ module.exports = exports = list = exclusive_rules line = line.substring(1) cond = switch section - when 'Wildcard' + when 'WILDCARD' conditionType: 'UrlWildcardCondition' pattern: line - when 'RegExp' + when 'REGEXP' conditionType: 'UrlRegexCondition' pattern: line else diff --git a/omega-web/src/coffee/omega_decoration.coffee b/omega-web/src/coffee/omega_decoration.coffee index cda395a..adcaf3e 100644 --- a/omega-web/src/coffee/omega_decoration.coffee +++ b/omega-web/src/coffee/omega_decoration.coffee @@ -69,5 +69,6 @@ angular.module('omegaDecoration', []).value('profileIcons', { ngModel.$render() scope.getName = (profile) -> - scope.dispName?({$profile: profile}) || profile?.name + if profile + scope.dispName?({$profile: profile}) || profile?.name ) diff --git a/omega-web/src/partials/delete_attached.jade b/omega-web/src/partials/delete_attached.jade index b89d1eb..cbd91e9 100644 --- a/omega-web/src/partials/delete_attached.jade +++ b/omega-web/src/partials/delete_attached.jade @@ -8,7 +8,7 @@ .well span.glyphicon(class='{{profileIcons[attached.profileType]}}') = ' ' - | {{attached.sourceUrl || ('options_ruleListLineCount' | tr:[attached.ruleList.split('\r?\n').length])}} + | {{attached.sourceUrl || ('options_ruleListLineCount' | tr:[attached.ruleList.split('\n').length])}} .modal-footer button.btn.btn-default(ng-click='$dismiss()') {{'dialog_cancel' | tr}} button.btn.btn-danger(type='button' ng-click='$close("ok")') {{'options_deleteAttached' | tr}}