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
25f6a3f5
Commit
25f6a3f5
authored
Sep 04, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix subscribe on non-boards page
parent
e0832e6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
app/assets/javascripts/subscription.js
app/assets/javascripts/subscription.js
+9
-3
No files found.
app/assets/javascripts/subscription.js
View file @
25f6a3f5
...
...
@@ -18,14 +18,20 @@ class Subscription {
}
button
.
classList
.
add
(
'
disabled
'
);
// hack to allow this to work with the issue boards Vue object
const
isBoardsPage
=
document
.
querySelector
(
'
html
'
).
classList
.
contains
(
'
issue-boards-page
'
);
const
isSubscribed
=
buttonSpan
.
innerHTML
.
trim
().
toLowerCase
()
!==
'
subscribe
'
;
const
toggleActionUrl
=
this
.
containerElm
.
dataset
.
url
.
replace
(
'
:project_path
'
,
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
.
project
.
path
);
let
toggleActionUrl
=
this
.
containerElm
.
dataset
.
url
;
if
(
isBoardsPage
)
{
toggleActionUrl
=
toggleActionUrl
.
replace
(
'
:project_path
'
,
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
.
project
.
path
);
}
$
.
post
(
toggleActionUrl
,
()
=>
{
button
.
classList
.
remove
(
'
disabled
'
);
// hack to allow this to work with the issue boards Vue object
if
(
document
.
querySelector
(
'
html
'
).
classList
.
contains
(
'
issue-boards-page
'
))
{
if
(
isBoardsPage
)
{
gl
.
issueBoards
.
boardStoreIssueSet
(
'
subscribed
'
,
!
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
.
subscribed
,
...
...
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