You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

313 lines
13 KiB

1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. $(document).ready(function () {
  2. $("#pcoded").pcodedmenu({
  3. themelayout: 'vertical',
  4. verticalMenuplacement: 'left', // value should be left/right
  5. verticalMenulayout: 'wide', // value should be wide/box
  6. MenuTrigger: 'click', // click / hover
  7. SubMenuTrigger: 'click', // click / hover
  8. activeMenuClass: 'active',
  9. ThemeBackgroundPattern: 'pattern1', // pattern1, pattern2, pattern3, pattern4, pattern5, pattern6
  10. HeaderBackground: 'theme1', // theme1, theme2, theme3, theme4, theme5 header color
  11. LHeaderBackground: 'theme1', // theme1, theme2, theme3, theme4, theme5, theme6 brand color
  12. NavbarBackground: 'theme1', // themelight1, theme1 // light and dark sidebar
  13. ActiveItemBackground: 'theme1', // theme1, theme2, theme3, theme4, theme5, theme6, theme7, theme8, theme9, theme10, theme11, theme12 mennu active item color
  14. SubItemBackground: 'theme2',
  15. ActiveItemStyle: 'style0',
  16. ItemBorder: true,
  17. ItemBorderStyle: 'none',
  18. SubItemBorder: true,
  19. DropDownIconStyle: 'style1', // Value should be style1,style2,style3
  20. menutype: 'st6', // Value should be st1, st2, st3, st4, st5 menu icon style
  21. freamtype: "theme1",
  22. layouttype:'light', // Value should be light / dark
  23. FixedNavbarPosition: true, // Value should be true / false header postion
  24. FixedHeaderPosition: false, // Value should be true / false sidebar menu postion
  25. collapseVerticalLeftHeader: true,
  26. VerticalSubMenuItemIconStyle: 'style1', // value should be style1, style2, style3, style4, style5, style6
  27. VerticalNavigationView: 'view1',
  28. verticalMenueffect: {
  29. desktop: "shrink",
  30. tablet: "overlay",
  31. phone: "overlay",
  32. },
  33. defaultVerticalMenu: {
  34. desktop: "expanded", // value should be offcanvas/collapsed/expanded/compact/compact-acc/fullpage/ex-popover/sub-expanded
  35. tablet: "offcanvas", // value should be offcanvas/collapsed/expanded/compact/fullpage/ex-popover/sub-expanded
  36. phone: "offcanvas", // value should be offcanvas/collapsed/expanded/compact/fullpage/ex-popover/sub-expanded
  37. },
  38. onToggleVerticalMenu: {
  39. desktop: "offcanvas", // value should be offcanvas/collapsed/expanded/compact/fullpage/ex-popover/sub-expanded
  40. tablet: "expanded", // value should be offcanvas/collapsed/expanded/compact/fullpage/ex-popover/sub-expanded
  41. phone: "expanded", // value should be offcanvas/collapsed/expanded/compact/fullpage/ex-popover/sub-expanded
  42. },
  43. });
  44. function freamtype() {
  45. $('.theme-color > a.fream-type').on("click", function () {
  46. var value = $(this).attr("fream-type");
  47. $('.pcoded').attr('fream-type', value);
  48. $('.pcoded-header').attr("header-theme", "themelight"+value);
  49. $('.pcoded-navbar').attr("navbar-theme", "theme" + value);
  50. $('.navbar-logo').attr("logo-theme", "theme" + value);
  51. });
  52. };
  53. freamtype();
  54. /* layout type Change function Start */
  55. function handlelayouttheme() {
  56. $('.theme-color > a.Layout-type').on("click", function () {
  57. var layout = $(this).attr("layout-type");
  58. $('.pcoded').attr("layout-type", layout);
  59. if(layout=='dark'){
  60. $('.pcoded-header').attr("header-theme", "theme6");
  61. $('.pcoded-navbar').attr("navbar-theme", "theme1");
  62. $('.navbar-logo').attr("logo-theme", "theme6");
  63. $('body').addClass('dark');
  64. }
  65. if(layout=='light'){
  66. $('.pcoded-header').attr("header-theme", "theme1");
  67. $('.pcoded-navbar').attr("navbar-theme", "themelight1");
  68. $('.navbar-logo').attr("logo-theme", "theme1");
  69. $('body').removeClass('dark');
  70. }
  71. });
  72. };
  73. handlelayouttheme();
  74. /* Left header logo Change function Start */
  75. function handleogortheme() {
  76. $('.theme-color > a.logo-theme').on("click", function () {
  77. var logotheme = $(this).attr("logo-theme");
  78. $('.navbar-logo').attr("logo-theme", logotheme);
  79. });
  80. };
  81. handleogortheme();
  82. /* Left header Theme Change function Start */
  83. function handleleftheadertheme() {
  84. $('.theme-color > a.leftheader-theme').on("click", function () {
  85. var lheadertheme = $(this).attr("lheader-theme");
  86. $('.pcoded-navigatio-lavel').attr("menu-title-theme", lheadertheme);
  87. });
  88. };
  89. handleleftheadertheme();
  90. /* Left header Theme Change function Close */
  91. /* header Theme Change function Start */
  92. function handleheadertheme() {
  93. $('.theme-color > a.header-theme').on("click", function () {
  94. var headertheme = $(this).attr("header-theme");
  95. $('.pcoded-header').attr("header-theme", headertheme);
  96. $('.navbar-logo').attr("logo-theme", headertheme);
  97. });
  98. };
  99. handleheadertheme();
  100. /* header Theme Change function Close */
  101. /* Navbar Theme Change function Start */
  102. function handlenavbartheme() {
  103. $('.theme-color > a.navbar-theme').on("click", function () {
  104. var navbartheme = $(this).attr("navbar-theme");
  105. $('.pcoded-navbar').attr("navbar-theme", navbartheme);
  106. });
  107. };
  108. handlenavbartheme();
  109. /* Navbar Theme Change function Close */
  110. /* Active Item Theme Change function Start */
  111. function handleactiveitemtheme() {
  112. $('.theme-color > a.active-item-theme').on("click", function () {
  113. var activeitemtheme = $(this).attr("active-item-theme");
  114. $('.pcoded-navbar').attr("active-item-theme", activeitemtheme);
  115. });
  116. };
  117. handleactiveitemtheme();
  118. /* Active Item Theme Change function Close */
  119. /* SubItem Theme Change function Start */
  120. function handlesubitemtheme() {
  121. $('.theme-color > a.sub-item-theme').on("click", function () {
  122. var subitemtheme = $(this).attr("sub-item-theme");
  123. $('.pcoded-navbar').attr("sub-item-theme", subitemtheme);
  124. });
  125. };
  126. handlesubitemtheme();
  127. /* SubItem Theme Change function Close */
  128. /* Theme background pattren Change function Start */
  129. function handlethemebgpattern() {
  130. $('.theme-color > a.themebg-pattern').on("click", function () {
  131. var themebgpattern = $(this).attr("themebg-pattern");
  132. $('body').attr("themebg-pattern", themebgpattern);
  133. });
  134. };
  135. handlethemebgpattern();
  136. /* Theme background pattren Change function Close */
  137. /* Vertical Navigation View Change function start*/
  138. function handleVerticalNavigationViewChange() {
  139. $('#navigation-view').val('view1').on('change', function (get_value) {
  140. get_value = $(this).val();
  141. $('.pcoded').attr('vnavigation-view', get_value);
  142. });
  143. };
  144. handleVerticalNavigationViewChange();
  145. /* Theme Layout Change function Close*/
  146. /* Theme Layout Change function start*/
  147. function handlethemeverticallayout() {
  148. $('#theme-layout').change(function () {
  149. if ($(this).is(":checked")) {
  150. $('.pcoded').attr('vertical-layout', "box");
  151. $('#bg-pattern-visiblity').removeClass('d-none');
  152. } else {
  153. $('.pcoded').attr('vertical-layout', "wide");
  154. $('#bg-pattern-visiblity').addClass('d-none');
  155. }
  156. });
  157. };
  158. handlethemeverticallayout();
  159. /* Theme Layout Change function Close*/
  160. /* Menu effect change function start*/
  161. function handleverticalMenueffect() {
  162. $('#vertical-menu-effect').val('shrink').on('change', function (get_value) {
  163. get_value = $(this).val();
  164. $('.pcoded').attr('vertical-effect', get_value);
  165. });
  166. };
  167. handleverticalMenueffect();
  168. /* Menu effect change function Close*/
  169. /* Vertical Menu Placement change function start*/
  170. function handleverticalMenuplacement() {
  171. $('#vertical-navbar-placement').val('left').on('change', function (get_value) {
  172. get_value = $(this).val();
  173. $('.pcoded').attr('vertical-placement', get_value);
  174. $('.pcoded-navbar').attr("pcoded-navbar-position", 'absolute');
  175. $('.pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'relative');
  176. });
  177. };
  178. handleverticalMenuplacement();
  179. /* Vertical Menu Placement change function Close*/
  180. /* Vertical Active Item Style change function Start*/
  181. function handleverticalActiveItemStyle() {
  182. $('#vertical-activeitem-style').val('style1').on('change', function (get_value) {
  183. get_value = $(this).val();
  184. $('.pcoded-navbar').attr('active-item-style', get_value);
  185. });
  186. };
  187. handleverticalActiveItemStyle();
  188. /* Vertical Active Item Style change function Close*/
  189. /* Vertical Item border change function Start*/
  190. function handleVerticalIItemBorder() {
  191. $('#vertical-item-border').change(function () {
  192. if ($(this).is(":checked")) {
  193. $('.pcoded-navbar .pcoded-item').attr('item-border', 'false');
  194. } else {
  195. $('.pcoded-navbar .pcoded-item').attr('item-border', 'true');
  196. }
  197. });
  198. };
  199. handleVerticalIItemBorder();
  200. /* Vertical Item border change function Close*/
  201. /* Vertical SubItem border change function Start*/
  202. function handleVerticalSubIItemBorder() {
  203. $('#vertical-subitem-border').change(function () {
  204. if ($(this).is(":checked")) {
  205. $('.pcoded-navbar .pcoded-item').attr('subitem-border', 'false');
  206. } else {
  207. $('.pcoded-navbar .pcoded-item').attr('subitem-border', 'true');
  208. }
  209. });
  210. };
  211. handleVerticalSubIItemBorder();
  212. /* Vertical SubItem border change function Close*/
  213. /* Vertical Item border Style change function Start*/
  214. function handleverticalboderstyle() {
  215. $('#vertical-border-style').val('solid').on('change', function (get_value) {
  216. get_value = $(this).val();
  217. $('.pcoded-navbar .pcoded-item').attr('item-border-style', get_value);
  218. });
  219. };
  220. handleverticalboderstyle();
  221. /* Vertical Item border Style change function Close*/
  222. /* Vertical Dropdown Icon change function Start*/
  223. function handleVerticalDropDownIconStyle() {
  224. $('#vertical-dropdown-icon').val('style1').on('change', function (get_value) {
  225. get_value = $(this).val();
  226. $('.pcoded-navbar .pcoded-hasmenu').attr('dropdown-icon', get_value);
  227. });
  228. };
  229. handleVerticalDropDownIconStyle();
  230. /* Vertical Dropdown Icon change function Close*/
  231. /* Vertical SubItem Icon change function Start*/
  232. function handleVerticalSubMenuItemIconStyle() {
  233. $('#vertical-subitem-icon').val('style5').on('change', function (get_value) {
  234. get_value = $(this).val();
  235. $('.pcoded-navbar .pcoded-hasmenu').attr('subitem-icon', get_value);
  236. });
  237. };
  238. handleVerticalSubMenuItemIconStyle();
  239. /* Vertical SubItem Icon change function Close*/
  240. /* Vertical Navbar Position change function Start*/
  241. function handlesidebarposition() {
  242. $('#sidebar-position').change(function () {
  243. if ($(this).is(":checked")) {
  244. $('.pcoded-navbar').attr("pcoded-navbar-position", 'fixed');
  245. $('.pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'fixed');
  246. } else {
  247. $('.pcoded-navbar').attr("pcoded-navbar-position", 'absolute');
  248. $('.pcoded-header .pcoded-left-header').attr("pcoded-lheader-position", 'relative');
  249. }
  250. });
  251. };
  252. handlesidebarposition();
  253. /* Vertical Navbar Position change function Close*/
  254. /* Vertical Header Position change function Start*/
  255. function handleheaderposition() {
  256. $('#header-position').change(function () {
  257. if ($(this).is(":checked")) {
  258. $('.pcoded-header').attr("pcoded-header-position", 'fixed');
  259. $('.pcoded-navbar').attr("pcoded-header-position", 'fixed');
  260. $('.pcoded-main-container').css('margin-top', $(".pcoded-header").outerHeight());
  261. } else {
  262. $('.pcoded-header').attr("pcoded-header-position", 'relative');
  263. $('.pcoded-navbar').attr("pcoded-header-position", 'relative');
  264. $('.pcoded-main-container').css('margin-top', '0px');
  265. }
  266. });
  267. };
  268. handleheaderposition();
  269. /* Vertical Header Position change function Close*/
  270. /* collapseable Left Header Change Function Start here*/
  271. function handlecollapseLeftHeader() {
  272. $('#collapse-left-header').change(function () {
  273. if ($(this).is(":checked")) {
  274. $('.pcoded-header, .pcoded ').removeClass('iscollapsed');
  275. $('.pcoded-header, .pcoded').addClass('nocollapsed');
  276. } else {
  277. $('.pcoded-header, .pcoded').addClass('iscollapsed');
  278. $('.pcoded-header, .pcoded').removeClass('nocollapsed');
  279. }
  280. });
  281. };
  282. handlecollapseLeftHeader();
  283. /* collapseable Left Header Change Function Close here*/
  284. });
  285. function handlemenutype(get_value) {
  286. $('.pcoded').attr('nav-type', get_value);
  287. };
  288. handlemenutype("st2");