Commit e7de234d authored by Filipa Lacerda's avatar Filipa Lacerda Committed by Phil Hughes

Use throttle when window is resized

parent aea03d7c
...@@ -64,7 +64,7 @@ window.Build = (function () { ...@@ -64,7 +64,7 @@ window.Build = (function () {
$(window) $(window)
.off('resize.build') .off('resize.build')
.on('resize.build', this.sidebarOnResize.bind(this)); .on('resize.build', _.throttle(this.sidebarOnResize.bind(this), 100));
this.updateArtifactRemoveDate(); this.updateArtifactRemoveDate();
...@@ -250,6 +250,7 @@ window.Build = (function () { ...@@ -250,6 +250,7 @@ window.Build = (function () {
Build.prototype.sidebarOnResize = function () { Build.prototype.sidebarOnResize = function () {
this.toggleSidebar(this.shouldHideSidebarForViewport()); this.toggleSidebar(this.shouldHideSidebarForViewport());
this.verifyTopPosition(); this.verifyTopPosition();
if (this.$scrollContainer.getNiceScroll(0)) { if (this.$scrollContainer.getNiceScroll(0)) {
......
...@@ -130,6 +130,3 @@ ...@@ -130,6 +130,3 @@
= build.id = build.id
- if build.retried? - if build.retried?
%i.fa.fa-refresh.has-tooltip{ data: { container: 'body', placement: 'bottom' }, title: 'Job was retried' } %i.fa.fa-refresh.has-tooltip{ data: { container: 'body', placement: 'bottom' }, title: 'Job was retried' }
:javascript
new Sidebar();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment