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
Boxiang Sun
gitlab-ce
Commits
2f8b9931
Commit
2f8b9931
authored
Jul 25, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CE backport of issue-boards-js-fix
parent
3f14c56b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
73 deletions
+76
-73
app/assets/javascripts/boards/index.js
app/assets/javascripts/boards/index.js
+76
-73
No files found.
app/assets/javascripts/boards/index.js
View file @
2f8b9931
/* eslint-disable quote-props, comma-dangle */
import
$
from
'
jquery
'
;
import
$
from
'
jquery
'
;
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
...
@@ -47,7 +45,7 @@ export default () => {
...
@@ -47,7 +45,7 @@ export default () => {
gl
.
IssueBoardsApp
=
new
Vue
({
gl
.
IssueBoardsApp
=
new
Vue
({
el
:
$boardApp
,
el
:
$boardApp
,
components
:
{
components
:
{
'
board
'
:
gl
.
issueBoards
.
Board
,
board
:
gl
.
issueBoards
.
Board
,
'
board-sidebar
'
:
gl
.
issueBoards
.
BoardSidebar
,
'
board-sidebar
'
:
gl
.
issueBoards
.
BoardSidebar
,
BoardAddIssuesModal
,
BoardAddIssuesModal
,
},
},
...
@@ -65,11 +63,11 @@ export default () => {
...
@@ -65,11 +63,11 @@ export default () => {
defaultAvatar
:
$boardApp
.
dataset
.
defaultAvatar
,
defaultAvatar
:
$boardApp
.
dataset
.
defaultAvatar
,
},
},
computed
:
{
computed
:
{
detailIssueVisible
()
{
detailIssueVisible
()
{
return
Object
.
keys
(
this
.
detailIssue
.
issue
).
length
;
return
Object
.
keys
(
this
.
detailIssue
.
issue
).
length
;
},
},
},
},
created
()
{
created
()
{
gl
.
boardService
=
new
BoardService
({
gl
.
boardService
=
new
BoardService
({
boardsEndpoint
:
this
.
boardsEndpoint
,
boardsEndpoint
:
this
.
boardsEndpoint
,
listsEndpoint
:
this
.
listsEndpoint
,
listsEndpoint
:
this
.
listsEndpoint
,
...
@@ -89,15 +87,16 @@ export default () => {
...
@@ -89,15 +87,16 @@ export default () => {
eventHub
.
$off
(
'
clearDetailIssue
'
,
this
.
clearDetailIssue
);
eventHub
.
$off
(
'
clearDetailIssue
'
,
this
.
clearDetailIssue
);
sidebarEventHub
.
$off
(
'
toggleSubscription
'
,
this
.
toggleSubscription
);
sidebarEventHub
.
$off
(
'
toggleSubscription
'
,
this
.
toggleSubscription
);
},
},
mounted
()
{
mounted
()
{
this
.
filterManager
=
new
FilteredSearchBoards
(
Store
.
filter
,
true
,
Store
.
cantEdit
);
this
.
filterManager
=
new
FilteredSearchBoards
(
Store
.
filter
,
true
,
Store
.
cantEdit
);
this
.
filterManager
.
setup
();
this
.
filterManager
.
setup
();
Store
.
disabled
=
this
.
disabled
;
Store
.
disabled
=
this
.
disabled
;
gl
.
boardService
.
all
()
gl
.
boardService
.
all
()
.
then
(
res
=>
res
.
data
)
.
then
(
res
=>
res
.
data
)
.
then
(
(
data
)
=>
{
.
then
(
data
=>
{
data
.
forEach
(
(
board
)
=>
{
data
.
forEach
(
board
=>
{
const
list
=
Store
.
addList
(
board
,
this
.
defaultAvatar
);
const
list
=
Store
.
addList
(
board
,
this
.
defaultAvatar
);
if
(
list
.
type
===
'
closed
'
)
{
if
(
list
.
type
===
'
closed
'
)
{
...
@@ -126,7 +125,7 @@ export default () => {
...
@@ -126,7 +125,7 @@ export default () => {
newIssue
.
setFetchingState
(
'
subscriptions
'
,
true
);
newIssue
.
setFetchingState
(
'
subscriptions
'
,
true
);
BoardService
.
getIssueInfo
(
sidebarInfoEndpoint
)
BoardService
.
getIssueInfo
(
sidebarInfoEndpoint
)
.
then
(
res
=>
res
.
data
)
.
then
(
res
=>
res
.
data
)
.
then
(
(
data
)
=>
{
.
then
(
data
=>
{
newIssue
.
setFetchingState
(
'
subscriptions
'
,
false
);
newIssue
.
setFetchingState
(
'
subscriptions
'
,
false
);
newIssue
.
updateData
({
newIssue
.
updateData
({
subscribed
:
data
.
subscribed
,
subscribed
:
data
.
subscribed
,
...
@@ -159,7 +158,7 @@ export default () => {
...
@@ -159,7 +158,7 @@ export default () => {
Flash
(
__
(
'
An error occurred when toggling the notification subscription
'
));
Flash
(
__
(
'
An error occurred when toggling the notification subscription
'
));
});
});
}
}
}
}
,
},
},
});
});
...
@@ -168,13 +167,16 @@ export default () => {
...
@@ -168,13 +167,16 @@ export default () => {
data
:
{
data
:
{
filters
:
Store
.
state
.
filters
,
filters
:
Store
.
state
.
filters
,
},
},
mounted
()
{
mounted
()
{
gl
.
issueBoards
.
newListDropdownInit
();
gl
.
issueBoards
.
newListDropdownInit
();
},
},
});
});
const
issueBoardsModal
=
document
.
getElementById
(
'
js-add-issues-btn
'
);
if
(
issueBoardsModal
)
{
gl
.
IssueBoardsModalAddBtn
=
new
Vue
({
gl
.
IssueBoardsModalAddBtn
=
new
Vue
({
el
:
document
.
getElementById
(
'
js-add-issues-btn
'
)
,
el
:
issueBoardsModal
,
mixins
:
[
modalMixin
],
mixins
:
[
modalMixin
],
data
()
{
data
()
{
return
{
return
{
...
@@ -241,4 +243,5 @@ export default () => {
...
@@ -241,4 +243,5 @@ export default () => {
</div>
</div>
`
,
`
,
});
});
}
};
};
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