|
Server : LiteSpeed System : Linux srv104790275 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64 User : dewac4139 ( 1077) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/local/CyberCP/public/static/baseTemplate/assets/widgets/theme-switcher/ |
Upload File : |
/* Admin layout options */
$(document).on('ready', function() {
$('#theme-switcher-wrapper .switch-toggle').on('click', this, function() {
var dataToggle = $(this).prev().attr('data-toggletarget');
$('body').toggleClass(dataToggle);
if ( dataToggle = 'closed-sidebar' ) {
$('#close-sidebar .glyph-icon').toggleClass('icon-angle-right').toggleClass('icon-angle-left');
}
});
$('.switch-toggle[id="#boxed-layout"]').click(function(){
if ( $('#boxed-layout').attr("checked") ) {
$('.boxed-bg-wrapper').slideDown();
} else {
$('.boxed-bg-wrapper').slideUp();
}
});
});
/* Open theme switcher */
$(function() {
$(".theme-switcher").click(function() {
$("#theme-options").toggleClass('active');
});
});
/* Admin header style */
$(function() {
$('.set-adminheader-style').click(function() {
$('.set-adminheader-style').removeClass('active');
$(this).addClass('active');
var newBg = $(this).attr('data-header-bg');
$("#page-header").removeClass(function(index, css) {
return (css.match(/(^|\s)bg-\S+/g) || []).join(' ');
});
$("#page-header").removeClass(function(index, css) {
return (css.match(/(^|\s)font-\S+/g) || []).join(' ');
});
$('#page-header').addClass(newBg);
});
});
/* Admin sidebar style */
$(function() {
$('.set-sidebar-style').click(function() {
$('.set-sidebar-style').removeClass('active');
$(this).addClass('active');
var newBg = $(this).attr('data-header-bg');
$("#page-sidebar").removeClass(function(index, css) {
return (css.match(/(^|\s)bg-\S+/g) || []).join(' ');
});
$("#page-sidebar").removeClass(function(index, css) {
return (css.match(/(^|\s)font-\S+/g) || []).join(' ');
});
$('#page-sidebar').addClass(newBg);
});
});
/* Boxed layout background style */
$(function() {
$('.set-background-style').click(function() {
$('.set-background-style').removeClass('active');
$(this).addClass('active');
var newBg = $(this).attr('data-header-bg');
$("body").removeClass(function(index, css) {
return (css.match(/(^|\s)pattern-\S+/g) || []).join(' ');
});
$("body").removeClass(function(index, css) {
return (css.match(/(^|\s)full-\S+/g) || []).join(' ');
});
$("body").removeClass(function(index, css) {
return (css.match(/(^|\s)bg-\S+/g) || []).join(' ');
});
$("body").removeClass(function(index, css) {
return (css.match(/(^|\s)fixed-\S+/g) || []).join(' ');
});
$('body').addClass(newBg);
});
});
/* Frontend header style */
$(function() {
$('.set-header-style').click(function() {
$('.set-header-style').removeClass('active');
$(this).addClass('active');
var newBg = $(this).attr('data-header-bg');
$(".main-header").removeClass(function(index, css) {
return (css.match(/(^|\s)bg-\S+/g) || []).join(' ');
});
$(".main-header").removeClass(function(index, css) {
return (css.match(/(^|\s)font-\S+/g) || []).join(' ');
});
$('.main-header').addClass(newBg);
});
});
/* Frontend footer style */
$(function() {
$('.set-footer-style').click(function() {
$('.set-footer-style').removeClass('active');
$(this).addClass('active');
var newBg = $(this).attr('data-header-bg');
$(".main-footer").removeClass(function(index, css) {
return (css.match(/(^|\s)bg-\S+/g) || []).join(' ');
});
$(".main-footer").removeClass(function(index, css) {
return (css.match(/(^|\s)font-\S+/g) || []).join(' ');
});
$('.main-footer').addClass(newBg);
});
});
/* Frontend top menu style */
$(function() {
$('.set-topmenu-style').click(function() {
$('.set-topmenu-style').removeClass('active');
$(this).addClass('active');
var newBg = $(this).attr('data-header-bg');
$(".top-bar").removeClass(function(index, css) {
return (css.match(/(^|\s)bg-\S+/g) || []).join(' ');
});
$(".top-bar").removeClass(function(index, css) {
return (css.match(/(^|\s)font-\S+/g) || []).join(' ');
});
$('.top-bar').addClass(newBg);
});
});
/* Theme styler scroll */
$(function() {
$('.scroll-switcher').slimscroll({
height: '100%',
color: 'rgba(0,0,0,0.3)',
size: '10px',
alwaysVisible: true
});
//
//$(".scroll-switcher").slimScroll({
// destroy: true
//});
});
function swither_resizer() {
var windowHeight = $(window).height();
$('#theme-switcher-wrapper').height(windowHeight / 1.4);
}
$(document).on('ready', function() {
swither_resizer();
});
$(window).on('resize', function() {
swither_resizer();
});