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
Léo-Paul Géneau
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 @@ $(() => {
...
@@ -27,8 +27,6 @@ $(() => {
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
new
FilteredSearchBoards
();
window
.
gl
=
window
.
gl
||
{};
window
.
gl
=
window
.
gl
||
{};
if
(
gl
.
IssueBoardsApp
)
{
if
(
gl
.
IssueBoardsApp
)
{
...
@@ -62,6 +60,8 @@ $(() => {
...
@@ -62,6 +60,8 @@ $(() => {
},
},
created
()
{
created
()
{
gl
.
boardService
=
new
BoardService
(
this
.
endpoint
,
this
.
bulkUpdatePath
,
this
.
boardId
);
gl
.
boardService
=
new
BoardService
(
this
.
endpoint
,
this
.
bulkUpdatePath
,
this
.
boardId
);
new
FilteredSearchBoards
(
Store
.
filter
);
},
},
mounted
()
{
mounted
()
{
Store
.
disabled
=
this
.
disabled
;
Store
.
disabled
=
this
.
disabled
;
...
...
app/assets/javascripts/boards/components/board.js
View file @
f89782b3
...
@@ -28,16 +28,16 @@ require('./board_list');
...
@@ -28,16 +28,16 @@ require('./board_list');
data
()
{
data
()
{
return
{
return
{
detailIssue
:
Store
.
detail
,
detailIssue
:
Store
.
detail
,
filter
s
:
Store
.
state
.
filters
,
filter
:
Store
.
filter
,
};
};
},
},
watch
:
{
watch
:
{
filter
s
:
{
filter
:
{
handler
()
{
handler
()
{
this
.
list
.
page
=
1
;
this
.
list
.
page
=
1
;
this
.
list
.
getIssues
(
true
);
this
.
list
.
getIssues
(
true
);
},
},
deep
:
true
deep
:
true
,
},
},
detailIssue
:
{
detailIssue
:
{
handler
()
{
handler
()
{
...
...
app/assets/javascripts/boards/filtered_search_boards.js
View file @
f89782b3
export
default
class
FilteredSearchBoards
extends
gl
.
FilteredSearchManager
{
export
default
class
FilteredSearchBoards
extends
gl
.
FilteredSearchManager
{
constructor
()
{
constructor
(
store
)
{
super
(
'
boards
'
);
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 {
...
@@ -10,7 +10,7 @@ class List {
this
.
title
=
obj
.
title
;
this
.
title
=
obj
.
title
;
this
.
type
=
obj
.
list_type
;
this
.
type
=
obj
.
list_type
;
this
.
preset
=
[
'
done
'
,
'
blank
'
].
indexOf
(
this
.
type
)
>
-
1
;
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
.
page
=
1
;
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
loadingMore
=
false
;
this
.
loadingMore
=
false
;
...
@@ -65,12 +65,24 @@ class List {
...
@@ -65,12 +65,24 @@ class List {
}
}
getIssues
(
emptyIssues
=
true
)
{
getIssues
(
emptyIssues
=
true
)
{
const
filters
=
this
.
filters
;
const
data
=
{
page
:
this
.
page
};
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
);
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 @@
...
@@ -8,6 +8,9 @@
gl
.
issueBoards
.
BoardsStore
=
{
gl
.
issueBoards
.
BoardsStore
=
{
disabled
:
false
,
disabled
:
false
,
filter
:
{
path
:
''
,
},
state
:
{},
state
:
{},
detail
:
{
detail
:
{
issue
:
{}
issue
:
{}
...
@@ -18,13 +21,7 @@
...
@@ -18,13 +21,7 @@
},
},
create
()
{
create
()
{
this
.
state
.
lists
=
[];
this
.
state
.
lists
=
[];
this
.
state
.
filters
=
{
this
.
filter
.
path
=
gl
.
utils
.
getUrlParamsArray
().
join
(
'
&
'
);
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
:
''
};
},
},
addList
(
listObj
)
{
addList
(
listObj
)
{
const
list
=
new
List
(
listObj
);
const
list
=
new
List
(
listObj
);
...
...
app/assets/javascripts/filtered_search/filtered_search_manager.js
View file @
f89782b3
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
if
(
!
activeElements
.
length
)
{
if
(
!
activeElements
.
length
)
{
// Prevent droplab from opening dropdown
// Prevent droplab from opening dropdown
this
.
dropdownManager
.
destroyDroplab
();
//
this.dropdownManager.destroyDroplab();
this
.
search
();
this
.
search
();
}
}
...
@@ -345,7 +345,11 @@
...
@@ -345,7 +345,11 @@
const
parameterizedUrl
=
`?scope=all&utf8=✓&
${
paths
.
join
(
'
&
'
)}
`
;
const
parameterizedUrl
=
`?scope=all&utf8=✓&
${
paths
.
join
(
'
&
'
)}
`
;
gl
.
utils
.
visitUrl
(
parameterizedUrl
);
if
(
this
.
updateObject
)
{
this
.
updateObject
(
parameterizedUrl
);
}
else
{
gl
.
utils
.
visitUrl
(
parameterizedUrl
);
}
}
}
getUsernameParams
()
{
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