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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f89782b3
Commit
f89782b3
authored
Mar 07, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed store
Async updates the boards when searching
parent
850f19c0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
20 deletions
+40
-20
app/assets/javascripts/boards/boards_bundle.js
app/assets/javascripts/boards/boards_bundle.js
+2
-2
app/assets/javascripts/boards/components/board.js
app/assets/javascripts/boards/components/board.js
+4
-4
app/assets/javascripts/boards/filtered_search_boards.js
app/assets/javascripts/boards/filtered_search_boards.js
+8
-1
app/assets/javascripts/boards/models/list.js
app/assets/javascripts/boards/models/list.js
+16
-4
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+4
-7
app/assets/javascripts/filtered_search/filtered_search_manager.js
...ts/javascripts/filtered_search/filtered_search_manager.js
+6
-2
No files found.
app/assets/javascripts/boards/boards_bundle.js
View file @
f89782b3
...
...
@@ -27,8 +27,6 @@ $(() => {
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
new
FilteredSearchBoards
();
window
.
gl
=
window
.
gl
||
{};
if
(
gl
.
IssueBoardsApp
)
{
...
...
@@ -62,6 +60,8 @@ $(() => {
},
created
()
{
gl
.
boardService
=
new
BoardService
(
this
.
endpoint
,
this
.
bulkUpdatePath
,
this
.
boardId
);
new
FilteredSearchBoards
(
Store
.
filter
);
},
mounted
()
{
Store
.
disabled
=
this
.
disabled
;
...
...
app/assets/javascripts/boards/components/board.js
View file @
f89782b3
...
...
@@ -28,16 +28,16 @@ require('./board_list');
data
()
{
return
{
detailIssue
:
Store
.
detail
,
filter
s
:
Store
.
state
.
filters
,
filter
:
Store
.
filter
,
};
},
watch
:
{
filter
s
:
{
handler
()
{
filter
:
{
handler
()
{
this
.
list
.
page
=
1
;
this
.
list
.
getIssues
(
true
);
},
deep
:
true
deep
:
true
,
},
detailIssue
:
{
handler
()
{
...
...
app/assets/javascripts/boards/filtered_search_boards.js
View file @
f89782b3
export
default
class
FilteredSearchBoards
extends
gl
.
FilteredSearchManager
{
constructor
()
{
constructor
(
store
)
{
super
(
'
boards
'
);
this
.
store
=
store
;
this
.
destroyOnSubmit
=
false
}
updateObject
(
path
)
{
this
.
store
.
path
=
path
.
substr
(
1
);
}
}
app/assets/javascripts/boards/models/list.js
View file @
f89782b3
...
...
@@ -10,7 +10,7 @@ class List {
this
.
title
=
obj
.
title
;
this
.
type
=
obj
.
list_type
;
this
.
preset
=
[
'
done
'
,
'
blank
'
].
indexOf
(
this
.
type
)
>
-
1
;
this
.
filter
s
=
gl
.
issueBoards
.
BoardsStore
.
state
.
filters
;
this
.
filter
Path
=
gl
.
issueBoards
.
BoardsStore
.
filter
.
path
;
this
.
page
=
1
;
this
.
loading
=
true
;
this
.
loadingMore
=
false
;
...
...
@@ -65,12 +65,24 @@ class List {
}
getIssues
(
emptyIssues
=
true
)
{
const
filters
=
this
.
filters
;
const
data
=
{
page
:
this
.
page
};
gl
.
issueBoards
.
BoardsStore
.
filter
.
path
.
split
(
'
&
'
).
forEach
((
filterParam
)
=>
{
const
paramSplit
=
filterParam
.
split
(
'
=
'
);
const
paramKeyNormalized
=
paramSplit
[
0
].
replace
(
'
[]
'
,
''
);
const
isArray
=
paramSplit
[
0
].
indexOf
(
'
[]
'
);
if
(
isArray
>=
0
)
{
if
(
!
data
[
paramKeyNormalized
])
{
data
[
paramKeyNormalized
]
=
[];
}
Object
.
keys
(
filters
).
forEach
((
key
)
=>
{
data
[
key
]
=
filters
[
key
];
});
data
[
paramKeyNormalized
].
push
(
paramSplit
[
1
]);
}
else
{
data
[
paramKeyNormalized
]
=
paramSplit
[
1
];
}
});
if
(
this
.
label
)
{
if
(
this
.
label
&&
data
.
label_name
)
{
data
.
label_name
=
data
.
label_name
.
filter
(
label
=>
label
!==
this
.
label
.
title
);
}
...
...
app/assets/javascripts/boards/stores/boards_store.js
View file @
f89782b3
...
...
@@ -8,6 +8,9 @@
gl
.
issueBoards
.
BoardsStore
=
{
disabled
:
false
,
filter
:
{
path
:
''
,
},
state
:
{},
detail
:
{
issue
:
{}
...
...
@@ -18,13 +21,7 @@
},
create
()
{
this
.
state
.
lists
=
[];
this
.
state
.
filters
=
{
author_username
:
gl
.
utils
.
getParameterValues
(
'
author_username
'
)[
0
],
assignee_username
:
gl
.
utils
.
getParameterValues
(
'
assignee_username
'
)[
0
],
milestone_title
:
gl
.
utils
.
getParameterValues
(
'
milestone_title
'
)[
0
],
label_name
:
gl
.
utils
.
getParameterValues
(
'
label_name[]
'
),
search
:
''
};
this
.
filter
.
path
=
gl
.
utils
.
getUrlParamsArray
().
join
(
'
&
'
);
},
addList
(
listObj
)
{
const
list
=
new
List
(
listObj
);
...
...
app/assets/javascripts/filtered_search/filtered_search_manager.js
View file @
f89782b3
...
...
@@ -106,7 +106,7 @@
if
(
!
activeElements
.
length
)
{
// Prevent droplab from opening dropdown
this
.
dropdownManager
.
destroyDroplab
();
//
this.dropdownManager.destroyDroplab();
this
.
search
();
}
...
...
@@ -345,7 +345,11 @@
const
parameterizedUrl
=
`?scope=all&utf8=✓&
${
paths
.
join
(
'
&
'
)}
`
;
gl
.
utils
.
visitUrl
(
parameterizedUrl
);
if
(
this
.
updateObject
)
{
this
.
updateObject
(
parameterizedUrl
);
}
else
{
gl
.
utils
.
visitUrl
(
parameterizedUrl
);
}
}
getUsernameParams
()
{
...
...
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