diff --git a/omega-web/src/omega/filters.coffee b/omega-web/src/omega/filters.coffee index 1caa113..4d23bd6 100644 --- a/omega-web/src/omega/filters.coffee +++ b/omega-web/src/omega/filters.coffee @@ -1,5 +1,6 @@ angular.module('omega').filter 'profiles', (builtinProfiles, profileOrder) -> charCodePlus = '+'.charCodeAt(0) + charCodeUnderscore = '_'.charCodeAt(0) builtinProfileList = (profile for _, profile of builtinProfiles) (options, filter) -> result = [] @@ -11,7 +12,15 @@ angular.module('omega').filter 'profiles', (builtinProfiles, profileOrder) -> filter = filter.substr(1) result = OmegaPac.Profiles.validResultProfilesFor(filter, options) if filter == 'all' + result = result.filter (profile) -> + # Hide profiles beginning with underscore. + profile.name.charCodeAt(0) != charCodeUnderscore result = result.concat builtinProfileList + else + result = result.filter (profile) -> + # Hide profiles beginning with double underscore in options. + (profile.name.charCodeAt(0) != charCodeUnderscore or + profile.name.charCodeAt(1) != charCodeUnderscore) if filter == 'sorted' result.sort profileOrder result