Commit graph

12 commits

Author SHA1 Message Date
Mike Greiling
8e0e902b13 resolve all instances of no-undef eslint rule violations 2016-12-14 02:11:13 -06:00
Mike Greiling
23f5865e18 expand remaining non-explicit eslint-disable blocks and factor out globals when no-undef encountered 2016-12-13 21:07:31 -06:00
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
Clement Ho
f610f69ab9 Add todo toggle event 2016-10-26 16:28:56 -05:00
winniehell
02f94cf038 disable ESLint for all JavaScript files 2016-10-26 10:02:58 +02:00
Bryce Johnson
5ef3e8669d Make fixes to get tests passing. 2016-10-05 11:25:05 +02:00
Bryce Johnson
e0d66819e9 Fix todos specs. 2016-10-05 11:25:05 +02:00
Bryce Johnson
b3917d4868 Set defaults in constructor, in case opts are undefined. 2016-10-05 11:25:03 +02:00
Bryce Johnson
13182a9c5c Make use of destructuring options, clean up based on feedback. 2016-10-05 11:25:02 +02:00
Bryce Johnson
b690c19dbf Use parentheses in IFFE's as per AirBnb styleguide. 2016-10-05 11:25:02 +02:00
Bryce Johnson
01fdb521e2 Fixup refs to currPage and currPages. 2016-10-05 11:25:01 +02:00
Bryce Johnson
8377c2fbc3 Refactor Todos to ES6. 2016-10-05 11:25:01 +02:00
Renamed from app/assets/javascripts/todos.js (Browse further)