Dashboard sipadu mbip
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.

horizontal-layout.min.js 13KB

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