diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-08-31 20:26:12 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-08-31 20:26:12 +0000 |
commit | 286f10afb9c9945e37fb903009f823ba694a95b4 (patch) | |
tree | 46383d2c3cf28aae61c02fb6751b8f4649666e12 /app | |
parent | 35bcf73413c7a1b77b3797c7fecaf1e931db98b3 (diff) | |
parent | 632899826bbb4d50f8c003b2c1771fa17d89d022 (diff) | |
download | gitlab-ce-286f10afb9c9945e37fb903009f823ba694a95b4.tar.gz |
Merge branch 'fix-todo-pagination' into 'master'
Fix bug where pagination is still displayed despite all todos marked as done
## What does this MR do?
Changes the todo `mark all as done` button callback to remove pagination and add user friendly text `"You're all done!"` so that it is consistent with what the page should look like after refreshing
## Are there points in the code the reviewer needs to double check?
Shouldn't be
## Why was this MR needed?
Resolve existing UI inconsistency
## Screenshots (if relevant)
Before:

After:

## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes #21048
See merge request !6113
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/todos.js | 2 | ||||
-rw-r--r-- | app/views/dashboard/todos/index.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/todos.js b/app/assets/javascripts/todos.js index 6e677fa8cc6..06605320a35 100644 --- a/app/assets/javascripts/todos.js +++ b/app/assets/javascripts/todos.js @@ -66,7 +66,7 @@ success: (function(_this) { return function(data) { $this.remove(); - $('.js-todos-list').remove(); + $('.prepend-top-default').html('<div class="nothing-here-block">You\'re all done!</div>'); return _this.updateBadges(data); }; })(this) diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml index d320d3bcc1e..6bcc37042ea 100644 --- a/app/views/dashboard/todos/index.html.haml +++ b/app/views/dashboard/todos/index.html.haml @@ -66,7 +66,7 @@ - if @todos.any? .js-todos-options{ data: {per_page: @todos.limit_value, current_page: @todos.current_page, total_pages: @todos.total_pages} } - @todos.group_by(&:project).each do |group| - .panel.panel-default.panel-small.js-todos-list + .panel.panel-default.panel-small - project = group[0] .panel-heading = link_to project.name_with_namespace, namespace_project_path(project.namespace, project) |