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
4b5e00a8
Commit
4b5e00a8
authored
Oct 04, 2018
by
Marcos Barrera
Committed by
Phil Hughes
Oct 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Error while updating todo status: the button is stuck in the loading state"
parent
7876a739
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
app/assets/javascripts/pages/dashboard/todos/index/todos.js
app/assets/javascripts/pages/dashboard/todos/index/todos.js
+9
-3
changelogs/unreleased/48222-fix-todos-status-button.yml
changelogs/unreleased/48222-fix-todos-status-button.yml
+6
-0
No files found.
app/assets/javascripts/pages/dashboard/todos/index/todos.js
View file @
4b5e00a8
...
...
@@ -79,10 +79,13 @@ export default class Todos {
.
then
(({
data
})
=>
{
this
.
updateRowState
(
target
);
this
.
updateBadges
(
data
);
}).
catch
(()
=>
flash
(
__
(
'
Error updating todo status.
'
)));
}).
catch
(()
=>
{
this
.
updateRowState
(
target
,
true
);
return
flash
(
__
(
'
Error updating todo status.
'
));
});
}
updateRowState
(
target
)
{
updateRowState
(
target
,
isInactive
=
false
)
{
const
row
=
target
.
closest
(
'
li
'
);
const
restoreBtn
=
row
.
querySelector
(
'
.js-undo-todo
'
);
const
doneBtn
=
row
.
querySelector
(
'
.js-done-todo
'
);
...
...
@@ -91,7 +94,10 @@ export default class Todos {
target
.
removeAttribute
(
'
disabled
'
);
target
.
classList
.
remove
(
'
disabled
'
);
if
(
target
===
doneBtn
)
{
if
(
isInactive
===
true
)
{
restoreBtn
.
classList
.
add
(
'
hidden
'
);
doneBtn
.
classList
.
remove
(
'
hidden
'
);
}
else
if
(
target
===
doneBtn
)
{
row
.
classList
.
add
(
'
done-reversible
'
);
restoreBtn
.
classList
.
remove
(
'
hidden
'
);
}
else
if
(
target
===
restoreBtn
)
{
...
...
changelogs/unreleased/48222-fix-todos-status-button.yml
0 → 100644
View file @
4b5e00a8
---
title
:
Fix the state of the Done button when there is an error in the GitLab Todos
section
merge_request
:
author
:
marcos8896
type
:
fixed
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