summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/filtered_search/filtered_search_token_keys.js20
-rw-r--r--app/assets/javascripts/pages/groups/merge_requests/index.js2
-rw-r--r--app/assets/javascripts/pages/projects/merge_requests/index/index.js2
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,