diff options
author | Phil Hughes <me@iamphill.com> | 2017-06-02 16:16:54 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-06-02 16:16:54 +0000 |
commit | b1f860818fd1db049ae44f4e9ea1aef93e1e2ea1 (patch) | |
tree | d987b4ea7e5545dd6af9ac56fcfa46f5cfb5964c | |
parent | aea03d7cdfb882762426dbb5cab805682afe5e2a (diff) | |
parent | e7de234d6f27781938858bee0ccd01ab1fbd082f (diff) | |
download | gitlab-ce-33126-vue-js-timeago-add-missing-functionalities.tar.gz |
Merge branch 'job-details-increase-deboune' into 'master'33126-vue-js-timeago-add-missing-functionalities
Use throttle when window is resized
Closes #33222
See merge request !11857
-rw-r--r-- | app/assets/javascripts/build.js | 3 | ||||
-rw-r--r-- | app/views/projects/jobs/_sidebar.html.haml | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/app/assets/javascripts/build.js b/app/assets/javascripts/build.js index 1a602cbd8a7..072a899e9f2 100644 --- a/app/assets/javascripts/build.js +++ b/app/assets/javascripts/build.js @@ -64,7 +64,7 @@ window.Build = (function () { $(window) .off('resize.build') - .on('resize.build', this.sidebarOnResize.bind(this)); + .on('resize.build', _.throttle(this.sidebarOnResize.bind(this), 100)); this.updateArtifactRemoveDate(); @@ -250,6 +250,7 @@ window.Build = (function () { Build.prototype.sidebarOnResize = function () { this.toggleSidebar(this.shouldHideSidebarForViewport()); + this.verifyTopPosition(); if (this.$scrollContainer.getNiceScroll(0)) { diff --git a/app/views/projects/jobs/_sidebar.html.haml b/app/views/projects/jobs/_sidebar.html.haml index 3e83142377b..f700b5c9455 100644 --- a/app/views/projects/jobs/_sidebar.html.haml +++ b/app/views/projects/jobs/_sidebar.html.haml @@ -130,6 +130,3 @@ = build.id - if build.retried? %i.fa.fa-refresh.has-tooltip{ data: { container: 'body', placement: 'bottom' }, title: 'Job was retried' } - -:javascript - new Sidebar(); |