Dashboard sipadu mbip
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

menu-hori-fixed.js 13KB

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