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
6ab1456e
Commit
6ab1456e
authored
Feb 13, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace $.post with axios in initPathLocks
parent
1d237d4b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
ee/app/assets/javascripts/path_locks.js
ee/app/assets/javascripts/path_locks.js
+7
-3
No files found.
ee/app/assets/javascripts/path_locks.js
View file @
6ab1456e
import
flash
from
'
~/flash
'
;
import
{
__
}
from
'
~/locale
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
export
default
function
initPathLocks
(
url
,
path
)
{
export
default
function
initPathLocks
(
url
,
path
)
{
$
(
'
a.path-lock
'
).
on
(
'
click
'
,
(
e
)
=>
{
$
(
'
a.path-lock
'
).
on
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
e
.
preventDefault
();
$
.
post
(
url
,
{
axios
.
post
(
url
,
{
path
,
path
,
}
,
()
=>
{
}
).
then
(
()
=>
{
location
.
reload
();
location
.
reload
();
});
})
.
catch
(()
=>
flash
(
__
(
'
An error occurred while initializing path locks
'
)))
;
});
});
}
}
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