1"use strict" 2function addSwitcher() 3{ 4 var dlabSwitcher = '<div class="sidebar-right"><div class="bg-overlay"></div><a class="sidebar-right-trigger wave-effect wave-effect-x" data-bs-toggle="tooltip" data-placement="right" data-original-title="Change Layout" href="javascript:void(0);"><span><i class="fa fa-cog fa-spin"></i><a class="sidebar-close-trigger" href="javascript:void(0);"><span><i class="la-times las"></i></span></a><div class="sidebar-right-inner"><h4>Pick your style<a href="javascript:void(0);" onclick="deleteAllCookie()" class="btn btn-primary btn-sm pull-right">Delete All Cookie</a></h4><div class="card-tabs"><ul class="nav nav-tabs" role="tablist"><li class="nav-item"><a class="nav-link active" href="#tab1" data-bs-toggle="tab">Theme</a></li><li class="nav-item"><a class="nav-link" href="#tab2" data-bs-toggle="tab">Header</a></li><li class="nav-item"><a class="nav-link" href="#tab3" data-bs-toggle="tab">Content</a></li></ul></div><div class="tab-content tab-content-default tabcontent-border"><div class="fade tab-pane active show" id="tab1"><div class="admin-settings"><div class="row"><div class="col-sm-12"><p>Background</p><select class="default-select wide form-control" id="theme_version" name="theme_version"><option value="disabled selected hidden">Choose Mode</option><option value="light">Light</option><option value="dark">Dark</option></select></div><div class="col-sm-6"><p>Primary Color</p><div><span data-placement="top" data-bs-toggle="tooltip" title="Color 1"><input class="chk-col-primary filled-in" id="primary_color_1" name="primary_bg" type="radio" value="color_1"><label for="primary_color_1" class="bg-label-pattern"></label></span><span><input class="chk-col-primary filled-in" id="primary_color_2" name="primary_bg" type="radio" value="color_2"><label for="primary_color_2"></label></span><span><input class="chk-col-primary filled-in" id="primary_color_3" name="primary_bg" type="radio" value="color_3"><label for="primary_color_3"></label></span><span><input class="chk-col-primary filled-in" id="primary_color_4" name="primary_bg" type="radio" value="color_4"><label for="primary_color_4"></label></span><span><input class="chk-col-primary filled-in" id="primary_color_5" name="primary_bg" type="radio" value="color_5"><label for="primary_color_5"></label></span><span><input class="chk-col-primary filled-in" id="primary_color_6" name="primary_bg" type="radio" value="color_6"><label for="primary_color_6"></label></span><span><input class="chk-col-primary filled-in" id="primary_color_7" name="primary_bg" type="radio" value="color_7"><label for="primary_color_7"></label></span><span><input class="chk-col-primary filled-in" id="primary_color_9" name="primary_bg" type="radio" value="color_9"><label for="primary_color_9"></label></span><span><input class="chk-col-primary filled-in" id="primary_color_10" name="primary_bg" type="radio" value="color_10"><label for="primary_color_10"></label></span><span><input class="chk-col-primary filled-in" id="primary_color_11" name="primary_bg" type="radio" value="color_11"><label for="primary_color_11"></label></span><span><input class="chk-col-primary filled-in" id="primary_color_12" name="primary_bg" type="radio" value="color_12"><label for="primary_color_12"></label></span><span><input class="chk-col-primary filled-in" id="primary_color_13" name="primary_bg" type="radio" value="color_13"><label for="primary_color_13"></label></span><span><input class="chk-col-primary filled-in" id="primary_color_14" name="primary_bg" type="radio" value="color_14"><label for="primary_color_14"></label></span><span><input class="chk-col-primary filled-in" id="primary_color_15" name="primary_bg" type="radio" value="color_15"><label for="primary_color_15"></label></span></div></div><div class="col-sm-6"><p>Navigation Header</p><div><span><input class="chk-col-primary filled-in" id="nav_header_color_1" name="navigation_header" type="radio" value="color_1"><label for="nav_header_color_1" class="bg-label-pattern"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_2" name="navigation_header" type="radio" value="color_2"><label for="nav_header_color_2"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_3" name="navigation_header" type="radio" value="color_3"><label for="nav_header_color_3"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_4" name="navigation_header" type="radio" value="color_4"><label for="nav_header_color_4"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_5" name="navigation_header" type="radio" value="color_5"><label for="nav_header_color_5"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_6" name="navigation_header" type="radio" value="color_6"><label for="nav_header_color_6"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_7" name="navigation_header" type="radio" value="color_7"><label for="nav_header_color_7"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_8" name="navigation_header" type="radio" value="color_8"><label for="nav_header_color_8" class="border"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_9" name="navigation_header" type="radio" value="color_9"><label for="nav_header_color_9"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_10" name="navigation_header" type="radio" value="color_10"><label for="nav_header_color_10"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_11" name="navigation_header" type="radio" value="color_11"><label for="nav_header_color_11"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_12" name="navigation_header" type="radio" value="color_12"><label for="nav_header_color_12"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_13" name="navigation_header" type="radio" value="color_13"><label for="nav_header_color_13"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_14" name="navigation_header" type="radio" value="color_14"><label for="nav_header_color_14"></label></span><span><input class="chk-col-primary filled-in" id="nav_header_color_15" name="navigation_header" type="radio" value="color_15"><label for="nav_header_color_15"></label></span></div></div><div class="col-sm-6"><p>Header</p><div><span><input class="chk-col-primary filled-in" id="header_color_1" name="header_bg" type="radio" value="color_1"><label for="header_color_1" class="bg-label-pattern"></label></span><span><input class="chk-col-primary filled-in" id="header_color_2" name="header_bg" type="radio" value="color_2"><label for="header_color_2"></label></span><span><input class="chk-col-primary filled-in" id="header_color_3" name="header_bg" type="radio" value="color_3"><label for="header_color_3"></label></span><span><input class="chk-col-primary filled-in" id="header_color_4" name="header_bg" type="radio" value="color_4"><label for="header_color_4"></label></span><span><input class="chk-col-primary filled-in" id="header_color_5" name="header_bg" type="radio" value="color_5"><label for="header_color_5"></label></span><span><input class="chk-col-primary filled-in" id="header_color_6" name="header_bg" type="radio" value="color_6"><label for="header_color_6"></label></span><span><input class="chk-col-primary filled-in" id="header_color_7" name="header_bg" type="radio" value="color_7"><label for="header_color_7"></label></span><span><input class="chk-col-primary filled-in" id="header_color_8" name="header_bg" type="radio" value="color_8"><label for="header_color_8" class="border"></label></span><span><input class="chk-col-primary filled-in" id="header_color_9" name="header_bg" type="radio" value="color_9"><label for="header_color_9"></label></span><span><input class="chk-col-primary filled-in" id="header_color_10" name="header_bg" type="radio" value="color_10"><label for="header_color_10"></label></span><span><input class="chk-col-primary filled-in" id="header_color_11" name="header_bg" type="radio" value="color_11"><label for="header_color_11"></label></span><span><input class="chk-col-primary filled-in" id="header_color_12" name="header_bg" type="radio" value="color_12"><label for="header_color_12"></label></span><span><input class="chk-col-primary filled-in" id="header_color_13" name="header_bg" type="radio" value="color_13"><label for="header_color_13"></label></span><span><input class="chk-col-primary filled-in" id="header_color_14" name="header_bg" type="radio" value="color_14"><label for="header_color_14"></label></span><span><input class="chk-col-primary filled-in" id="header_color_15" name="header_bg" type="radio" value="color_15"><label for="header_color_15"></label></span></div></div><div class="col-sm-6"><p>Sidebar</p><div><span><input class="chk-col-primary filled-in" id="sidebar_color_1" name="sidebar_bg" type="radio" value="color_1"><label for="sidebar_color_1" class="bg-label-pattern"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_2" name="sidebar_bg" type="radio" value="color_2"><label for="sidebar_color_2"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_3" name="sidebar_bg" type="radio" value="color_3"><label for="sidebar_color_3"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_4" name="sidebar_bg" type="radio" value="color_4"><label for="sidebar_color_4"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_5" name="sidebar_bg" type="radio" value="color_5"><label for="sidebar_color_5"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_6" name="sidebar_bg" type="radio" value="color_6"><label for="sidebar_color_6"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_7" name="sidebar_bg" type="radio" value="color_7"><label for="sidebar_color_7"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_8" name="sidebar_bg" type="radio" value="color_8"><label for="sidebar_color_8" class="border"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_9" name="sidebar_bg" type="radio" value="color_9"><label for="sidebar_color_9"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_10" name="sidebar_bg" type="radio" value="color_10"><label for="sidebar_color_10"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_11" name="sidebar_bg" type="radio" value="color_11"><label for="sidebar_color_11"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_12" name="sidebar_bg" type="radio" value="color_12"><label for="sidebar_color_12"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_13" name="sidebar_bg" type="radio" value="color_13"><label for="sidebar_color_13"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_14" name="sidebar_bg" type="radio" value="color_14"><label for="sidebar_color_14"></label></span><span><input class="chk-col-primary filled-in" id="sidebar_color_15" name="sidebar_bg" type="radio" value="color_15"><label for="sidebar_color_15"></label></span></div></div></div></div></div><div class="fade tab-pane" id="tab2"><div class="admin-settings"><div class="row"><div class="col-sm-6"><p>Layout</p><select class="default-select wide form-control" id="theme_layout" name="theme_layout"><option value="disabled selected hidden">Choose Layout</option><option value="vertical">Vertical</option><option value="horizontal">Horizontal</option></select></div><div class="col-sm-6"><p>Header position</p><select class="default-select wide form-control" id="header_position" name="header_position"><option value="disabled selected hidden">Choose Header Positon</option><option value="static">Static</option><option value="fixed">Fixed</option></select></div><div class="col-sm-6"><p>Sidebar</p><select class="default-select wide form-control" id="sidebar_style" name="sidebar_style"><option value="disabled selected hidden">Choose Sidebar</option><option value="full">Full</option><option value="mini">Mini</option><option value="compact">Compact</option><option value="modern">Modern</option><option value="overlay">Overlay</option><option value="icon-hover">Icon-hover</option></select></div><div class="col-sm-6"><p>Sidebar position</p><select class="default-select wide form-control" id="sidebar_position" name="sidebar_position"><option value="disabled selected hidden">Choose Sidebar Position</option><option value="static">Static</option><option value="fixed">Fixed</option></select></div></div></div></div><div class="fade tab-pane" id="tab3"><div class="admin-settings"><div class="row"><div class="col-sm-6"><p>Container</p><select class="default-select wide form-control" id="container_layout" name="container_layout"><option value="disabled selected hidden">
4Choose Container</option><option value="wide">Wide</option><option value="boxed">Boxed</option><option value="wide-boxed">Wide Boxed</option></select></div><div class="col-sm-6"><p>Body Font</p><select class="default-select wide form-control" id="typography" name="typography"><option value="disabled selected hidden">Choose Font</option><option value="roboto">Roboto</option><option value="poppins">Poppins</option><option value="opensans">Open Sans</option></select></div></div></div></div></div><div class="note-text"><span class="text-danger">*Note :</span>This theme switcher is not part of product. It is only for demo. you will get all guideline in documentation. please check<a href="https://fillow.dexignlab.com/doc/" target="_blank" class="text-primary">documentation.</a></div></div></span></a></div>'; 5 6 7 var demoPanel = '<div class="dlab-demo-panel"> <div class="bg-close"></div><a class="dlab-demo-trigger" data-toggle="tooltip" data-placement="right" data-original-title="Check out more demos" href="javascript:void(0)"><span><i class="las la-tint"></i></span></a> <div class="dlab-demo-inner"> <a href="javascript:void(0);" class="btn btn-primary btn-sm px-2 py-1 mb-3" onclick="deleteAllCookie()">Delete All Cookie</a> <div class="dlab-demo-header"> <h4>Select A Demo</h4> <a class="dlab-demo-close" href="javascript:void(0)"><span><i class="las la-times"></i></span></a> </div><div class="dlab-demo-content"> <div class="dlab-wrapper"> <div class="overlay-bx dlab-demo-bx demo-active"> <div class="overlay-wrapper"><img src="images/demo/pic1.jpg" alt="" class="w-100"></div><div class="overlay-layer"><a href="javascript:void(0);" data-theme="1" class="btn dlab_theme_demo btn-secondary btn-sm mr-2">Demo 1</a></div></div><h5 class="text-black mb-3">Demo 1</h5> <hr> <div class="overlay-bx dlab-demo-bx"> <div class="overlay-wrapper"><img src="images/demo/pic2.jpg" alt="" class="w-100"></div><div class="overlay-layer"><a href="javascript:void(0);" data-theme="2" class="btn dlab_theme_demo btn-secondary btn-sm mr-2">Demo 2</a></div></div><h5 class="text-black mb-3">Demo 2</h5> <hr> <div class="overlay-bx dlab-demo-bx"> <div class="overlay-wrapper "><img src="images/demo/pic3.jpg" alt="" class="w-100"></div><div class="overlay-layer"><a href="javascript:void(0);" data-theme="3" class="btn dlab_theme_demo btn-secondary btn-sm mr-2">Demo 3</a></div></div><h5 class="text-black mb-3">Demo 3</h5> <hr> <div class="overlay-bx dlab-demo-bx"> <div class="overlay-wrapper"><img src="images/demo/pic4.jpg" alt="" class="w-100"></div><div class="overlay-layer"><a href="javascript:void(0);" data-theme="4" class="btn dlab_theme_demo btn-secondary btn-sm mr-2">Demo 4</a></div></div><h5 class="text-black mb-3">Demo 4</h5> <hr> <div class="overlay-bx dlab-demo-bx"> <div class="overlay-wrapper"><img src="images/demo/pic5.jpg" alt="" class="w-100"></div><div class="overlay-layer"><a href="javascript:void(0);" data-theme="5" class="btn dlab_theme_demo btn-secondary btn-sm mr-2">Demo 5</a></div></div><h5 class="text-black mb-3">Demo 5</h5><hr> <div class="overlay-bx dlab-demo-bx"> <div class="overlay-wrapper"><img src="images/demo/pic6.jpg" alt="" class="w-100"></div><div class="overlay-layer"><a href="javascript:void(0);" data-theme="6" class="btn dlab_theme_demo btn-secondary btn-sm mr-2">Demo 6</a></div></div><h5 class="text-black mb-3">Demo 6</h5> </div></div><div class="note-text"><span class="text-danger">*Note :</span> This theme switcher is not part of product. It is only for demo. you will get all guideline in documentation. please check <a href="https://fillow.dexignlab.com/doc/" target="_blank" class="text-primary">documentation.</a></div></div></div>'; 8 9 if($("#dlabSwitcher").length == 0) { 10 jQuery('body').append(dlabSwitcher+demoPanel); 11 12 13 //const ps = new PerfectScrollbar('.sidebar-right-inner'); 14 //console.log(ps.reach.x); 15 //ps.isRtl = false; 16 17 $('.sidebar-right-trigger').on('click', function() { 18 $('.sidebar-right').toggleClass('show'); 19 }); 20 $('.sidebar-close-trigger,.bg-overlay').on('click', function() { 21 $('.sidebar-right').removeClass('show'); 22 }); 23 $('.dlab-demo-bx').on('click', function() { 24 $('.dlab-demo-panel').removeClass('show'); 25 26 }); 27 } 28} 29 30(function($) { 31 "use strict" 32 addSwitcher(); 33 34 35 const body = $('body'); 36 const html = $('html'); 37 38 //get the DOM elements from right sidebar 39 const typographySelect = $('#typography'); 40 const versionSelect = $('#theme_version'); 41 const layoutSelect = $('#theme_layout'); 42 const sidebarStyleSelect = $('#sidebar_style'); 43 const sidebarPositionSelect = $('#sidebar_position'); 44 const headerPositionSelect = $('#header_position'); 45 const containerLayoutSelect = $('#container_layout'); 46 const themeDirectionSelect = $('#theme_direction'); 47 48 //change the theme typography controller 49 typographySelect.on('change', function() { 50 body.attr('data-typography', this.value); 51 52 setCookie('typography', this.value); 53 }); 54 55 //change the theme version controller 56 versionSelect.on('change', function() { 57 body.attr('data-theme-version', this.value); 58 if(this.value === 'dark'){ 59 $('.dz-theme-mode').addClass('active') 60 }else{ 61 $('.dz-theme-mode').removeClass('active') 62 63 } 64 setCookie('version', this.value); 65 }); 66 67 68 69 //change the sidebar position controller 70 sidebarPositionSelect.on('change', function() { 71 this.value === "fixed" && body.attr('data-sidebar-style') === "modern" && body.attr('data-layout') === "vertical" ? 72 alert("Sorry, Modern sidebar layout dosen't support fixed position!") : 73 body.attr('data-sidebar-position', this.value); 74 setCookie('sidebarPosition', this.value); 75 }); 76 77 //change the header position controller 78 headerPositionSelect.on('change', function() { 79 body.attr('data-header-position', this.value); 80 setCookie('headerPosition', this.value); 81 }); 82 83 //change the theme direction (rtl, ltr) controller 84 themeDirectionSelect.on('change', function() { 85 html.attr('dir', this.value); 86 html.attr('class', ''); 87 html.addClass(this.value); 88 body.attr('direction', this.value); 89 setCookie('direction', this.value); 90 }); 91 92 //change the theme layout controller 93 layoutSelect.on('change', function() { 94 if(body.attr('data-sidebar-style') === 'overlay') { 95 body.attr('data-sidebar-style', 'full'); 96 body.attr('data-layout', this.value); 97 return; 98 } 99 100 body.attr('data-layout', this.value); 101 setCookie('layout', this.value); 102 }); 103 104 //change the container layout controller 105 containerLayoutSelect.on('change', function() { 106 if(this.value === "boxed") { 107 108 if(body.attr('data-layout') === "vertical" && body.attr('data-sidebar-style') === "full") { 109 body.attr('data-sidebar-style', 'overlay'); 110 body.attr('data-container', this.value); 111 112 setTimeout(function(){ 113 $(window).trigger('resize'); 114 },200); 115 116 return; 117 } 118 119 120 } 121 122 body.attr('data-container', this.value); 123 setCookie('containerLayout', this.value); 124 }); 125 126 //change the sidebar style controller 127 sidebarStyleSelect.on('change', function() { 128 if(body.attr('data-layout') === "horizontal") { 129 if(this.value === "overlay") { 130 alert("Sorry! Overlay is not possible in Horizontal layout."); 131 return; 132 } 133 } 134 135 if(body.attr('data-layout') === "vertical") { 136 if(body.attr('data-container') === "boxed" && this.value === "full") { 137 alert("Sorry! Full menu is not available in Vertical Boxed layout."); 138 return; 139 } 140 141 if(this.value === "modern" && body.attr('data-sidebar-position') === "fixed") { 142 alert("Sorry! Modern sidebar layout is not available in the fixed position. Please change the sidebar position into Static."); 143 return; 144 } 145 } 146 147 body.attr('data-sidebar-style', this.value); 148 149 if(body.attr('data-sidebar-style') === 'icon-hover') { 150 $('.dlabnav').hover(function() {
151 $('#main-wrapper').addClass('iconhover-toggle'); 152 }, function() { 153 $('#main-wrapper').removeClass('iconhover-toggle'); 154 }); 155 } 156 157 setCookie('sidebarStyle', this.value); 158 }); 159 160 161 162 163 164 165 //change the nav-header background controller 166 $('input[name="navigation_header"]').on('click', function() { 167 body.attr('data-nav-headerbg', this.value); 168 setCookie('navheaderBg', this.value); 169 }); 170 171 //change the header background controller 172 $('input[name="header_bg"]').on('click', function() { 173 body.attr('data-headerbg', this.value); 174 setCookie('headerBg', this.value); 175 }); 176 177 //change the sidebar background controller 178 $('input[name="sidebar_bg"]').on('click', function() { 179 body.attr('data-sidebarbg', this.value); 180 setCookie('sidebarBg', this.value); 181 }); 182 183 //change the primary color controller 184 $('input[name="primary_bg"]').on('click', function() { 185 body.attr('data-primary', this.value); 186 setCookie('primary', this.value); 187 }); 188 189 190 191})(jQuery); 192 193
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.