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
25abe2cd
Commit
25abe2cd
authored
Mar 17, 2022
by
Payton Burdette
Committed by
Ezekiel Kigbo
Mar 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust todo button margin
Only show margin from the loading spinner once it's visible.
parent
1f6c3d73
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
app/assets/javascripts/pages/dashboard/todos/index/todos.js
app/assets/javascripts/pages/dashboard/todos/index/todos.js
+8
-0
app/views/dashboard/todos/_todo.html.haml
app/views/dashboard/todos/_todo.html.haml
+3
-3
app/views/dashboard/todos/index.html.haml
app/views/dashboard/todos/index.html.haml
+2
-2
No files found.
app/assets/javascripts/pages/dashboard/todos/index/todos.js
View file @
25abe2cd
...
...
@@ -96,6 +96,8 @@ export default class Todos {
target
.
setAttribute
(
'
disabled
'
,
true
);
target
.
classList
.
add
(
'
disabled
'
);
target
.
querySelector
(
'
.gl-spinner-container
'
).
classList
.
add
(
'
gl-mr-2
'
);
axios
[
target
.
dataset
.
method
](
target
.
dataset
.
href
)
.
then
(({
data
})
=>
{
this
.
updateRowState
(
target
);
...
...
@@ -118,6 +120,8 @@ export default class Todos {
target
.
removeAttribute
(
'
disabled
'
);
target
.
classList
.
remove
(
'
disabled
'
);
target
.
querySelector
(
'
.gl-spinner-container
'
).
classList
.
remove
(
'
gl-mr-2
'
);
if
(
isInactive
===
true
)
{
restoreBtn
.
classList
.
add
(
'
hidden
'
);
doneBtn
.
classList
.
remove
(
'
hidden
'
);
...
...
@@ -140,6 +144,8 @@ export default class Todos {
target
.
setAttribute
(
'
disabled
'
,
true
);
target
.
classList
.
add
(
'
disabled
'
);
target
.
querySelector
(
'
.gl-spinner-container
'
).
classList
.
add
(
'
gl-mr-2
'
);
axios
[
target
.
dataset
.
method
](
target
.
dataset
.
href
,
{
ids
:
this
.
todo_ids
,
})
...
...
@@ -163,6 +169,8 @@ export default class Todos {
target
.
removeAttribute
(
'
disabled
'
);
target
.
classList
.
remove
(
'
disabled
'
);
target
.
querySelector
(
'
.gl-spinner-container
'
).
classList
.
remove
(
'
gl-mr-2
'
);
this
.
todo_ids
=
target
===
markAllDoneBtn
?
data
.
updated_ids
:
[];
undoAllBtn
.
classList
.
toggle
(
'
hidden
'
);
markAllDoneBtn
.
classList
.
toggle
(
'
hidden
'
);
...
...
app/views/dashboard/todos/_todo.html.haml
View file @
25abe2cd
...
...
@@ -50,12 +50,12 @@
.todo-actions.gl-ml-3
-
if
todo
.
pending?
=
link_to
dashboard_todo_path
(
todo
),
method: :delete
,
class:
'gl-button btn btn-default btn-loading d-flex align-items-center js-done-todo'
,
data:
{
href:
dashboard_todo_path
(
todo
)
}
do
=
gl_loading_icon
(
inline:
true
,
css_class:
'gl-mr-2'
)
=
gl_loading_icon
(
inline:
true
)
Done
=
link_to
restore_dashboard_todo_path
(
todo
),
method: :patch
,
class:
'gl-button btn btn-default btn-loading d-flex align-items-center js-undo-todo hidden'
,
data:
{
href:
restore_dashboard_todo_path
(
todo
)
}
do
=
gl_loading_icon
(
inline:
true
,
css_class:
'gl-mr-2'
)
=
gl_loading_icon
(
inline:
true
)
Undo
-
else
=
link_to
restore_dashboard_todo_path
(
todo
),
method: :patch
,
class:
'gl-button btn btn-default btn-loading d-flex align-items-center js-add-todo'
,
data:
{
href:
restore_dashboard_todo_path
(
todo
)
}
do
=
gl_loading_icon
(
inline:
true
,
css_class:
'gl-mr-2'
)
=
gl_loading_icon
(
inline:
true
)
Add a to do
app/views/dashboard/todos/index.html.haml
View file @
25abe2cd
...
...
@@ -22,10 +22,10 @@
-
if
@allowed_todos
.
any?
(
&
:pending?
)
.gl-mr-3
=
link_to
destroy_all_dashboard_todos_path
(
todos_filter_params
),
class:
'gl-button btn btn-default btn-loading align-items-center js-todos-mark-all'
,
method: :delete
,
data:
{
href:
destroy_all_dashboard_todos_path
(
todos_filter_params
)
}
do
=
gl_loading_icon
(
inline:
true
,
css_class:
'gl-mr-2'
)
=
gl_loading_icon
(
inline:
true
)
=
s_
(
"Todos|Mark all as done"
)
=
link_to
bulk_restore_dashboard_todos_path
,
class:
'gl-button btn btn-default btn-loading align-items-center js-todos-undo-all hidden'
,
method: :patch
,
data:
{
href:
bulk_restore_dashboard_todos_path
(
todos_filter_params
)
}
do
=
gl_loading_icon
(
inline:
true
,
css_class:
'gl-mr-2'
)
=
gl_loading_icon
(
inline:
true
)
=
s_
(
"Todos|Undo mark all as done"
)
.todos-filters
...
...
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