gitlab-org--gitlab-foss/app
Fatih Acet f879319840 Merge branch 'add-todo-toggle-event' into 'master'
Add todo toggle event

## What does this MR do?
Adds a custom jQuery event `todo:toggle` to detect when a new todo is added so that the respective todo counters (header navigation and sidebar) can update as needed

## Are there points in the code the reviewer needs to double check?

*  I wasn't sure whether each `spec` should be modularized based on the html templates or whether they should be separated based on function. There are some crossovers between the `dashboard_spec` and the `header_spec`.
* The naming conventions for `sidebar` and `right_sidebar` were a little confusing since they were named the opposite in their `specs`. I made a few assumptions and named a few files based on what I thought they should be named. I'd be happy to change it to something else though 😄  

## Why was this MR needed?
This resolves an existing issue where the todo count on the sidebar would not update (until refresh) and refactors the existing methods that are used to update the todo counters (header navigation and sidebar)

## What are the relevant issue numbers?
Closes #20140

## 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)

See merge request !5724
2016-10-27 13:28:40 +00:00
..
assets Merge branch 'add-todo-toggle-event' into 'master' 2016-10-27 13:28:40 +00:00
controllers Merge branch 'master' into issue-board-sidebar 2016-10-26 08:47:09 +01:00
finders Merge branch 'sh-optimize-label-finder' into 'master' 2016-10-25 15:55:59 +00:00
helpers Fix sidekiq stats in admin area 2016-10-26 18:53:59 +11:00
mailers Just show the first merge request we found, feedback: 2016-10-14 19:54:51 +08:00
models Merge branch 'master' into issue-board-sidebar 2016-10-26 08:47:09 +01:00
policies Use delegate! on group and project labels policies 2016-10-19 14:58:26 -02:00
services Merge branch 'barthc/gitlab-ce-prevent_authored_vote_from_notes' 2016-10-24 15:25:37 +02:00
uploaders
validators Add robots.txt to the list of reserved namespaces 2016-10-11 02:58:26 +01:00
views Merge branch 'add-todo-toggle-event' into 'master' 2016-10-27 13:28:40 +00:00
workers Don't schedule ProjectCacheWorker unless needed 2016-10-25 16:02:36 +02:00