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
ba96309f
Commit
ba96309f
authored
Jan 29, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted issuable_index to axios
parent
dab430f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
app/assets/javascripts/issuable_index.js
app/assets/javascripts/issuable_index.js
+15
-13
No files found.
app/assets/javascripts/issuable_index.js
View file @
ba96309f
import
axios
from
'
./lib/utils/axios_utils
'
;
import
flash
from
'
./flash
'
;
import
{
__
}
from
'
./locale
'
;
import
IssuableBulkUpdateSidebar
from
'
./issuable_bulk_update_sidebar
'
;
import
IssuableBulkUpdateActions
from
'
./issuable_bulk_update_actions
'
;
...
...
@@ -23,20 +26,19 @@ export default class IssuableIndex {
$
(
'
.incoming-email-token-reset
'
).
on
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
$
.
ajax
({
type
:
'
PUT
'
,
url
:
$
(
'
.incoming-email-token-reset
'
).
attr
(
'
href
'
),
dataType
:
'
json
'
,
success
(
response
)
{
$
(
'
#issuable_email
'
).
val
(
response
.
new_address
).
focus
();
},
beforeSend
()
{
$
(
'
.incoming-email-token-reset
'
).
text
(
'
resetting...
'
);
},
complete
()
{
$
(
'
.incoming-email-token-reset
'
).
text
(
'
resetting...
'
);
axios
.
put
(
$
(
'
.incoming-email-token-reset
'
).
attr
(
'
href
'
))
.
then
(({
data
})
=>
{
$
(
'
#issuable_email
'
).
val
(
data
.
new_address
).
focus
();
$
(
'
.incoming-email-token-reset
'
).
text
(
'
reset it
'
);
},
});
})
.
catch
(()
=>
{
flash
(
__
(
'
There was an error when reseting email token.
'
));
$
(
'
.incoming-email-token-reset
'
).
text
(
'
reset it
'
);
});
});
}
}
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