summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2017-01-26 16:08:35 -0200
committerOswaldo Ferreira <oswaldo@gitlab.com>2017-01-27 20:20:20 -0200
commit80a7c369083246fe689959906cab493a518ff980 (patch)
tree929d8663fbcd720044a34fdc4389d93770b20e40
parent27a794914e9a9a9f979b89d26d0297f677e2946a (diff)
downloadgitlab-ce-23634-remove-project-grouping.tar.gz
Do not rely on style class for changing DOM state on "Mark all as done"23634-remove-project-grouping
-rw-r--r--app/assets/javascripts/todos.js.es62
-rw-r--r--app/views/dashboard/todos/index.html.haml73
2 files changed, 38 insertions, 37 deletions
diff --git a/app/assets/javascripts/todos.js.es6 b/app/assets/javascripts/todos.js.es6
index ef9c0a885fb..05622916ff8 100644
--- a/app/assets/javascripts/todos.js.es6
+++ b/app/assets/javascripts/todos.js.es6
@@ -85,7 +85,7 @@
},
success: (data) => {
$target.remove();
- $('.prepend-top-default').html('<div class="nothing-here-block">You\'re all done!</div>');
+ $('.js-todos-all').html('<div class="nothing-here-block">You\'re all done!</div>');
return this.updateBadges(data);
}
});
diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml
index 6f7141de12c..153d0885063 100644
--- a/app/views/dashboard/todos/index.html.haml
+++ b/app/views/dashboard/todos/index.html.haml
@@ -67,40 +67,41 @@
= sort_title_oldest_created
-- if @todos.any?
- .js-todos-options{ data: {per_page: @todos.limit_value, current_page: @todos.current_page, total_pages: @todos.total_pages} }
- .panel.panel-default.panel-small.panel-without-border
- %ul.content-list.todos-list
- = render @todos
- = paginate @todos, theme: "gitlab"
+.js-todos-all
+ - if @todos.any?
+ .js-todos-options{ data: {per_page: @todos.limit_value, current_page: @todos.current_page, total_pages: @todos.total_pages} }
+ .panel.panel-default.panel-small.panel-without-border
+ %ul.content-list.todos-list
+ = render @todos
+ = paginate @todos, theme: "gitlab"
-- elsif current_user.todos.any?
- .todos-all-done
- = render "shared/empty_states/todos_all_done.svg"
- - if todos_filter_empty?
- %h4.text-center
- = Gitlab.config.gitlab.no_todos_messages.sample
- %p.text-center
- Are you looking for things to do? Take a look at
- = succeed "," do
- = link_to "the opened issues", issues_dashboard_path
- contribute to
- = link_to "merge requests", merge_requests_dashboard_path
- or mention someone in a comment to assign a new todo automatically.
- - else
- %h4.text-center
- There are no todos to show.
-- else
- .todos-empty
- .todos-empty-hero
- = render "shared/empty_states/todos_empty.svg"
- .todos-empty-content
- %h4
- Todos let you see what you should do next.
- %p
- When an issue or merge request is assigned to you, or when you
- %strong
- @mention
- in a comment, this will trigger a new item in your todo list, automatically.
- %p
- You will always know what to work on next.
+ - elsif current_user.todos.any?
+ .todos-all-done
+ = render "shared/empty_states/todos_all_done.svg"
+ - if todos_filter_empty?
+ %h4.text-center
+ = Gitlab.config.gitlab.no_todos_messages.sample
+ %p.text-center
+ Are you looking for things to do? Take a look at
+ = succeed "," do
+ = link_to "the opened issues", issues_dashboard_path
+ contribute to
+ = link_to "merge requests", merge_requests_dashboard_path
+ or mention someone in a comment to assign a new todo automatically.
+ - else
+ %h4.text-center
+ There are no todos to show.
+ - else
+ .todos-empty
+ .todos-empty-hero
+ = render "shared/empty_states/todos_empty.svg"
+ .todos-empty-content
+ %h4
+ Todos let you see what you should do next.
+ %p
+ When an issue or merge request is assigned to you, or when you
+ %strong
+ @mention
+ in a comment, this will trigger a new item in your todo list, automatically.
+ %p
+ You will always know what to work on next.