BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
addbf88c
Commit
addbf88c
authored
Mar 15, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed eslint
parent
fbf1cc6a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
filtered_search_boards.js
app/assets/javascripts/boards/filtered_search_boards.js
+1
-0
query_data.js
app/assets/javascripts/boards/utils/query_data.js
+17
-18
No files found.
app/assets/javascripts/boards/filtered_search_boards.js
View file @
addbf88c
/* eslint-disable class-methods-use-this */
import
FilteredSearchContainer
from
'../filtered_search/container'
;
export
default
class
FilteredSearchBoards
extends
gl
.
FilteredSearchManager
{
...
...
app/assets/javascripts/boards/utils/query_data.js
View file @
addbf88c
export
default
(
path
,
extraData
)
=>
{
return
path
.
split
(
'&'
).
reduce
((
data
,
filterParam
)
=>
{
if
(
filterParam
===
''
)
return
data
;
const
paramSplit
=
filterParam
.
split
(
'='
);
const
paramKeyNormalized
=
paramSplit
[
0
].
replace
(
'[]'
,
''
);
const
isArray
=
paramSplit
[
0
].
indexOf
(
'[]'
);
const
value
=
decodeURIComponent
(
paramSplit
[
1
]).
replace
(
/
\+
/g
,
' '
);
export
default
(
path
,
extraData
)
=>
path
.
split
(
'&'
).
reduce
((
dataParam
,
filterParam
)
=>
{
if
(
filterParam
===
''
)
return
dataParam
;
if
(
isArray
!==
-
1
)
{
if
(
!
data
[
paramKeyNormalized
])
{
data
[
paramKeyNormalized
]
=
[];
}
const
data
=
dataParam
;
const
paramSplit
=
filterParam
.
split
(
'='
);
const
paramKeyNormalized
=
paramSplit
[
0
].
replace
(
'[]'
,
''
);
const
isArray
=
paramSplit
[
0
].
indexOf
(
'[]'
);
const
value
=
decodeURIComponent
(
paramSplit
[
1
]).
replace
(
/
\+
/g
,
' '
);
data
[
paramKeyNormalized
].
push
(
value
);
}
else
{
data
[
paramKeyNormalized
]
=
value
;
if
(
isArray
!==
-
1
)
{
if
(
!
data
[
paramKeyNormalized
])
{
data
[
paramKeyNormalized
]
=
[]
;
}
return
data
;
},
extraData
);
}
data
[
paramKeyNormalized
].
push
(
value
);
}
else
{
data
[
paramKeyNormalized
]
=
value
;
}
return
data
;
},
extraData
);
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