2013-07-22 08:31:44 +00:00
|
|
|
mSet = function() {
|
|
|
|
if($('.m_set_swich').prop('checked')) {
|
|
|
|
$('.m_set').fadeTo(300, 1).find('input').removeAttr('disabled');
|
|
|
|
} else {
|
|
|
|
$('.m_set').fadeTo(300, .33).find('input').attr('disabled','disabled');
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$(function() {
|
|
|
|
if($('.terms').length) {
|
|
|
|
$('.terms').each(function() {
|
|
|
|
if($(this).prop('checked')) {
|
|
|
|
$(this).closest('.control-group').next('.control-group').show();
|
|
|
|
};
|
|
|
|
$(this).on({
|
|
|
|
change: function() {
|
|
|
|
$(this).closest('.control-group').next('.control-group').slideToggle();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
if($('.m_set_swich').length) {
|
|
|
|
mSet();
|
|
|
|
$('.m_set_swich').on({
|
|
|
|
change: function() {
|
|
|
|
mSet();
|
|
|
|
},
|
|
|
|
});
|
|
|
|
$('.m-theme').each(function() {
|
|
|
|
if($(this).prop('checked')) {
|
|
|
|
$(this).closest('li').addClass('active');
|
|
|
|
};
|
|
|
|
$(this).on({
|
|
|
|
change: function() {
|
|
|
|
$(this).closest('li').addClass('active').siblings('li').removeClass('active');
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
if($('.ob-theme').length) {
|
|
|
|
$('.ob-theme').each(function() {
|
|
|
|
if($(this).prop('checked')) {
|
|
|
|
$(this).closest('li').addClass('active');
|
|
|
|
};
|
|
|
|
$(this).on({
|
|
|
|
change: function() {
|
|
|
|
$(this).closest('li').addClass('active').siblings('li').removeClass('active');
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
if($('.set-sidebar-state').length) {
|
|
|
|
if(window.localStorage.getItem('sidebarState') == 1) {
|
2013-11-08 04:53:06 +00:00
|
|
|
$('.set-sidebar-state').prop('checked',true).parent('.togglebox').removeClass('disable');
|
2013-07-22 08:31:44 +00:00
|
|
|
}
|
|
|
|
$('.set-sidebar-state').on({
|
|
|
|
change: function() {
|
|
|
|
if($(this).prop('checked')) {
|
|
|
|
sidebarState(1);
|
|
|
|
} else {
|
|
|
|
sidebarState(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|