Moved the turbolinks listener from application.js to the corresponding issuable sidebar file
This commit is contained in:
parent
ae65272bbf
commit
ffc5ec7d77
2 changed files with 9 additions and 8 deletions
|
@ -248,14 +248,6 @@
|
||||||
$window.off('resize.app').on('resize.app', function () {
|
$window.off('resize.app').on('resize.app', function () {
|
||||||
return fitSidebarForSize();
|
return fitSidebarForSize();
|
||||||
});
|
});
|
||||||
window.addEventListener('beforeunload', function() {
|
|
||||||
// collapsed_gutter cookie hides the sidebar
|
|
||||||
var bpBreakpoint = bp.getBreakpointSize();
|
|
||||||
if (bpBreakpoint === 'xs' || bpBreakpoint === 'sm') {
|
|
||||||
Cookies.set('collapsed_gutter', true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
gl.awardsHandler = new AwardsHandler();
|
gl.awardsHandler = new AwardsHandler();
|
||||||
new Aside();
|
new Aside();
|
||||||
// bind sidebar events
|
// bind sidebar events
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-new, comma-dangle, quotes, prefer-arrow-callback, consistent-return, one-var, no-var, one-var-declaration-per-line, no-underscore-dangle, max-len */
|
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-new, comma-dangle, quotes, prefer-arrow-callback, consistent-return, one-var, no-var, one-var-declaration-per-line, no-underscore-dangle, max-len */
|
||||||
/* global UsersSelect */
|
/* global UsersSelect */
|
||||||
|
/* global Cookies */
|
||||||
|
/* global bp */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
this.IssuableContext = (function() {
|
this.IssuableContext = (function() {
|
||||||
|
@ -37,6 +39,13 @@
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
window.addEventListener('beforeunload', function() {
|
||||||
|
// collapsed_gutter cookie hides the sidebar
|
||||||
|
var bpBreakpoint = bp.getBreakpointSize();
|
||||||
|
if (bpBreakpoint === 'xs' || bpBreakpoint === 'sm') {
|
||||||
|
Cookies.set('collapsed_gutter', true);
|
||||||
|
}
|
||||||
|
});
|
||||||
$(".right-sidebar").niceScroll();
|
$(".right-sidebar").niceScroll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue