46 lines
1.3 KiB
JavaScript
46 lines
1.3 KiB
JavaScript
require.config({
|
|
baseUrl: 'js',
|
|
paths: {
|
|
//jquery: "../../js/jquery-3.6.0.min",
|
|
//spectrum: "../../js/spectrum"
|
|
},
|
|
waitSeconds: 0,
|
|
urlArgs: "v=455" //+ Math.random()
|
|
})
|
|
|
|
requirejs(['modules/pageloader'], function (loader) {
|
|
loader.links = '.ul_menu .nav_item';
|
|
loader.content = '#set_right';
|
|
loader.init();
|
|
|
|
setFavoriteDisplay(true, teamintelligence ? 700 : 650);
|
|
|
|
var ANIMATION_DURATION = 120;
|
|
|
|
$('#nav_arrow').click(function () {
|
|
var flag = !$('#set_left').prop('isexpanded');
|
|
setCookie("LeftPanelExpanded", flag ? "1" : "0");
|
|
$('#set_left').stop()
|
|
.prop('isexpanded', flag)
|
|
.animate({ 'width': flag ? 250 : 50 }, ANIMATION_DURATION)
|
|
//.find('li a').css('display', flag ? 'none' : '')
|
|
;
|
|
if (flag) {
|
|
$('#set_left').find(".subitem").show();
|
|
}
|
|
else
|
|
$('#set_left').find(".subitem").hide();
|
|
|
|
$('#set_right').stop()
|
|
.animate({ 'margin-left': flag ? 250 : 50 }, ANIMATION_DURATION);
|
|
|
|
$('#nav_arrow div').attr('class', 'icn')
|
|
.addClass(flag ? 'expand' : 'collapse');
|
|
});
|
|
|
|
$('#set_left').prop('isexpanded', false);
|
|
var leftexpanded = getCookie("LeftPanelExpanded") === "1";
|
|
if (leftexpanded)
|
|
$('#nav_arrow').click();
|
|
})
|