mirror of
https://github.com/zero-peak/ZeroOmega.git
synced 2025-01-22 15:08:12 -05:00
Hide profiles beginning with underscores.
This commit is contained in:
parent
4ca4b93822
commit
8a777054d1
@ -1,5 +1,6 @@
|
|||||||
angular.module('omega').filter 'profiles', (builtinProfiles, profileOrder) ->
|
angular.module('omega').filter 'profiles', (builtinProfiles, profileOrder) ->
|
||||||
charCodePlus = '+'.charCodeAt(0)
|
charCodePlus = '+'.charCodeAt(0)
|
||||||
|
charCodeUnderscore = '_'.charCodeAt(0)
|
||||||
builtinProfileList = (profile for _, profile of builtinProfiles)
|
builtinProfileList = (profile for _, profile of builtinProfiles)
|
||||||
(options, filter) ->
|
(options, filter) ->
|
||||||
result = []
|
result = []
|
||||||
@ -11,7 +12,15 @@ angular.module('omega').filter 'profiles', (builtinProfiles, profileOrder) ->
|
|||||||
filter = filter.substr(1)
|
filter = filter.substr(1)
|
||||||
result = OmegaPac.Profiles.validResultProfilesFor(filter, options)
|
result = OmegaPac.Profiles.validResultProfilesFor(filter, options)
|
||||||
if filter == 'all'
|
if filter == 'all'
|
||||||
|
result = result.filter (profile) ->
|
||||||
|
# Hide profiles beginning with underscore.
|
||||||
|
profile.name.charCodeAt(0) != charCodeUnderscore
|
||||||
result = result.concat builtinProfileList
|
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'
|
if filter == 'sorted'
|
||||||
result.sort profileOrder
|
result.sort profileOrder
|
||||||
result
|
result
|
||||||
|
Loading…
Reference in New Issue
Block a user