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.

script.js 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. "use strict";
  2. $(document).ready(function() {
  3. // card js start
  4. $(".card-header-right .close-card").on('click', function() {
  5. var $this = $(this);
  6. $this.parents('.card').animate({
  7. 'opacity': '0',
  8. '-webkit-transform': 'scale3d(.3, .3, .3)',
  9. 'transform': 'scale3d(.3, .3, .3)'
  10. });
  11. setTimeout(function() {
  12. $this.parents('.card').remove();
  13. }, 800);
  14. });
  15. $(".card-header-right .reload-card").on('click', function() {
  16. var $this = $(this);
  17. $this.parents('.card').addClass("card-load");
  18. $this.parents('.card').append('<div class="card-loader"><i class="fa fa-circle-o-notch rotate-refresh"></div>');
  19. setTimeout(function() {
  20. $this.parents('.card').children(".card-loader").remove();
  21. $this.parents('.card').removeClass("card-load");
  22. }, 3000);
  23. });
  24. $(".card-header-right .card-option .open-card-option").on('click', function() {
  25. var $this = $(this);
  26. if ($this.hasClass('fa-times')) {
  27. $this.parents('.card-option').animate({
  28. 'width': '30px',
  29. });
  30. $(this).removeClass("fa-times").fadeIn('slow');
  31. $(this).addClass("fa-wrench").fadeIn('slow');
  32. } else {
  33. $this.parents('.card-option').animate({
  34. 'width': '140px',
  35. });
  36. $(this).addClass("fa-times").fadeIn('slow');
  37. $(this).removeClass("fa-wrench").fadeIn('slow');
  38. }
  39. });
  40. $(".card-header-right .minimize-card").on('click', function() {
  41. var $this = $(this);
  42. var port = $($this.parents('.card'));
  43. var card = $(port).children('.card-block').slideToggle();
  44. $(this).toggleClass("fa-minus").fadeIn('slow');
  45. $(this).toggleClass("fa-plus").fadeIn('slow');
  46. });
  47. $(".card-header-right .full-card").on('click', function() {
  48. var $this = $(this);
  49. var port = $($this.parents('.card'));
  50. port.toggleClass("full-card");
  51. $(this).toggleClass("fa-window-restore");
  52. });
  53. $("#more-details").on('click', function() {
  54. $(".more-details").slideToggle(500);
  55. });
  56. $(".mobile-options").on('click', function() {
  57. $(".navbar-container .nav-right").slideToggle('slow');
  58. });
  59. $(".search-btn").on('click', function() {
  60. $(".main-search").addClass('open');
  61. $('.main-search .form-control').animate({
  62. 'width': '200px',
  63. });
  64. });
  65. $(".search-close").on('click', function() {
  66. $('.main-search .form-control').animate({
  67. 'width': '0',
  68. });
  69. setTimeout(function() {
  70. $(".main-search").removeClass('open');
  71. }, 300);
  72. });
  73. $(document).ready(function(){
  74. $(".header-notification").click(function(){
  75. $(this).find(".show-notification").slideToggle(500);
  76. $(this).toggleClass('active');
  77. });
  78. });
  79. $(document).on("click", function(event){
  80. var $trigger = $(".header-notification");
  81. if($trigger !== event.target && !$trigger.has(event.target).length){
  82. $(".show-notification").slideUp(300);
  83. $(".header-notification").removeClass('active');
  84. }
  85. });
  86. // card js end
  87. $.mCustomScrollbar.defaults.axis = "yx";
  88. $("#styleSelector .style-cont").slimScroll({
  89. setTop: "1px",
  90. height:"calc(100vh - 520px)",
  91. });
  92. $(".main-menu").mCustomScrollbar({
  93. setTop: "1px",
  94. setHeight: "calc(100% - 56px)",
  95. });
  96. /*chatbar js start*/
  97. /*chat box scroll*/
  98. var a = $(window).height() - 80;
  99. $(".main-friend-list").slimScroll({
  100. height: a,
  101. allowPageScroll: false,
  102. wheelStep: 5,
  103. color: '#1b8bf9'
  104. });
  105. // search
  106. $("#search-friends").on("keyup", function() {
  107. var g = $(this).val().toLowerCase();
  108. $(".userlist-box .media-body .chat-header").each(function() {
  109. var s = $(this).text().toLowerCase();
  110. $(this).closest('.userlist-box')[s.indexOf(g) !== -1 ? 'show' : 'hide']();
  111. });
  112. });
  113. // open chat box
  114. $('.displayChatbox').on('click', function() {
  115. var my_val = $('.pcoded').attr('vertical-placement');
  116. if (my_val == 'right') {
  117. var options = {
  118. direction: 'left'
  119. };
  120. } else {
  121. var options = {
  122. direction: 'right'
  123. };
  124. }
  125. $('.showChat').toggle('slide', options, 500);
  126. });
  127. //open friend chat
  128. $('.userlist-box').on('click', function() {
  129. var my_val = $('.pcoded').attr('vertical-placement');
  130. if (my_val == 'right') {
  131. var options = {
  132. direction: 'left'
  133. };
  134. } else {
  135. var options = {
  136. direction: 'right'
  137. };
  138. }
  139. $('.showChat_inner').toggle('slide', options, 500);
  140. });
  141. //back to main chatbar
  142. $('.back_chatBox').on('click', function() {
  143. var my_val = $('.pcoded').attr('vertical-placement');
  144. if (my_val == 'right') {
  145. var options = {
  146. direction: 'left'
  147. };
  148. } else {
  149. var options = {
  150. direction: 'right'
  151. };
  152. }
  153. $('.showChat_inner').toggle('slide', options, 500);
  154. $('.showChat').css('display', 'block');
  155. });
  156. $('.back_friendlist').on('click', function() {
  157. var my_val = $('.pcoded').attr('vertical-placement');
  158. if (my_val == 'right') {
  159. var options = {
  160. direction: 'left'
  161. };
  162. } else {
  163. var options = {
  164. direction: 'right'
  165. };
  166. }
  167. $('.p-chat-user').toggle('slide', options, 500);
  168. $('.showChat').css('display', 'block');
  169. });
  170. // /*chatbar js end*/
  171. $('[data-toggle="tooltip"]').tooltip();
  172. // wave effect js
  173. Waves.init();
  174. Waves.attach('.flat-buttons', ['waves-button']);
  175. Waves.attach('.float-buttons', ['waves-button', 'waves-float']);
  176. Waves.attach('.float-button-light', ['waves-button', 'waves-float', 'waves-light']);
  177. Waves.attach('.flat-buttons', ['waves-button', 'waves-float', 'waves-light', 'flat-buttons']);
  178. });
  179. $(document).ready(function() {
  180. $(".theme-loader").animate({
  181. opacity: "0"
  182. },1000);
  183. setTimeout(function() {
  184. $(".theme-loader").remove();
  185. }, 1000);
  186. });
  187. // toggle full screen
  188. function toggleFullScreen() {
  189. var a = $(window).height() - 10;
  190. if (!document.fullscreenElement && // alternative standard method
  191. !document.mozFullScreenElement && !document.webkitFullscreenElement) { // current working methods
  192. if (document.documentElement.requestFullscreen) {
  193. document.documentElement.requestFullscreen();
  194. } else if (document.documentElement.mozRequestFullScreen) {
  195. document.documentElement.mozRequestFullScreen();
  196. } else if (document.documentElement.webkitRequestFullscreen) {
  197. document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
  198. }
  199. } else {
  200. if (document.cancelFullScreen) {
  201. document.cancelFullScreen();
  202. } else if (document.mozCancelFullScreen) {
  203. document.mozCancelFullScreen();
  204. } else if (document.webkitCancelFullScreen) {
  205. document.webkitCancelFullScreen();
  206. }
  207. }
  208. }
  209. /* --------------------------------------------------------
  210. Color picker - demo only
  211. -------------------------------------------------------- */
  212. $('#styleSelector').append('' +
  213. '<div class="selector-toggle">' +
  214. '<a href="javascript:void(0)" class="waves-effect waves-light"></a>' +
  215. '</div>' +
  216. '<ul>' +
  217. '<li>' +
  218. '<p class="selector-title main-title st-main-title"><b>Material </b>able Customizer</p>' +
  219. '<span class="text-muted">Live customizer with tons of options</span>'+
  220. '</li>' +
  221. '<li>' +
  222. '<p class="selector-title">Main layouts</p>' +
  223. '</li>' +
  224. '<li>' +
  225. '<div class="theme-color">' +
  226. '<a href="#" data-toggle="tooltip" title="light Navbar" class="navbar-theme waves-effect waves-light" navbar-theme="themelight1"><span class="head"></span><span class="cont"></span></a>' +
  227. '<a href="#" data-toggle="tooltip" title="Dark Navbar" class="navbar-theme waves-effect waves-light" navbar-theme="theme1"><span class="head"></span><span class="cont"></span></a>' +
  228. '<a href="#" data-toggle="tooltip" title="Navbar with image" class="Layout-type waves-effect waves-light" layout-type="img"><span class="head"></span><span class="cont"></span></a>' +
  229. '<a href="#" data-toggle="tooltip" title="light Layout" class="Layout-type waves-effect waves-light" layout-type="light"><span class="head"></span><span class="cont"></span></a>' +
  230. '<a href="#" data-toggle="tooltip" title="Dark Layout" class="Layout-type waves-effect waves-light" layout-type="dark"><span class="head"></span><span class="cont"></span></a>' +
  231. '<a href="#" data-toggle="tooltip" title="Reset Default" class="Layout-type waves-effect waves-light" layout-type="reset"><i class="fa fa-power-off"></i></a>' +
  232. '</div>' +
  233. '</li>' +
  234. '</ul>' +
  235. '<div class="style-cont m-t-10">' +
  236. '<ul class="nav nav-tabs tabs" role="tablist">' +
  237. '<li class="nav-item waves-effect waves-light"><a class="nav-link active" data-toggle="tab" href="#sel-layout" role="tab">Layouts</a></li>' +
  238. '<li class="nav-item waves-effect waves-light"><a class="nav-link" data-toggle="tab" href="#sel-sidebar-setting" role="tab">Sidebar Settings</a></li>' +
  239. '</ul>' +
  240. '<div class="tab-content tabs">' +
  241. '<div class="tab-pane active" id="sel-layout" role="tabpanel">' +
  242. '<ul>' +
  243. '<li class="theme-option">' +
  244. '<div class="checkbox-fade fade-in-primary">' +
  245. '<label>' +
  246. '<input type="checkbox" value="false" id="theme-layout" name="vertical-item-border">' +
  247. '<span class="cr"><i class="cr-icon fa fa-check txt-success"></i></span>' +
  248. '<span>Box Layout - with background color</span>' +
  249. '</label>' +
  250. '</div>' +
  251. '</li>' +
  252. '<li class="theme-option d-none" id="bg-pattern-visiblity">' +
  253. '<div class="theme-color">' +
  254. '<a href="#" class="themebg-pattern small waves-effect waves-light" themebg-pattern="theme1">&nbsp;</a>' +
  255. '<a href="#" class="themebg-pattern small waves-effect waves-light" themebg-pattern="theme2">&nbsp;</a>' +
  256. '<a href="#" class="themebg-pattern small waves-effect waves-light" themebg-pattern="theme3">&nbsp;</a>' +
  257. '<a href="#" class="themebg-pattern small waves-effect waves-light" themebg-pattern="theme4">&nbsp;</a>' +
  258. '<a href="#" class="themebg-pattern small waves-effect waves-light" themebg-pattern="theme5">&nbsp;</a>' +
  259. '<a href="#" class="themebg-pattern small waves-effect waves-light" themebg-pattern="theme6">&nbsp;</a>' +
  260. '</div>' +
  261. '</li>' +
  262. '<li class="theme-option">' +
  263. '<div class="checkbox-fade fade-in-primary">' +
  264. '<label>' +
  265. '<input type="checkbox" value="false" id="sidebar-position" name="sidebar-position" checked>' +
  266. '<span class="cr"><i class="cr-icon fa fa-check txt-success"></i></span>' +
  267. '<span>Fixed Sidebar Position</span>' +
  268. '</label>' +
  269. '</div>' +
  270. '</li>' +
  271. '<li class="theme-option">' +
  272. '<div class="checkbox-fade fade-in-primary">' +
  273. '<label>' +
  274. '<input type="checkbox" value="false" id="header-position" name="header-position" checked>' +
  275. '<span class="cr"><i class="cr-icon fa fa-check txt-success"></i></span>' +
  276. '<span>Fixed Header Position</span>' +
  277. '</label>' +
  278. '</div>' +
  279. '</li>' +
  280. '</ul>' +
  281. '</div>' +
  282. '<div class="tab-pane" id="sel-sidebar-setting" role="tabpanel">' +
  283. '<ul>' +
  284. '<li class="theme-option">' +
  285. '<p class="sub-title drp-title">Menu Type</p>' +
  286. '<div class="form-radio" id="menu-effect">'+
  287. '<div class="radio radiofill radio-primary radio-inline" data-toggle="tooltip" title="Color icon">'+
  288. '<label>'+
  289. '<input type="radio" name="radio" value="st1" onclick="handlemenutype(this.value)">'+
  290. '<i class="helper"></i><span class="micon st1"><i class="ti-home"></i></span>'+
  291. '</label>'+
  292. '</div>'+
  293. '<div class="radio radiofill radio-success radio-inline" data-toggle="tooltip" title="simple icon">'+
  294. '<label>'+
  295. '<input type="radio" name="radio" value="st2" onclick="handlemenutype(this.value)" checked="true">'+
  296. '<i class="helper"></i><span class="micon st2"><i class="ti-home"></i></span>'+
  297. '</label>'+
  298. '</div>'+
  299. '</div>'+
  300. '</li>' +
  301. '<li class="theme-option">' +
  302. '<p class="sub-title drp-title">SideBar Effect</p>' +
  303. '<select id="vertical-menu-effect" class="form-control minimal">' +
  304. '<option name="vertical-menu-effect" value="shrink">shrink</option>' +
  305. '<option name="vertical-menu-effect" value="overlay">overlay</option>' +
  306. '<option name="vertical-menu-effect" value="push">Push</option>' +
  307. '</select>' +
  308. '</li>' +
  309. '<li class="theme-option">' +
  310. '<p class="sub-title drp-title">Hide/Show Border</p>' +
  311. '<select id="vertical-border-style" class="form-control minimal">' +
  312. '<option name="vertical-border-style" value="solid">Style 1</option>' +
  313. '<option name="vertical-border-style" value="dotted">Style 2</option>' +
  314. '<option name="vertical-border-style" value="dashed">Style 3</option>' +
  315. '<option name="vertical-border-style" value="none">No Border</option>' +
  316. '</select>' +
  317. '</li>' +
  318. '<li class="theme-option">' +
  319. '<p class="sub-title drp-title">Drop-Down Icon</p>' +
  320. '<select id="vertical-dropdown-icon" class="form-control minimal">' +
  321. '<option name="vertical-dropdown-icon" value="style1">Style 1</option>' +
  322. '<option name="vertical-dropdown-icon" value="style2">style 2</option>' +
  323. '<option name="vertical-dropdown-icon" value="style3">style 3</option>' +
  324. '</select>' +
  325. '</li>' +
  326. '<li class="theme-option">' +
  327. '<p class="sub-title drp-title">Sub Menu Drop-down Icon</p>' +
  328. '<select id="vertical-subitem-icon" class="form-control minimal">' +
  329. '<option name="vertical-subitem-icon" value="style1">Style 1</option>' +
  330. '<option name="vertical-subitem-icon" value="style2">style 2</option>' +
  331. '<option name="vertical-subitem-icon" value="style3">style 3</option>' +
  332. '<option name="vertical-subitem-icon" value="style4">style 4</option>' +
  333. '<option name="vertical-subitem-icon" value="style5">style 5</option>' +
  334. '<option name="vertical-subitem-icon" value="style6">style 6</option>' +
  335. '<option name="vertical-subitem-icon" value="style7">style 7</option>' +
  336. '</select>' +
  337. '</li>' +
  338. '</ul>' +
  339. '</div>' +
  340. '<ul>' +
  341. '<li>' +
  342. '<p class="selector-title">Header color</p>' +
  343. '</li>' +
  344. '<li class="theme-option">' +
  345. '<div class="theme-color">' +
  346. '<a href="#" class="header-theme waves-effect waves-light" header-theme="theme1" active-item-color="theme1"><span class="head"></span><span class="cont"></span></a>' +
  347. '<a href="#" class="header-theme waves-effect waves-light" header-theme="theme2" active-item-color="theme2"><span class="head"></span><span class="cont"></span></a>' +
  348. '<a href="#" class="header-theme waves-effect waves-light" header-theme="theme3" active-item-color="theme3"><span class="head"></span><span class="cont"></span></a>' +
  349. '<a href="#" class="header-theme waves-effect waves-light" header-theme="theme4" active-item-color="theme4"><span class="head"></span><span class="cont"></span></a>' +
  350. '<a href="#" class="header-theme waves-effect waves-light" header-theme="theme5" active-item-color="theme5"><span class="head"></span><span class="cont"></span></a>' +
  351. '<a href="#" class="header-theme waves-effect waves-light" header-theme="theme6" active-item-color="theme6"><span class="head"></span><span class="cont"></span></a>' +
  352. '</div>' +
  353. '</li>' +
  354. '<li>' +
  355. '<p class="selector-title">Navbar image</p>' +
  356. '</li>' +
  357. '<li class="theme-option">' +
  358. '<div class="theme-color">' +
  359. '<a href="#" class="navbg-pattern image waves-effect waves-light" navbg-pattern="img1">&nbsp;</a>' +
  360. '<a href="#" class="navbg-pattern image waves-effect waves-light" navbg-pattern="img2">&nbsp;</a>' +
  361. '<a href="#" class="navbg-pattern image waves-effect waves-light" navbg-pattern="img3">&nbsp;</a>' +
  362. '<a href="#" class="navbg-pattern image waves-effect waves-light" navbg-pattern="img4">&nbsp;</a>' +
  363. '<a href="#" class="navbg-pattern image waves-effect waves-light" navbg-pattern="img5">&nbsp;</a>' +
  364. '<a href="#" class="navbg-pattern image waves-effect waves-light" navbg-pattern="img6">&nbsp;</a>' +
  365. '</div>' +
  366. '</li>' +
  367. '<li>' +
  368. '<p class="selector-title">Active link color</p>' +
  369. '</li>' +
  370. '<li class="theme-option">' +
  371. '<div class="theme-color">' +
  372. '<a href="#" class="active-item-theme small waves-effect waves-light" active-item-theme="theme1">&nbsp;</a>' +
  373. '<a href="#" class="active-item-theme small waves-effect waves-light" active-item-theme="theme2">&nbsp;</a>' +
  374. '<a href="#" class="active-item-theme small waves-effect waves-light" active-item-theme="theme3">&nbsp;</a>' +
  375. '<a href="#" class="active-item-theme small waves-effect waves-light" active-item-theme="theme4">&nbsp;</a>' +
  376. '<a href="#" class="active-item-theme small waves-effect waves-light" active-item-theme="theme5">&nbsp;</a>' +
  377. '<a href="#" class="active-item-theme small waves-effect waves-light" active-item-theme="theme6">&nbsp;</a>' +
  378. '<a href="#" class="active-item-theme small waves-effect waves-light" active-item-theme="theme7">&nbsp;</a>' +
  379. '<a href="#" class="active-item-theme small waves-effect waves-light" active-item-theme="theme8">&nbsp;</a>' +
  380. '<a href="#" class="active-item-theme small waves-effect waves-light" active-item-theme="theme9">&nbsp;</a>' +
  381. '<a href="#" class="active-item-theme small waves-effect waves-light" active-item-theme="theme10">&nbsp;</a>' +
  382. '<a href="#" class="active-item-theme small waves-effect waves-light" active-item-theme="theme11">&nbsp;</a>' +
  383. '<a href="#" class="active-item-theme small waves-effect waves-light" active-item-theme="theme12">&nbsp;</a>' +
  384. '</div>' +
  385. '</li>' +
  386. '<li>' +
  387. '<p class="selector-title">Menu Caption Color</p>' +
  388. '</li>' +
  389. '<li class="theme-option">' +
  390. '<div class="theme-color">' +
  391. '<a href="#" class="leftheader-theme small waves-effect waves-light" lheader-theme="theme1">&nbsp;</a>' +
  392. '<a href="#" class="leftheader-theme small waves-effect waves-light" lheader-theme="theme2">&nbsp;</a>' +
  393. '<a href="#" class="leftheader-theme small waves-effect waves-light" lheader-theme="theme3">&nbsp;</a>' +
  394. '<a href="#" class="leftheader-theme small waves-effect waves-light" lheader-theme="theme4">&nbsp;</a>' +
  395. '<a href="#" class="leftheader-theme small waves-effect waves-light" lheader-theme="theme5">&nbsp;</a>' +
  396. '<a href="#" class="leftheader-theme small waves-effect waves-light" lheader-theme="theme6">&nbsp;</a>' +
  397. '<a href="#" class="leftheader-theme small waves-effect waves-light" lheader-theme="theme7">&nbsp;</a>' +
  398. '<a href="#" class="leftheader-theme small waves-effect waves-light" lheader-theme="theme8">&nbsp;</a>' +
  399. '<a href="#" class="leftheader-theme small waves-effect waves-light" lheader-theme="theme9">&nbsp;</a>' +
  400. '</div>' +
  401. '</li>' +
  402. '</ul>' +
  403. '</div>' +
  404. '</div>' +
  405. '<ul>'+
  406. '<li>' +
  407. '<a href="#" class="btn btn-success btn-block m-r-15 m-t-10 m-b-10 waves-effect waves-light">Profile</a>' +
  408. '<a href="http://html.phoenixcoded.net/mega-able/doc" target="_blank" class="btn btn-primary btn-block m-r-15 m-t-5 m-b-10 waves-effect waves-light">Online Documentation</a>' +
  409. '</li>' +
  410. '<li class="text-center">' +
  411. '<span class="text-center f-18 m-t-15 m-b-15 d-block">Thank you for sharing !</span>' +
  412. '<a href="https://www.facebook.com/phoenixcoded" target="_blank" class="btn btn-facebook soc-icon m-b-20 waves-effect waves-light"><i class="fa fa-facebook"></i></a>' +
  413. '<a href="https://twitter.com/phoenixcoded" target="_blank" class="btn btn-twitter soc-icon m-l-20 m-b-20 waves-effect waves-light"><i class="fa fa-twitter"></i></a>' +
  414. '</li>' +
  415. '</ul>'+
  416. '');