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
85e0bf39
Commit
85e0bf39
authored
Feb 02, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted project_label_subscription.js to use axios
parent
9f553730
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
app/assets/javascripts/project_label_subscription.js
app/assets/javascripts/project_label_subscription.js
+6
-5
No files found.
app/assets/javascripts/project_label_subscription.js
View file @
85e0bf39
import
{
__
}
from
'
./locale
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
import
flash
from
'
./flash
'
;
export
default
class
ProjectLabelSubscription
{
constructor
(
container
)
{
this
.
$container
=
$
(
container
);
...
...
@@ -17,10 +21,7 @@ export default class ProjectLabelSubscription {
$btn
.
addClass
(
'
disabled
'
);
$span
.
toggleClass
(
'
hidden
'
);
$
.
ajax
({
type
:
'
POST
'
,
url
,
}).
done
(()
=>
{
axios
.
post
(
url
).
then
(()
=>
{
let
newStatus
;
let
newAction
;
...
...
@@ -45,6 +46,6 @@ export default class ProjectLabelSubscription {
return
button
;
});
});
})
.
catch
(()
=>
flash
(
__
(
'
There was an error subscribing to this label.
'
)))
;
}
}
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