mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 10:06:53 +08:00
35 lines
865 B
Text
35 lines
865 B
Text
(function(global) {
|
|
'use strict';
|
|
global.SideBarToggle = (function() {
|
|
|
|
function show() {
|
|
$('#sideBarLeft').show();
|
|
$('#sideBarRight').hide();
|
|
$('#sidebar-wrapper').show(
|
|
'slide', { direction: 'right', easing: 'linear' }, 400
|
|
);
|
|
$('#wrapper').css('paddingLeft', '280px');
|
|
$('.navbar-secondary').css(
|
|
{ 'margin-left': '-280px', 'padding-left': '295px' }
|
|
);
|
|
}
|
|
|
|
function hide() {
|
|
$('#sideBarLeft').hide();
|
|
$('#sideBarRight').show();
|
|
$('#sidebar-wrapper').hide(
|
|
'slide', { direction: 'left', easing: 'linear'}, 400
|
|
);
|
|
$('#wrapper').css('paddingLeft', '0');
|
|
$('.navbar-secondary').css({
|
|
'margin-left': '0',
|
|
'padding-left': '15px'
|
|
});
|
|
}
|
|
|
|
return Object.freeze({
|
|
show: show,
|
|
hide: hide
|
|
})
|
|
})();
|
|
})(window);
|