| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386 |
- "use strict!"
- $(document).ready(function () {
- // variable
-
- var Navbarbg="theme1"; // navbar color themelight1 / theme1
- var headerbg ="theme6"; // navbar color theme1 / theme2 / theme3 / theme4 / theme5 / theme6
- var menucaption ="theme9"; // menu caption color theme1 / theme2 / theme3 / theme4 / theme5 / theme6 / theme7 / theme8 / theme9
- var bgpattern ="theme6"; // background pattern theme1 / theme2 / theme3 / theme4 / theme5 / theme6
- var activeitemtheme ="theme1"; // menu active color theme1 / theme2 / theme3 / theme4 / theme5 / theme6 / theme7 / theme8 / theme9 / theme10 / theme11 / theme12
- var frametype = "theme6"; // preset frame color theme1 / theme2 / theme3 / theme4 / theme5 / theme6
- var layout_type = "light"; // theme layout dark / light
- var nav_image = "false"; // navbar image bg false / true
- var active_image = "img1"; // avtive navbar image layout img1 / img2 / img3 / img4 / img5 / img6
- var layout_width = "wide"; // theme layout wide / box
- var menu_effect_desktop = "shrink"; // navbar effect in desktop shrink / overlay / push
- var menu_effect_tablet = "overlay"; // navbar effect in tablet shrink / overlay / push
- var menu_effect_phone = "overlay"; // navbar effect in phone shrink / overlay / push
-
- function setCookie(cname,cvalue,exdays) {
- }
- $("#pcoded").pcodedmenu({
- themelayout: 'vertical',
- verticalMenuplacement: 'left', // value should be left/right
- verticalMenulayout: layout_width, // value should be wide/box
- MenuTrigger: 'click', // click / hover
- SubMenuTrigger: 'click', // click / hover
- activeMenuClass: 'active',
- ThemeBackgroundPattern: bgpattern, // pattern1, pattern2, pattern3, pattern4, pattern5, pattern6
- HeaderBackground: headerbg, // theme1, theme2, theme3, theme4, theme5 header color
- LHeaderBackground: menucaption, // theme1, theme2, theme3, theme4, theme5, theme6 brand color
- NavbarBackground: Navbarbg, // themelight1, theme1 // light and dark sidebar
- ActiveItemBackground: activeitemtheme, // theme1, theme2, theme3, theme4, theme5, theme6, theme7, theme8, theme9, theme10, theme11, theme12 mennu active item color
- SubItemBackground: 'theme2',
- ActiveItemStyle: 'style0',
- ItemBorder: true,
- ItemBorderStyle: 'none',
- NavbarImage:nav_image,
- ActiveNavbarImage: active_image,
- freamtype:frametype,
- SubItemBorder: true,
- DropDownIconStyle: 'style3', // Value should be style1,style2,style3
- menutype: 'st2', // Value should be st1, st2, st3, st4, st5 menu icon style
- layouttype:layout_type, // Value should be light / dark
- FixedNavbarPosition: true, // Value should be true / false header postion
- FixedHeaderPosition: true, // Value should be true / false sidebar menu postion
- collapseVerticalLeftHeader: true,
- VerticalSubMenuItemIconStyle: 'style7', // value should be style1, style2, style3, style4, style5, style6
- VerticalNavigationView: 'view1',
- verticalMenueffect: {
- desktop: menu_effect_desktop,
- tablet: menu_effect_tablet,
- phone: menu_effect_phone,
- },
- defaultVerticalMenu: {
- desktop: "expanded", // value should be offcanvas/collapsed/expanded/compact/compact-acc/fullpage/ex-popover/sub-expanded
- tablet: "offcanvas", // value should be offcanvas/collapsed/expanded/compact/fullpage/ex-popover/sub-expanded
- phone: "offcanvas", // value should be offcanvas/collapsed/expanded/compact/fullpage/ex-popover/sub-expanded
- },
- onToggleVerticalMenu: {
- desktop: "offcanvas", // value should be offcanvas/collapsed/expanded/compact/fullpage/ex-popover/sub-expanded
- tablet: "expanded", // value should be offcanvas/collapsed/expanded/compact/fullpage/ex-popover/sub-expanded
- phone: "expanded", // value should be offcanvas/collapsed/expanded/compact/fullpage/ex-popover/sub-expanded
- },
-
- });
- function handlenavimg() {
- $('.theme-color > a.navbg-pattern').on("click", function () {
- var value = $(this).attr("navbg-pattern");
- $('.pcoded').attr('sidebar-img-type', value);
- setCookie("sidebar-img-type", value, 1);
- });
- };
- handlenavimg();
- /* layout type Change function Start */
- function handlelayouttheme() {
- $('.theme-color > a.Layout-type').on("click", function () {
- var layout = $(this).attr("layout-type");
- $('.pcoded').attr("layout-type", layout);
- setCookie("layoutlayout", layout, 1);
- if(layout=='dark'){
- $('.pcoded-header').attr("header-theme", "theme6");
- $('.pcoded-navbar').attr("navbar-theme", "theme1");
- $('.pcoded').attr("sidebar-img", "false");
- $('body').addClass('dark');
- $('body').attr("themebg-pattern", "theme6");
- $('.pcoded-navigation-label').attr("menu-title-theme", "theme9");
- setCookie("header-theme", "theme6", 1);
- setCookie("NavbarBackground", "theme1", 1);
- setCookie("menu-title-theme", "theme9", 1);
- setCookie("themebg-pattern", "theme6", 1);
- setCookie("sidebar-img", "false", 1);
- }
- if(layout=='light'){
- $('.pcoded-header').attr("header-theme", "theme1");
- $('.pcoded-navbar').attr("navbar-theme", "themelight1");
- $('.pcoded').attr("sidebar-img", "false");
- $('.pcoded-navigation-label').attr("menu-title-theme", "theme1");
- $('body').removeClass('dark');
- $('body').attr("themebg-pattern", "theme1");
- setCookie("header-theme", "theme1", 1);
- setCookie("NavbarBackground", "themelight1", 1);
- setCookie("menu-title-theme", "theme1", 1);
- setCookie("themebg-pattern", "theme1", 1);
- setCookie("sidebar-img", "false", 1);
- }
- if(layout=='img'){
- $('.pcoded-header').attr("header-theme", "theme1");
- $('.pcoded-navbar').attr("navbar-theme", "themelight1");
- $('.pcoded-navbar').attr("navbar-theme", "themelight1");
- $('.pcoded').attr("sidebar-img", "true");
- $('.pcoded').attr("frame-type", "theme1");
- $('.pcoded-navigation-label').attr("menu-title-theme", "theme1");
- setCookie("header-theme", "theme1", 1);
- setCookie("NavbarBackground", "themelight1", 1);
- setCookie("menu-title-theme", "theme1", 1);
- setCookie("themebg-pattern", "theme1", 1);
- setCookie("sidebar-img", "true", 1);
- setCookie("fream-type", headertheme, "theme1");
- }
- });
- };
- handlelayouttheme();
-
- /* Left header logo Change function Start */
- // function handleogortheme() {
- // $('.theme-color > a.logo-theme').on("click", function () {
- // var logotheme = $(this).attr("logo-theme");
- // $('.navbar-logo').attr("logo-theme", logotheme);
- // });
- // };
- // handleogortheme();
-
- /* Left header Theme Change function Start */
- function handleleftheadertheme() {
- $('.theme-color > a.leftheader-theme').on("click", function () {
- var lheadertheme = $(this).attr("lheader-theme");
- $('.pcoded-navigation-label').attr("menu-title-theme", lheadertheme);
- setCookie("menu-title-theme", lheadertheme, 1);
- });
- };
- handleleftheadertheme();
- /* Left header Theme Change function Close */
- /* header Theme Change function Start */
- function handleheadertheme() {
- $('.theme-color > a.header-theme').on("click", function () {
- var headertheme = $(this).attr("header-theme");
- var activeitem = $(this).attr("active-item-color");
- $('.pcoded-header').attr("header-theme", headertheme);
- $('.pcoded-navbar').attr("active-item-theme", activeitem);
- $('.pcoded').attr("fream-type", headertheme);
- $('.pcoded-navigation-label').attr("menu-title-theme", headertheme);
- $('body').attr("themebg-pattern", headertheme);
-
- // coockies
- setCookie("header-theme", headertheme, 1);
- setCookie("active-item-theme", activeitem, 1);
- setCookie("menu-title-theme", headertheme, 1);
- setCookie("themebg-pattern", headertheme, 1);
- setCookie("fream-type", headertheme, 1);
- });
- };
- handleheadertheme();
- /* header Theme Change function Close */
- /* Navbar Theme Change function Start */
- function handlenavbartheme() {
- $('.theme-color > a.navbar-theme').on("click", function () {
- var navbartheme = $(this).attr("navbar-theme");
- $('.pcoded-navbar').attr("navbar-theme", navbartheme);
- $('.pcoded').attr("sidebar-img", "false");
- setCookie("NavbarBackground", navbartheme, 1);
- setCookie("sidebar-img", "false", 1);
- if(navbartheme=='themelight1'){
- $('.pcoded-navigation-label').attr("menu-title-theme", "theme1");
- setCookie("menu-title-theme", "theme1", 1);
- }
- if(navbartheme=='theme1'){
- $('.pcoded-navigation-label').attr("menu-title-theme", "theme9");
- setCookie("menu-title-theme", "theme9", 1);
- }
- });
- };
-
- handlenavbartheme();
- /* Navbar Theme Change function Close */
- /* Active Item Theme Change function Start */
- function handleactiveitemtheme() {
- $('.theme-color > a.active-item-theme').on("click", function () {
- var activeitemtheme = $(this).attr("active-item-theme");
- $('.pcoded-navbar').attr("active-item-theme", activeitemtheme);
- setCookie("active-item-theme", activeitemtheme, 1);
- });
- };
-
- handleactiveitemtheme();
- /* Active Item Theme Change function Close */
- /* SubItem Theme Change function Start */
- // function handlesubitemtheme() {
- // $('.theme-color > a.sub-item-theme').on("click", function () {
- // var subitemtheme = $(this).attr("sub-item-theme");
- // $('.pcoded-navbar').attr("sub-item-theme", subitemtheme);
- // });
- // };
- //
- // handlesubitemtheme();
- /* SubItem Theme Change function Close */
- /* Theme background pattren Change function Start */
- function handlethemebgpattern() {
- $('.theme-color > a.themebg-pattern').on("click", function () {
- var themebgpattern = $(this).attr("themebg-pattern");
- $('body').attr("themebg-pattern", themebgpattern);
- setCookie("themebg-pattern", themebgpattern, 1);
- });
- };
-
- handlethemebgpattern();
- /* Theme background pattren Change function Close */
- /* Vertical Navigation View Change function start*/
- // function handleVerticalNavigationViewChange() {
- // $('#navigation-view').val('view1').on('change', function (get_value) {
- // get_value = $(this).val();
- // $('.pcoded').attr('vnavigation-view', get_value);
- // });
- // };
- //
- // handleVerticalNavigationViewChange();
- /* Theme Layout Change function Close*/
-
- /* Theme Layout Change function start*/
- function handlethemeverticallayout() {
- $('#theme-layout').change(function () {
- if ($(this).is(":checked")) {
- $('.pcoded').attr('vertical-layout', "box");
- setCookie("vertical-layout", "box", 1);
- $('#bg-pattern-visiblity').removeClass('d-none');
-
- } else {
- $('.pcoded').attr('vertical-layout', "wide");
- setCookie("vertical-layout", "wide", 1);
- $('#bg-pattern-visiblity').addClass('d-none');
- }
- });
- };
- handlethemeverticallayout();
- /* Theme Layout Change function Close*/
- /* Menu effect change function start*/
- function handleverticalMenueffect() {
- $('#vertical-menu-effect').val('shrink').on('change', function (get_value) {
- get_value = $(this).val();
- $('.pcoded').attr('vertical-effect', get_value);
- setCookie("vertical-effect", get_value, 1);
- });
- };
-
- handleverticalMenueffect();
- /* Menu effect change function Close*/
- /* Vertical Menu Placement change function start*/
- // function handleverticalMenuplacement() {
- // $('#vertical-navbar-placement').val('left').on('change', function (get_value) {
- // get_value = $(this).val();
- // $('.pcoded').attr('vertical-placement', get_value);
- // $('.pcoded-navbar').attr("pcoded-navbar-position", 'absolute');
- // $('.pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'relative');
- // });
- // };
-
- // handleverticalMenuplacement();
- /* Vertical Menu Placement change function Close*/
- /* Vertical Active Item Style change function Start*/
- // function handleverticalActiveItemStyle() {
- // $('#vertical-activeitem-style').val('style1').on('change', function (get_value) {
- // get_value = $(this).val();
- // $('.pcoded-navbar').attr('active-item-style', get_value);
- // });
- // };
-
- // handleverticalActiveItemStyle();
- /* Vertical Active Item Style change function Close*/
- /* Vertical Item border change function Start*/
- // function handleVerticalIItemBorder() {
- // $('#vertical-item-border').change(function () {
- // if ($(this).is(":checked")) {
- // $('.pcoded-navbar .pcoded-item').attr('item-border', 'false');
- // } else {
- // $('.pcoded-navbar .pcoded-item').attr('item-border', 'true');
- // }
- // });
- // };
- //
- // handleVerticalIItemBorder();
- /* Vertical Item border change function Close*/
- /* Vertical SubItem border change function Start*/
- // function handleVerticalSubIItemBorder() {
- // $('#vertical-subitem-border').change(function () {
- // if ($(this).is(":checked")) {
- // $('.pcoded-navbar .pcoded-item').attr('subitem-border', 'false');
- // } else {
- // $('.pcoded-navbar .pcoded-item').attr('subitem-border', 'true');
- // }
- // });
- // };
- //
- // handleVerticalSubIItemBorder();
- /* Vertical SubItem border change function Close*/
- /* Vertical Item border Style change function Start*/
- function handleverticalboderstyle() {
- $('#vertical-border-style').val('solid').on('change', function (get_value) {
- get_value = $(this).val();
- $('.pcoded-navbar .pcoded-item').attr('item-border-style', get_value);
- });
- };
-
- handleverticalboderstyle();
- /* Vertical Item border Style change function Close*/
-
- /* Vertical Dropdown Icon change function Start*/
- function handleVerticalDropDownIconStyle() {
- $('#vertical-dropdown-icon').val('style1').on('change', function (get_value) {
- get_value = $(this).val();
- $('.pcoded-navbar .pcoded-hasmenu').attr('dropdown-icon', get_value);
- });
- };
-
- handleVerticalDropDownIconStyle();
- /* Vertical Dropdown Icon change function Close*/
- /* Vertical SubItem Icon change function Start*/
-
- function handleVerticalSubMenuItemIconStyle() {
- $('#vertical-subitem-icon').val('style5').on('change', function (get_value) {
- get_value = $(this).val();
- $('.pcoded-navbar .pcoded-hasmenu').attr('subitem-icon', get_value);
- });
- };
-
- handleVerticalSubMenuItemIconStyle();
- /* Vertical SubItem Icon change function Close*/
- /* Vertical Navbar Position change function Start*/
- function handlesidebarposition() {
- $('#sidebar-position').change(function () {
- if ($(this).is(":checked")) {
- $('.pcoded-navbar').attr("pcoded-navbar-position", 'fixed');
- $('.pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'fixed');
- } else {
- $('.pcoded-navbar').attr("pcoded-navbar-position", 'absolute');
- $('.pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'relative');
- }
- });
- };
-
- handlesidebarposition();
- /* Vertical Navbar Position change function Close*/
- /* Vertical Header Position change function Start*/
- function handleheaderposition() {
- $('#header-position').change(function () {
- if ($(this).is(":checked")) {
- $('.pcoded-header').attr("pcoded-header-position", 'fixed');
- $('.pcoded-navbar').attr("pcoded-header-position", 'fixed');
- $('.pcoded-main-container').css('margin-top', $(".pcoded-header").outerHeight());
- } else {
- $('.pcoded-header').attr("pcoded-header-position", 'relative');
- $('.pcoded-navbar').attr("pcoded-header-position", 'relative');
- $('.pcoded-main-container').css('margin-top', '0px');
- }
- });
- };
- handleheaderposition();
- /* Vertical Header Position change function Close*/
- /* collapseable Left Header Change Function Start here*/
- function handlecollapseLeftHeader() {
- $('#collapse-left-header').change(function () {
- if ($(this).is(":checked")) {
- $('.pcoded-header, .pcoded ').removeClass('iscollapsed');
- $('.pcoded-header, .pcoded').addClass('nocollapsed');
- } else {
- $('.pcoded-header, .pcoded').addClass('iscollapsed');
- $('.pcoded-header, .pcoded').removeClass('nocollapsed');
- }
- });
- };
- handlecollapseLeftHeader();
- /* collapseable Left Header Change Function Close here*/
- });
- function handlemenutype(get_value) {
- $('.pcoded').attr('nav-type', get_value);
- };
-
- handlemenutype("st2");
|