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

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