修改后台默认样式
默认固定头部、底部以及左侧菜单
This commit is contained in:
@@ -13,25 +13,11 @@ $(function($) {
|
||||
$('#skin-colors .skin-changer').removeClass('active');
|
||||
$('#skin-colors .skin-changer[data-skin="' + usedSkin + '"]').addClass('active');
|
||||
}
|
||||
var fixedHeader = localStorage.getItem('config-fixed-header');
|
||||
if (fixedHeader == 'fixed-header') {
|
||||
$('body').addClass(fixedHeader);
|
||||
$('#config-fixed-header').prop('checked', true);
|
||||
}
|
||||
var fixedFooter = localStorage.getItem('config-fixed-footer');
|
||||
if (fixedFooter == 'fixed-footer') {
|
||||
$('body').addClass(fixedFooter);
|
||||
$('#config-fixed-footer').prop('checked', true);
|
||||
}
|
||||
var boxedLayout = localStorage.getItem('config-boxed-layout');
|
||||
if (boxedLayout == 'boxed-layout') {
|
||||
$('body').addClass(boxedLayout);
|
||||
$('#config-boxed-layout').prop('checked', true);
|
||||
}
|
||||
var fixedLeftmenu = localStorage.getItem('config-fixed-leftmenu');
|
||||
if (fixedLeftmenu == 'fixed-leftmenu') {
|
||||
$('body').addClass(fixedLeftmenu);
|
||||
$('#config-fixed-sidebar').prop('checked', true);
|
||||
|
||||
//固定头部、左侧菜单以及底部版权信息
|
||||
$('body').addClass('fixed-header');
|
||||
$('body').addClass('fixed-footer');
|
||||
$('body').addClass('fixed-leftmenu');
|
||||
if ($('#page-wrapper').hasClass('nav-small')) {
|
||||
$('#page-wrapper').removeClass('nav-small');
|
||||
}
|
||||
@@ -41,6 +27,12 @@ $(function($) {
|
||||
preventPageScrolling: true,
|
||||
contentClass: 'col-left-nano-content'
|
||||
});
|
||||
|
||||
|
||||
var boxedLayout = localStorage.getItem('config-boxed-layout');
|
||||
if (boxedLayout == 'boxed-layout') {
|
||||
$('body').addClass(boxedLayout);
|
||||
$('#config-boxed-layout').prop('checked', true);
|
||||
}
|
||||
var sidebarSamll = localStorage.getItem('config-sidebar-samll');
|
||||
if (sidebarSamll == 'sidebar-samll') {
|
||||
@@ -57,33 +49,6 @@ $(function($) {
|
||||
function() {
|
||||
$('#config-tool').toggleClass('closed');
|
||||
});
|
||||
$('#config-fixed-header').on('change',
|
||||
function() {
|
||||
var fixedHeader = '';
|
||||
if ($(this).is(':checked')) {
|
||||
$('body').addClass('fixed-header');
|
||||
fixedHeader = 'fixed-header';
|
||||
} else {
|
||||
$('body').removeClass('fixed-header');
|
||||
if ($('#config-fixed-sidebar').is(':checked')) {
|
||||
$('#config-fixed-sidebar').prop('checked', false);
|
||||
$('#config-fixed-sidebar').trigger('change');
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
writeStorage(storage, 'config-fixed-header', fixedHeader);
|
||||
});
|
||||
$('#config-fixed-footer').on('change',
|
||||
function() {
|
||||
var fixedFooter = '';
|
||||
if ($(this).is(':checked')) {
|
||||
$('body').addClass('fixed-footer');
|
||||
fixedFooter = 'fixed-footer';
|
||||
} else {
|
||||
$('body').removeClass('fixed-footer');
|
||||
}
|
||||
writeStorage(storage, 'config-fixed-footer', fixedFooter);
|
||||
});
|
||||
$('#config-boxed-layout').on('change',
|
||||
function() {
|
||||
var boxedLayout = '';
|
||||
@@ -95,32 +60,7 @@ $(function($) {
|
||||
}
|
||||
writeStorage(storage, 'config-boxed-layout', boxedLayout);
|
||||
});
|
||||
$('#config-fixed-sidebar').on('change',
|
||||
function() {
|
||||
var fixedSidebar = '';
|
||||
if ($(this).is(':checked')) {
|
||||
if (!$('#config-fixed-header').is(':checked')) {
|
||||
$('#config-fixed-header').prop('checked', true);
|
||||
$('#config-fixed-header').trigger('change');
|
||||
}
|
||||
if ($('#page-wrapper').hasClass('nav-small')) {
|
||||
$('#page-wrapper').removeClass('nav-small');
|
||||
}
|
||||
$('body').addClass('fixed-leftmenu');
|
||||
fixedSidebar = 'fixed-leftmenu';
|
||||
$('.fixed-leftmenu #col-left').nanoScroller({
|
||||
alwaysVisible: true,
|
||||
iOSNativeScrolling: false,
|
||||
preventPageScrolling: true,
|
||||
contentClass: 'col-left-nano-content'
|
||||
});
|
||||
writeStorage(storage, 'config-fixed-leftmenu', fixedSidebar);
|
||||
} else {
|
||||
$('body').removeClass('fixed-leftmenu');
|
||||
writeStorage(storage, 'config-fixed-leftmenu', fixedSidebar);
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
$('#config-sidebar-samll').on('change',function(){
|
||||
var sidebarSamll = '';
|
||||
if ($(this).is(':checked')) {
|
||||
@@ -134,9 +74,6 @@ $(function($) {
|
||||
}
|
||||
})
|
||||
if (!storage) {
|
||||
$('#config-fixed-header').prop('checked', false);
|
||||
$('#config-fixed-footer').prop('checked', false);
|
||||
$('#config-fixed-sidebar').prop('checked', false);
|
||||
$('#config-boxed-layout').prop('checked', false);
|
||||
$('#config-sidebar-samll').prop('checked', false);
|
||||
}
|
||||
|
||||
@@ -11,11 +11,11 @@ if (storage) {
|
||||
if (usedSkin != '' && usedSkin != null) {
|
||||
document.body.className = usedSkin;
|
||||
} else {
|
||||
document.body.className = 'theme-whbl';
|
||||
document.body.className = '';
|
||||
}
|
||||
} catch(e) {
|
||||
document.body.className = 'theme-whbl';
|
||||
document.body.className = '';
|
||||
}
|
||||
} else {
|
||||
document.body.className = 'theme-whbl';
|
||||
document.body.className = '';
|
||||
}
|
||||
@@ -5,24 +5,6 @@
|
||||
<div id="config-tool-options">
|
||||
<h4>布局选项</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<div class="checkbox-nice">
|
||||
<input type="checkbox" id="config-fixed-header"/>
|
||||
<label for="config-fixed-header">固定头部</label>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="checkbox-nice">
|
||||
<input type="checkbox" id="config-fixed-sidebar"/>
|
||||
<label for="config-fixed-sidebar">固定左侧菜单</label>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="checkbox-nice">
|
||||
<input type="checkbox" id="config-fixed-footer"/>
|
||||
<label for="config-fixed-footer">固定底部</label>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="checkbox-nice">
|
||||
<input type="checkbox" id="config-boxed-layout"/>
|
||||
|
||||
Reference in New Issue
Block a user