Commit Graph

40 Commits

Author SHA1 Message Date
Kushal Pandya d586b6cced Add ES lint support to identify poorly written Promises 2017-04-20 11:11:51 +00:00
Alfredo Sumaran eeaeb2752a Merge branch '27655-clear-emoji-search-after-selection' into 'master'
Clear emoji search in awards menu after picking emoji

Closes #27655

See merge request !10524
2017-04-17 05:35:34 +00:00
barthc 04e2dde538 frontend prevent authored votes 2017-04-14 09:33:28 +01:00
Eric Eastwood 0370c7c838 Clear emoji search in awards menu after picking emoji
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/27655
2017-04-13 02:22:57 -05:00
Eric Eastwood 4bf6ffa51a Remove `undefined` class from `.emoji-menu-list`
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/30496
2017-04-07 00:07:39 -05:00
Dimitrie Hoekstra 80c9264967 Award emoji button smiley animation 2017-04-06 13:38:09 +00:00
Phil Hughes ab79c76d0c Removes the duplicated search icon in emoji menu
The search emojis title had the same class as the search input which
caused a duplicated icon.

Closes #30416
2017-04-05 10:56:40 +01:00
Mike Greiling 5f7c0bd7b7 remove Cookies class from global space 2017-03-22 03:07:27 -05:00
Eric Eastwood a8a52a587d Protect against unknown emojis in frequently used list
See https://gitlab.slack.com/archives/frontend/p1489690607738864
2017-03-16 17:22:21 -05:00
Eric Eastwood 3f5919e2c4 Add frequently used emojis back to awards menu
Thanks @filipa for the shout`
2017-03-09 13:00:46 -06:00
Eric Eastwood ee9930145f Update emojis to use harmony modules (import/export) 2017-03-08 11:27:14 -06:00
Eric Eastwood 2d6492561c Fix up potential for build finish event to fire for wrong menu 2017-03-06 12:54:46 -06:00
Eric Eastwood a8140d5c01 Fix up `watch` alias lookup in Firefox
It was pulling
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch
2017-03-06 12:54:46 -06:00
Eric Eastwood e6fc0207cb Use native unicode emojis
- gl_emoji for falling back to image/css-sprite when the browser
   doesn't support an emoji
 - Markdown rendering (Banzai filter)
 - Autocomplete
 - Award emoji menu
    - Perceived perf
    - Immediate response because we now build client-side
 - Update `digests.json` generation in gemojione rake task to be more
   useful and  include `unicodeVersion`

MR: !9437

See issues

 - #26371
 - #27250
 - #22474
2017-03-06 12:54:46 -06:00
Mike Greiling 0f31c5a92b replace implicit this == window with explicit binding 2017-02-17 16:58:32 -06:00
Mike Greiling 69e4072f89 Merge branch 'master' into go-go-gadget-webpack
* master: (389 commits)
  Document "No gems fetched from git repositories" policy [ci skip]
  Typos
  Small gramatical tweaks
  Typos
  Added PHP & NPM doc
  Use `:empty_project` where possible in request specs
  Add caching of droplab ajax requests
  Use `:empty_project` where possible in model specs
  Revert 3f17f29a
  Remove unused js response from refs controller
  Add MR id to changelog entry
  fixed small mini pipeline graph line glitch
  Prevent form to be submitted twice
  Fix Error 500 when repositories contain annotated tags pointing to blobs
  Fix /explore sorting (trending)
  Simplify wording in "adding an image" docs
  Remove "official merge window" from CONTRIBUTING.md [ci skip]
  Update repository check documentation
  Fixed flexbox and wrap issues
  Update two_factor_authentication.md
  ...
2017-01-27 19:33:58 -06:00
Mike Greiling 588d7e8ae0 resolve all parseInt radix eslint violations 2017-01-18 17:18:40 -06:00
Mike Greiling 04eff5fdb0 resolve all x-spacing and no-spaced-x eslint violations 2017-01-18 17:18:40 -06:00
Mike Greiling ccada28f30 resolve all padded-blocks eslint violations 2017-01-18 17:16:41 -06:00
Mike Greiling 9e4d04913a resolve all no-plusplus eslint violations 2017-01-18 17:15:27 -06:00
Mike Greiling fe964cc235 migrate all javascript asset bundles and require syntax 2017-01-10 12:30:38 -06:00
Mike Greiling 8e0e902b13 resolve all instances of no-undef eslint rule violations 2016-12-14 02:11:13 -06:00
Luke "Jared" Bennett 7cefaea876
explicitly disable eslint inline 2016-11-15 16:30:34 +00:00
José Iván b1b51b774b Cleaned up global namespace JS
Moved most of the functions that contained "window.doSomething" that were located at:
- app/assets/javascripts/application.js
To the following file:
- app/assets/javascripts/lib/utils/common_utils.js

The functions listed here:
- window.ajaxGet
- window.split
- window.extractLast
- window.rstrip
- window.disableButtonIfEmptyField
- window.disableButtonIfAnyEmptyField
- window.sanitize
- window.unbindEvents
- window.shiftWindow

Now will be accessible from the "gl.utils" namespace
2016-11-03 23:00:21 -05:00
Fatih Acet dd5e46ab69 Merge branch 'eslint' into 'master'
Add ESLint

## What does this MR do?

- create `package.json`
- add ESLint dependencies to `package.json`
- add JavaScript linting to CI
- add Rake task `lint:javascript`as alias for `eslint` (which itself is an alias for `npm run eslint`)

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

Probably not.

## Why was this MR needed?

My hovercraft was full of eels.

## What are the relevant issue numbers?

- https://gitlab.com/gitlab-org/gitlab-ce/issues/13224#note_12537431
- https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5006#note_13255658


See merge request !5445
2016-10-26 16:31:08 +00:00
Jack Davison 728f1f71a5 Refactored less readable existance checks
CoffeeScript generated JavaScript contains some unreadable
expressions. This refactoring addresses complex uses of
the exestential operator that produced unreadable Javascript.
2016-10-26 14:22:53 +01:00
winniehell 02f94cf038 disable ESLint for all JavaScript files 2016-10-26 10:02:58 +02:00
Mike Greiling f8520f5d09 remove manual Cookie.set "path" option in favor of global setting 2016-10-24 18:09:00 -05:00
Mike Greiling 67d2b2acb3 replace jquery.cookie vendor script with js.cookie 2016-10-24 18:09:00 -05:00
Luke Bennett 454bb145f0 Added `@zeiv`s changes to fix awards search, including CHANGELOG where he is credited 2016-09-27 00:16:39 +03:00
Jared Deckard 7f6474b269 Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
Clement Ho 0986fe23bc Replace animateEmoji timeout with eventListener 2016-09-06 09:39:43 -05:00
Mike Greiling 33694a5a64 use gitlab global root url as canonical base url for all javascript set cookies (closes #20435) 2016-08-24 22:11:28 -05:00
Jack Davison d548f3ee27 Replace resetTooltip with bootstrap's fixTitle
* resetTooltip totally destroyed and regenerated the
  tooltip while fixTitle simply replaces the text in
  the existing element.

* resetTooltip also called an asyncronous function
  with no suitable callback resulting in a messy
  setTimout workaround. fixTitle is syncronous.
2016-08-17 21:25:40 +01:00
Jack Davison 9250953af7 Fix duplicate "me" in award emoji tooltip
* Works by explicitly deleting out-of-date data attributes

* No longer directly assigns to data-original-title
2016-08-17 21:25:39 +01:00
Jack Davison 6c1ed00afc Award tooltips refer to current user as "You" 2016-08-17 21:25:39 +01:00
Jack Davison 1fc17a8a43 Switch to using to_sentence to construct tooltips
* Code in ruby now uses Array#to_sentence to construct award tooltips

* Coffeescript uses a combination of regexes for the same result
2016-08-17 21:25:39 +01:00
Jack Davison bcdc369491 Truncated user list in award emoji tooltips
* Only the first 10 names are displayed

* Further users are indicated by "and X more."

* String "and X more" is appended to the array THEN join is called

* An oxford comma seperates the last name from "and X more"

* In coffeescript "me" is now always prepended

* Tests included
2016-08-17 13:33:50 +01:00
Clement Ho e3292f1ede Fix awardable button mutuality loading spinners 2016-08-10 16:29:11 -05:00
Fatih Acet aaa9509d12 ES6ify all the things! 2016-07-24 23:45:11 +03:00