diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2018-10-01 15:00:00 -0500 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2018-10-01 15:00:00 -0500 |
commit | 755fbcc082cf01bb36e9aa666c85c2144effed2f (patch) | |
tree | b84fc393f183fc39bdbe2e25682d634ba5bb1352 | |
parent | c2303bf5295cb7b316e63fde65828228d31dcdaa (diff) | |
download | gitlab-ce-ccr/wip_filter.tar.gz |
Fix bad merge conflictsccr/wip_filter
3 files changed, 12 insertions, 12 deletions
diff --git a/app/assets/javascripts/filtered_search/filtered_search_token_keys.js b/app/assets/javascripts/filtered_search/filtered_search_token_keys.js index 1b9219b503b..a09ad3e4758 100644 --- a/app/assets/javascripts/filtered_search/filtered_search_token_keys.js +++ b/app/assets/javascripts/filtered_search/filtered_search_token_keys.js @@ -23,18 +23,18 @@ export default class FilteredSearchTokenKeys { return this.conditions; } - static shouldUppercaseTokenName(tokenKey) { - const token = FilteredSearchTokenKeys.searchByKey(tokenKey.toLowerCase()); + shouldUppercaseTokenName(tokenKey) { + const token = this.searchByKey(tokenKey.toLowerCase()); return token && token.uppercaseTokenName; } - static shouldCapitalizeTokenValue(tokenKey) { - const token = FilteredSearchTokenKeys.searchByKey(tokenKey.toLowerCase()); + shouldCapitalizeTokenValue(tokenKey) { + const token = this.searchByKey(tokenKey.toLowerCase()); return token && token.capitalizeTokenValue; } - static searchByKey(key) { - return tokenKeys.find(tokenKey => tokenKey.key === key) || null; + searchByKey(key) { + return this.tokenKeys.find(tokenKey => tokenKey.key === key) || null; } searchBySymbol(symbol) { @@ -66,20 +66,20 @@ export default class FilteredSearchTokenKeys { .find(condition => condition.tokenKey === key && condition.value === value) || null; } - static addExtraTokensForMergeRequests() { + addExtraTokensForMergeRequests() { const wipToken = { key: 'wip', type: 'string', param: '', symbol: '', - icon: 'wrench', + icon: 'admin', tag: 'Yes or No', lowercaseValueOnSubmit: true, uppercaseTokenName: true, capitalizeTokenValue: true, }; - tokenKeys.push(wipToken); - tokenKeysWithAlternative.push(wipToken); + this.tokenKeys.push(wipToken); + this.tokenKeysWithAlternative.push(wipToken); } } diff --git a/app/assets/javascripts/pages/groups/merge_requests/index.js b/app/assets/javascripts/pages/groups/merge_requests/index.js index 946144de9c9..0d5a85c0bbe 100644 --- a/app/assets/javascripts/pages/groups/merge_requests/index.js +++ b/app/assets/javascripts/pages/groups/merge_requests/index.js @@ -5,7 +5,7 @@ import { FILTERED_SEARCH } from '~/pages/constants'; import FilteredSearchTokenKeys from '~/filtered_search/filtered_search_token_keys'; document.addEventListener('DOMContentLoaded', () => { - FilteredSearchTokenKeys.addExtraTokensForMergeRequests(); + IssuableFilteredSearchTokenKeys.addExtraTokensForMergeRequests(); initFilteredSearch({ page: FILTERED_SEARCH.MERGE_REQUESTS, diff --git a/app/assets/javascripts/pages/projects/merge_requests/index/index.js b/app/assets/javascripts/pages/projects/merge_requests/index/index.js index c4504f9e1bc..ec39db12e74 100644 --- a/app/assets/javascripts/pages/projects/merge_requests/index/index.js +++ b/app/assets/javascripts/pages/projects/merge_requests/index/index.js @@ -7,7 +7,7 @@ import { FILTERED_SEARCH } from '~/pages/constants'; import { ISSUABLE_INDEX } from '~/pages/projects/constants'; document.addEventListener('DOMContentLoaded', () => { - FilteredSearchTokenKeys.addExtraTokensForMergeRequests(); + IssuableFilteredSearchTokenKeys.addExtraTokensForMergeRequests(); initFilteredSearch({ page: FILTERED_SEARCH.MERGE_REQUESTS, |