diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2017-09-14 16:53:46 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2017-09-14 16:53:46 +0000 |
commit | feea9a0333510dae398ff79936020c7ac2e24c4e (patch) | |
tree | 05fcdf281372e07f004638edb0985af579527cb1 /app/assets/javascripts | |
parent | 6bbd3d33711ff330d2c3890198bf992c2c08b1e3 (diff) | |
parent | ce6a02eeb4633198f6c0e1a1b7629177efd8aec4 (diff) | |
download | gitlab-ce-feea9a0333510dae398ff79936020c7ac2e24c4e.tar.gz |
Merge branch 'refactor-animate-js' into 'master'
Reduce footprint of animate.js
See merge request gitlab-org/gitlab-ce!14187
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/labels_select.js | 7 | ||||
-rw-r--r-- | app/assets/javascripts/lib/utils/animate.js | 49 | ||||
-rw-r--r-- | app/assets/javascripts/main.js | 1 |
3 files changed, 0 insertions, 57 deletions
diff --git a/app/assets/javascripts/labels_select.js b/app/assets/javascripts/labels_select.js index 7d7f91227f9..2538d9c2093 100644 --- a/app/assets/javascripts/labels_select.js +++ b/app/assets/javascripts/labels_select.js @@ -127,13 +127,6 @@ import DropdownUtils from './filtered_search/dropdown_utils'; $('.has-tooltip', $value).tooltip({ container: 'body' }); - return $value.find('a').each(function(i) { - return setTimeout((function(_this) { - return function() { - return gl.animate.animate($(_this), 'pulse'); - }; - })(this), 200 * i); - }); }); }; $dropdown.glDropdown({ diff --git a/app/assets/javascripts/lib/utils/animate.js b/app/assets/javascripts/lib/utils/animate.js deleted file mode 100644 index d93c1d0da59..00000000000 --- a/app/assets/javascripts/lib/utils/animate.js +++ /dev/null @@ -1,49 +0,0 @@ -/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-param-reassign, no-void, prefer-template, no-var, new-cap, prefer-arrow-callback, consistent-return, max-len */ -(function() { - (function(w) { - if (w.gl == null) { - w.gl = {}; - } - if (gl.animate == null) { - gl.animate = {}; - } - gl.animate.animate = function($el, animation, options, done) { - if ((options != null ? options.cssStart : void 0) != null) { - $el.css(options.cssStart); - } - $el.removeClass(animation + ' animated').addClass(animation + ' animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { - $(this).removeClass(animation + ' animated'); - if (done != null) { - done(); - } - if ((options != null ? options.cssEnd : void 0) != null) { - $el.css(options.cssEnd); - } - }); - }; - gl.animate.animateEach = function($els, animation, time, options, done) { - var dfd; - dfd = $.Deferred(); - if (!$els.length) { - dfd.resolve(); - } - $els.each(function(i) { - setTimeout((function(_this) { - return function() { - var $this; - $this = $(_this); - return gl.animate.animate($this, animation, options, function() { - if (i === $els.length - 1) { - dfd.resolve(); - if (done != null) { - return done(); - } - } - }); - }; - })(this), time * i); - }); - return dfd.promise(); - }; - })(window); -}).call(window); diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index 0bc31a56684..0f84470828a 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -39,7 +39,6 @@ import './commit/file'; import './commit/image_file'; // lib/utils -import './lib/utils/animate'; import './lib/utils/bootstrap_linked_tabs'; import './lib/utils/common_utils'; import './lib/utils/datetime_utility'; |