Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
8b4e4e33
Commit
8b4e4e33
authored
Nov 09, 2016
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix JS for tests
parent
6fb47427
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
...avascripts/filtered_search/filtered_search_manager.js.es6
+4
-3
app/assets/javascripts/filtered_search/filtered_search_tokenizer.es6
...javascripts/filtered_search/filtered_search_tokenizer.es6
+1
-1
No files found.
app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
View file @
8b4e4e33
...
...
@@ -50,7 +50,7 @@
// Sanitize value since URL converts spaces into +
// Replace before decode so that we know what was originally + versus the encoded +
const sanitizedValue = value ? decodeURIComponent(value.replace(/[+]/g, ' ')) : value;
const match = validTokenKeys.fi
nd(t => key === `${t.key}_${t.param}`)
;
const match = validTokenKeys.fi
lter(t => key === `${t.key}_${t.param}`)[0]
;
if (match) {
const sanitizedKey = key.slice(0, key.indexOf('_'));
...
...
@@ -103,7 +103,8 @@
}
checkForEnter(event) {
if (event.key === 'Enter') {
// Enter KeyCode
if (event.keyCode === 13) {
event.stopPropagation();
event.preventDefault();
this.search();
...
...
@@ -132,7 +133,7 @@
path += `&state=${currentState}`;
tokens.forEach((token) => {
const param = validTokenKeys.fi
nd(t => t.key === token.key)
.param;
const param = validTokenKeys.fi
lter(t => t.key === token.key)[0]
.param;
path += `&${token.key}_${param}=${encodeURIComponent(token.value)}`;
});
...
...
app/assets/javascripts/filtered_search/filtered_search_tokenizer.es6
View file @
8b4e4e33
...
...
@@ -57,7 +57,7 @@
if (colonIndex !== -1) {
const tokenKey = i.slice(0, colonIndex).toLowerCase();
const tokenValue = i.slice(colonIndex + 1);
const match = this.validTokenKeys.fi
nd(v => v.key === tokenKey)
;
const match = this.validTokenKeys.fi
lter(v => v.key === tokenKey)[0]
;
if (tokenValue.indexOf('"') !== -1) {
lastQuotation = '"';
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment