Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.73 KB | None | 0 0
  1. $(document).ready(function() {
  2. $("body").on("click", "[data-ma-action]", function(e) {
  3. function launchIntoFullscreen(element) {
  4. element.requestFullscreen ? element.requestFullscreen() : element.mozRequestFullScreen ? element.mozRequestFullScreen() : element.webkitRequestFullscreen ? element.webkitRequestFullscreen() : element.msRequestFullscreen && element.msRequestFullscreen()
  5. }
  6. e.preventDefault();
  7. var $this = $(this),
  8. action = $(this).data("ma-action");
  9. switch (action) {
  10. case "sidebar-open":
  11. var target = $this.data("ma-target"),
  12. backdrop = '<div data-ma-action="sidebar-close" class="ma-backdrop" />';
  13. $("body").addClass("sidebar-toggled"), $("#header, #header-alt, #main").append(backdrop), $this.addClass("toggled"), $(target).addClass("toggled");
  14. break;
  15. case "sidebar-close":
  16. $("body").removeClass("sidebar-toggled"), $(".ma-backdrop").remove(), $(".sidebar, .ma-trigger").removeClass("toggled");
  17. break;
  18. case "submenu-toggle":
  19. $this.next().slideToggle(200), $this.parent().toggleClass("toggled");
  20. break;
  21. case "search-open":
  22. $("#header").addClass("search-toggled"), $("#top-search-wrap input").focus();
  23. break;
  24. case "search-close":
  25. $("#header").removeClass("search-toggled");
  26. break;
  27. case "clear-notification":
  28. var x = $this.closest(".list-group"),
  29. y = x.find(".list-group-item"),
  30. z = y.size();
  31. $this.parent().fadeOut(), x.find(".list-group").prepend('<i class="grid-loading hide-it"></i>'), x.find(".grid-loading").fadeIn(1500);
  32. var w = 0;
  33. y.each(function() {
  34. var z = $(this);
  35. setTimeout(function() {
  36. z.addClass("animated fadeOutRightBig").delay(1e3).queue(function() {
  37. z.remove()
  38. })
  39. }, w += 150)
  40. }), setTimeout(function() {
  41. $("#notifications").addClass("empty")
  42. }, 150 * z + 200);
  43. break;
  44. case "fullscreen":
  45. launchIntoFullscreen(document.documentElement);
  46. break;
  47. case "clear-localstorage":
  48. swal({
  49. title: "Are you sure?",
  50. text: "All your saved localStorage values will be removed",
  51. type: "warning",
  52. showCancelButton: !0,
  53. confirmButtonText: "Yes, delete it!",
  54. closeOnConfirm: !1
  55. }, function() {
  56. localStorage.clear(), swal("Done!", "localStorage is cleared", "success")
  57. });
  58. break;
  59. case "print":
  60. window.print();
  61. break;
  62. case "login-switch":
  63. var loginblock = $this.data("ma-block"),
  64. loginParent = $this.closest(".lc-block");
  65. loginParent.removeClass("toggled"), setTimeout(function() {
  66. $(loginblock).addClass("toggled")
  67. });
  68. break;
  69. case "profile-edit":
  70. $this.closest(".pmb-block").toggleClass("toggled");
  71. break;
  72. case "profile-edit-cancel":
  73. $(this).closest(".pmb-block").removeClass("toggled");
  74. break;
  75. case "action-header-open":
  76. ahParent = $this.closest(".action-header").find(".ah-search"), ahParent.fadeIn(300), ahParent.find(".ahs-input").focus();
  77. break;
  78. case "action-header-close":
  79. ahParent.fadeOut(300), setTimeout(function() {
  80. ahParent.find(".ahs-input").val("")
  81. }, 350);
  82. break;
  83. case "wall-comment-open":
  84. $this.closest(".wic-form").hasClass("toggled") || $this.closest(".wic-form").addClass("toggled");
  85. break;
  86. case "wall-comment-close":
  87. $this.closest(".wic-form").find("textarea").val(""), $this.closest(".wic-form").removeClass("toggled");
  88. break;
  89. case "todo-form-open":
  90. $this.closest(".t-add").addClass("toggled");
  91. break;
  92. case "todo-form-close":
  93. $this.closest(".t-add").removeClass("toggled"), $this.closest(".t-add").find("textarea").val("")
  94. }
  95. })
  96. }), $(document).ready(function() {
  97. function sparklineBar(id, values, height, barWidth, barColor, barSpacing) {
  98. $("." + id).sparkline(values, {
  99. type: "bar",
  100. height: height,
  101. barWidth: barWidth,
  102. barColor: barColor,
  103. barSpacing: barSpacing
  104. })
  105. }
  106.  
  107. function sparklineLine(id, values, width, height, lineColor, fillColor, lineWidth, maxSpotColor, minSpotColor, spotColor, spotRadius, hSpotColor, hLineColor) {
  108. $("." + id).sparkline(values, {
  109. type: "line",
  110. width: width,
  111. height: height,
  112. lineColor: lineColor,
  113. fillColor: fillColor,
  114. lineWidth: lineWidth,
  115. maxSpotColor: maxSpotColor,
  116. minSpotColor: minSpotColor,
  117. spotColor: spotColor,
  118. spotRadius: spotRadius,
  119. highlightSpotColor: hSpotColor,
  120. highlightLineColor: hLineColor
  121. })
  122. }
  123.  
  124. function sparklinePie(id, values, width, height, sliceColors) {
  125. $("." + id).sparkline(values, {
  126. type: "pie",
  127. width: width,
  128. height: height,
  129. sliceColors: sliceColors,
  130. offset: 0,
  131. borderWidth: 0
  132. })
  133. }
  134.  
  135. function easyPieChart(id, trackColor, scaleColor, barColor, lineWidth, lineCap, size) {
  136. $("." + id).easyPieChart({
  137. trackColor: trackColor,
  138. scaleColor: scaleColor,
  139. barColor: barColor,
  140. lineWidth: lineWidth,
  141. lineCap: lineCap,
  142. size: size
  143. })
  144. }
  145. $(".stats-bar")[0] && sparklineBar("stats-bar", [6, 4, 8, 6, 5, 6, 7, 8, 3, 5, 9, 5, 8, 4], "35px", 3, "#d6d8d9", 2), $(".stats-bar-2")[0] && sparklineBar("stats-bar-2", [4, 7, 6, 2, 5, 3, 8, 6, 6, 4, 8, 6, 5, 8], "35px", 3, "#d6d8d9", 2), $(".stats-line")[0] && sparklineLine("stats-line", [9, 4, 6, 5, 6, 4, 5, 7, 9, 3, 6, 5], 68, 35, "#fff", "rgba(0,0,0,0)", 1.25, "#d6d8d9", "#d6d8d9", "#d6d8d9", 3, "#fff", "#d6d8d9"), $(".stats-line-2")[0] && sparklineLine("stats-line-2", [5, 6, 3, 9, 7, 5, 4, 6, 5, 6, 4, 9], 68, 35, "#fff", "rgba(0,0,0,0)", 1.25, "#d6d8d9", "#d6d8d9", "#d6d8d9", 3, "#fff", "#d6d8d9"), $(".stats-pie")[0] && sparklinePie("stats-pie", [20, 35, 30, 5], 45, 45, ["#fff", "rgba(255,255,255,0.7)", "rgba(255,255,255,0.4)", "rgba(255,255,255,0.2)"]), $(".dash-widget-visits")[0] && sparklineLine("dash-widget-visits", [9, 4, 6, 5, 6, 4, 5, 7, 9, 3, 6, 5], "100%", "70px", "rgba(255,255,255,0.7)", "rgba(0,0,0,0)", 1, "rgba(255,255,255,0.4)", "rgba(255,255,255,0.4)", "rgba(255,255,255,0.4)", 5, "rgba(255,255,255,0.4)", "#fff"), $(".main-pie")[0] && easyPieChart("main-pie", "rgba(0,0,0,0.2)", "rgba(255,255,255,0)", "rgba(255,255,255,0.7)", 2, "butt", 148), $(".sub-pie-1")[0] && easyPieChart("sub-pie-1", "rgba(0,0,0,0.2)", "rgba(255,255,255,0)", "rgba(255,255,255,0.7)", 2, "butt", 95), $(".sub-pie-2")[0] && easyPieChart("sub-pie-2", "rgba(0,0,0,0.2)", "rgba(255,255,255,0)", "rgba(255,255,255,0.7)", 2, "butt", 95)
  146. }), $(window).load(function() {
  147. function notify(message, type) {
  148. $.growl({
  149. message: message
  150. }, {
  151. type: type,
  152. allow_dismiss: !1,
  153. label: "Cancel",
  154. className: "btn-xs btn-inverse",
  155. placement: {
  156. from: "bottom",
  157. align: "left"
  158. },
  159. delay: 2500,
  160. animate: {
  161. enter: "animated fadeInUp",
  162. exit: "animated fadeOutDown"
  163. },
  164. offset: {
  165. x: 30,
  166. y: 30
  167. }
  168. })
  169. }
  170. setTimeout(function() {
  171. $(".login-content")[0] || notify("Welcome back Mallinda Hollaway", "default")
  172. }, 1e3)
  173. }), $(document).ready(function() {
  174. var data1 = [
  175. [1, 60],
  176. [2, 30],
  177. [3, 50],
  178. [4, 100],
  179. [5, 10],
  180. [6, 90],
  181. [7, 85]
  182. ],
  183. data2 = [
  184. [1, 20],
  185. [2, 90],
  186. [3, 60],
  187. [4, 40],
  188. [5, 100],
  189. [6, 25],
  190. [7, 65]
  191. ],
  192. data3 = [
  193. [1, 100],
  194. [2, 20],
  195. [3, 60],
  196. [4, 90],
  197. [5, 80],
  198. [6, 10],
  199. [7, 5]
  200. ],
  201. barData = [{
  202. label: "Tokyo",
  203. data: data1,
  204. color: "#dbdddd"
  205. }, {
  206. label: "Seoul",
  207. data: data2,
  208. color: "#636c72"
  209. }, {
  210. label: "Beijing",
  211. data: data3,
  212. color: "#3e4a51"
  213. }];
  214. $("#bar-chart")[0] && $.plot($("#bar-chart"), barData, {
  215. series: {
  216. bars: {
  217. show: !0,
  218. barWidth: .05,
  219. order: 1,
  220. fill: 1
  221. }
  222. },
  223. grid: {
  224. borderWidth: 1,
  225. borderColor: "#333c42",
  226. show: !0,
  227. hoverable: !0,
  228. clickable: !0
  229. },
  230. yaxis: {
  231. tickColor: "#333c42",
  232. tickDecimals: 0,
  233. font: {
  234. lineHeight: 13,
  235. style: "normal",
  236. color: "#9f9f9f"
  237. },
  238. shadowSize: 0
  239. },
  240. xaxis: {
  241. tickColor: "#333c42",
  242. tickDecimals: 0,
  243. font: {
  244. lineHeight: 13,
  245. style: "normal",
  246. color: "#9f9f9f"
  247. },
  248. shadowSize: 0
  249. },
  250. legend: {
  251. container: ".flc-bar",
  252. backgroundOpacity: .5,
  253. noColumns: 0,
  254. backgroundColor: "white",
  255. lineWidth: 0
  256. }
  257. }), $(".flot-chart")[0] && ($(".flot-chart").bind("plothover", function(event, pos, item) {
  258. if (item) {
  259. var x = item.datapoint[0].toFixed(2),
  260. y = item.datapoint[1].toFixed(2);
  261. $(".flot-tooltip").html(item.series.label + " of " + x + " = " + y).css({
  262. top: item.pageY + 5,
  263. left: item.pageX + 5
  264. }).show()
  265. } else $(".flot-tooltip").hide()
  266. }), $("<div class='flot-tooltip' class='chart-tooltip'></div>").appendTo("body"))
  267. }), $(document).ready(function() {
  268. for (var d1 = [], i = 0; 10 >= i; i += 1) d1.push([i, parseInt(30 * Math.random())]);
  269. for (var d2 = [], i = 0; 20 >= i; i += 1) d2.push([i, parseInt(30 * Math.random())]);
  270. for (var d3 = [], i = 0; 10 >= i; i += 1) d3.push([i, parseInt(30 * Math.random())]);
  271. var options = {
  272. series: {
  273. shadowSize: 0,
  274. curvedLines: {
  275. apply: !0,
  276. active: !0,
  277. monotonicFit: !0
  278. },
  279. lines: {
  280. show: !1,
  281. lineWidth: 0
  282. }
  283. },
  284. grid: {
  285. borderWidth: 0,
  286. labelMargin: 10,
  287. hoverable: !0,
  288. clickable: !0,
  289. mouseActiveRadius: 6
  290. },
  291. xaxis: {
  292. tickDecimals: 0,
  293. ticks: !1
  294. },
  295. yaxis: {
  296. tickDecimals: 0,
  297. ticks: !1
  298. },
  299. legend: {
  300. show: !1
  301. }
  302. };
  303. $("#curved-line-chart")[0] && $.plot($("#curved-line-chart"), [{
  304. data: d1,
  305. lines: {
  306. show: !0,
  307. fill: .98
  308. },
  309. label: "Product 1",
  310. stack: !0,
  311. color: "#1f292f"
  312. }, {
  313. data: d3,
  314. lines: {
  315. show: !0,
  316. fill: .98
  317. },
  318. label: "Product 2",
  319. stack: !0,
  320. color: "#dbdddd"
  321. }], options), $(".flot-chart")[0] && ($(".flot-chart").bind("plothover", function(event, pos, item) {
  322. if (item) {
  323. var x = item.datapoint[0].toFixed(2),
  324. y = item.datapoint[1].toFixed(2);
  325. $(".flot-tooltip").html(item.series.label + " of " + x + " = " + y).css({
  326. top: item.pageY + 5,
  327. left: item.pageX + 5
  328. }).show()
  329. } else $(".flot-tooltip").hide()
  330. }), $("<div class='flot-tooltip' class='chart-tooltip'></div>").appendTo("body"))
  331. }), $(document).ready(function() {
  332. function getRandomData() {
  333. for (data.length > 0 && (data = data.slice(1)); data.length < totalPoints;) {
  334. var prev = data.length > 0 ? data[data.length - 1] : 50,
  335. y = prev + 10 * Math.random() - 5;
  336. 0 > y ? y = 0 : y > 90 && (y = 90), data.push(y)
  337. }
  338. for (var res = [], i = 0; i < data.length; ++i) res.push([i, data[i]]);
  339. return res
  340. }
  341.  
  342. function update() {
  343. plot.setData([getRandomData()]), plot.draw(), setTimeout(update, updateInterval)
  344. }
  345. var data = [],
  346. totalPoints = 300,
  347. updateInterval = 30;
  348. if ($("#dynamic-chart")[0]) {
  349. var plot = $.plot("#dynamic-chart", [getRandomData()], {
  350. series: {
  351. label: "Server Process Data",
  352. lines: {
  353. show: !0,
  354. lineWidth: .2,
  355. fill: .6
  356. },
  357. color: "#fff",
  358. shadowSize: 0
  359. },
  360. yaxis: {
  361. min: 0,
  362. max: 100,
  363. tickColor: "#333c42",
  364. font: {
  365. lineHeight: 13,
  366. style: "normal",
  367. color: "#9f9f9f"
  368. },
  369. shadowSize: 0
  370. },
  371. xaxis: {
  372. tickColor: "#333c42",
  373. show: !0,
  374. font: {
  375. lineHeight: 13,
  376. style: "normal",
  377. color: "#9f9f9f"
  378. },
  379. shadowSize: 0,
  380. min: 0,
  381. max: 250
  382. },
  383. grid: {
  384. borderWidth: 1,
  385. borderColor: "#333c42",
  386. labelMargin: 10,
  387. hoverable: !0,
  388. clickable: !0,
  389. mouseActiveRadius: 6
  390. },
  391. legend: {
  392. container: ".flc-dynamic",
  393. backgroundOpacity: .5,
  394. noColumns: 0,
  395. backgroundColor: "white",
  396. lineWidth: 0
  397. }
  398. });
  399. update()
  400. }
  401. }), $(document).ready(function() {
  402. function getRandomData() {
  403. for (data.length > 0 && (data = data.slice(1)); data.length < totalPoints;) {
  404. var prev = data.length > 0 ? data[data.length - 1] : 50,
  405. y = prev + 10 * Math.random() - 5;
  406. 0 > y ? y = 0 : y > 90 && (y = 90), data.push(y)
  407. }
  408. for (var res = [], i = 0; i < data.length; ++i) res.push([i, data[i]]);
  409. return res
  410. }
  411. for (var data = [], totalPoints = 100, d1 = [], i = 0; 10 >= i; i += 1) d1.push([i, parseInt(30 * Math.random())]);
  412. for (var d2 = [], i = 0; 20 >= i; i += 1) d2.push([i, parseInt(30 * Math.random())]);
  413. for (var d3 = [], i = 0; 10 >= i; i += 1) d3.push([i, parseInt(30 * Math.random())]);
  414. var options = {
  415. series: {
  416. shadowSize: 0,
  417. lines: {
  418. show: !1,
  419. lineWidth: 0
  420. }
  421. },
  422. grid: {
  423. borderWidth: 0,
  424. labelMargin: 10,
  425. hoverable: !0,
  426. clickable: !0,
  427. mouseActiveRadius: 6
  428. },
  429. xaxis: {
  430. tickDecimals: 0,
  431. ticks: !1
  432. },
  433. yaxis: {
  434. tickDecimals: 0,
  435. ticks: !1
  436. },
  437. legend: {
  438. show: !1
  439. }
  440. };
  441. $("#line-chart")[0] && $.plot($("#line-chart"), [{
  442. data: d1,
  443. lines: {
  444. show: !0,
  445. fill: .98
  446. },
  447. label: "Product 1",
  448. stack: !0,
  449. color: "#1f292f"
  450. }, {
  451. data: d3,
  452. lines: {
  453. show: !0,
  454. fill: .98
  455. },
  456. label: "Product 2",
  457. stack: !0,
  458. color: "#dbdddd"
  459. }], options), $("#recent-items-chart")[0] && $.plot($("#recent-items-chart"), [{
  460. data: getRandomData(),
  461. lines: {
  462. show: !0,
  463. fill: .1
  464. },
  465. label: "Items",
  466. stack: !0,
  467. color: "#dbdddd"
  468. }], options), $(".flot-chart")[0] && ($(".flot-chart").bind("plothover", function(event, pos, item) {
  469. if (item) {
  470. var x = item.datapoint[0].toFixed(2),
  471. y = item.datapoint[1].toFixed(2);
  472. $(".flot-tooltip").html(item.series.label + " of " + x + " = " + y).css({
  473. top: item.pageY + 5,
  474. left: item.pageX + 5
  475. }).show()
  476. } else $(".flot-tooltip").hide()
  477. }), $("<div class='flot-tooltip' class='chart-tooltip'></div>").appendTo("body"))
  478. }), $(document).ready(function() {
  479. var pieData = [{
  480. data: 1,
  481. color: "#dbdddd",
  482. label: "Toyota"
  483. }, {
  484. data: 2,
  485. color: "#636c72",
  486. label: "Nissan"
  487. }, {
  488. data: 3,
  489. color: "#3e4a51",
  490. label: "Hyundai"
  491. }, {
  492. data: 4,
  493. color: "#1f292f",
  494. label: "Scion"
  495. }, {
  496. data: 4,
  497. color: "#ffffff",
  498. label: "Daihatsu"
  499. }];
  500. $("#pie-chart")[0] && $.plot("#pie-chart", pieData, {
  501. series: {
  502. pie: {
  503. show: !0,
  504. stroke: {
  505. width: 0
  506. }
  507. }
  508. },
  509. legend: {
  510. container: ".flc-pie",
  511. backgroundOpacity: .5,
  512. noColumns: 0,
  513. backgroundColor: "white",
  514. lineWidth: 0
  515. },
  516. grid: {
  517. hoverable: !0,
  518. clickable: !0
  519. },
  520. tooltip: !0,
  521. tooltipOpts: {
  522. content: "%p.0%, %s",
  523. shifts: {
  524. x: 20,
  525. y: 0
  526. },
  527. defaultTheme: !1,
  528. cssClass: "flot-tooltip"
  529. }
  530. }), $("#donut-chart")[0] && $.plot("#donut-chart", pieData, {
  531. series: {
  532. pie: {
  533. innerRadius: .5,
  534. show: !0,
  535. stroke: {
  536. width: 0,
  537. color: "#2b343a"
  538. }
  539. }
  540. },
  541. legend: {
  542. container: ".flc-donut",
  543. backgroundOpacity: .5,
  544. noColumns: 0,
  545. backgroundColor: "white",
  546. lineWidth: 0
  547. },
  548. grid: {
  549. hoverable: !0,
  550. clickable: !0
  551. },
  552. tooltip: !0,
  553. tooltipOpts: {
  554. content: "%p.0%, %s",
  555. shifts: {
  556. x: 20,
  557. y: 0
  558. },
  559. defaultTheme: !1,
  560. cssClass: "flot-tooltip"
  561. }
  562. })
  563. }), /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && $("html").addClass("ismobile"), $(window).load(function() {
  564. $(".page-loader")[0] && setTimeout(function() {
  565. $(".page-loader").fadeOut()
  566. }, 500)
  567. }), $(document).ready(function() {
  568. function scrollBar(selector, theme, mousewheelaxis) {
  569. $(selector).mCustomScrollbar({
  570. theme: theme,
  571. scrollInertia: 100,
  572. axis: "mousewheelaxis",
  573. mouseWheel: {
  574. enable: !0,
  575. axis: mousewheelaxis,
  576. preventDefault: !0
  577. }
  578. })
  579. }
  580. if ($("html").hasClass("ismobile") || $(".c-overflow")[0] && scrollBar(".c-overflow", "minimal-dark", "y"), $(".dropdown")[0] && ($("body").on("click", ".dropdown.open .dropdown-menu", function(e) {
  581. e.stopPropagation()
  582. }), $(".dropdown").on("shown.bs.dropdown", function(e) {
  583. $(this).attr("data-animation") && ($animArray = [], $animation = $(this).data("animation"), $animArray = $animation.split(","), $animationIn = "animated " + $animArray[0], $animationOut = "animated " + $animArray[1], $animationDuration = "", $animArray[2] ? $animationDuration = $animArray[2] : $animationDuration = 500, $(this).find(".dropdown-menu").removeClass($animationOut), $(this).find(".dropdown-menu").addClass($animationIn))
  584. }), $(".dropdown").on("hide.bs.dropdown", function(e) {
  585. $(this).attr("data-animation") && (e.preventDefault(), $this = $(this), $dropdownMenu = $this.find(".dropdown-menu"), $dropdownMenu.addClass($animationOut), setTimeout(function() {
  586. $this.removeClass("open")
  587. }, $animationDuration))
  588. })), $("#calendar-widget")[0] && ! function() {
  589. $("#calendar-widget #cw-body").fullCalendar({
  590. contentHeight: "auto",
  591. theme: !0,
  592. header: {
  593. right: "",
  594. center: "prev, title, next",
  595. left: ""
  596. },
  597. defaultDate: "2014-06-12",
  598. editable: !0,
  599. events: [{
  600. title: "All Day",
  601. start: "2014-06-01"
  602. }, {
  603. title: "Long Event",
  604. start: "2014-06-07",
  605. end: "2014-06-10"
  606. }, {
  607. id: 999,
  608. title: "Repeat",
  609. start: "2014-06-09"
  610. }, {
  611. id: 999,
  612. title: "Repeat",
  613. start: "2014-06-16"
  614. }, {
  615. title: "Meet",
  616. start: "2014-06-12",
  617. end: "2014-06-12"
  618. }, {
  619. title: "Lunch",
  620. start: "2014-06-12"
  621. }, {
  622. title: "Birthday",
  623. start: "2014-06-13"
  624. }, {
  625. title: "Google",
  626. url: "http://google.com/",
  627. start: "2014-06-28"
  628. }]
  629. });
  630. var mYear = moment().format("YYYY"),
  631. mDay = moment().format("dddd, MMM D");
  632. $("#calendar-widget .cwh-year").html(mYear), $("#calendar-widget .cwh-day").html(mDay)
  633. }(), $("#weather-widget")[0] && $.simpleWeather({
  634. location: "Austin, TX",
  635. woeid: "",
  636. unit: "f",
  637. success: function(weather) {
  638. html = '<div class="weather-status">' + weather.temp + "&deg;" + weather.units.temp + "</div>", html += '<ul class="weather-info"><li>' + weather.city + ", " + weather.region + "</li>", html += '<li class="currently">' + weather.currently + "</li></ul>", html += '<div class="weather-icon wi-' + weather.code + '"></div>', html += '<div class="dw-footer"><div class="weather-list tomorrow">', html += '<span class="weather-list-icon wi-' + weather.forecast[2].code + '"></span><span>' + weather.forecast[1].high + "/" + weather.forecast[1].low + "</span><span>" + weather.forecast[1].text + "</span>", html += "</div>", html += '<div class="weather-list after-tomorrow">', html += '<span class="weather-list-icon wi-' + weather.forecast[2].code + '"></span><span>' + weather.forecast[2].high + "/" + weather.forecast[2].low + "</span><span>" + weather.forecast[2].text + "</span>", html += "</div></div>", $("#weather-widget").html(html)
  639. },
  640. error: function(error) {
  641. $("#weather-widget").html("<p>" + error + "</p>")
  642. }
  643. }), $(".auto-size")[0] && autosize($(".auto-size")), $(".fg-line")[0] && ($("body").on("focus", ".fg-line .form-control", function() {
  644. $(this).closest(".fg-line").addClass("fg-toggled")
  645. }), $("body").on("blur", ".form-control", function() {
  646. var p = $(this).closest(".form-group, .input-group"),
  647. i = p.find(".form-control").val();
  648. p.hasClass("fg-float") ? 0 == i.length && $(this).closest(".fg-line").removeClass("fg-toggled") : $(this).closest(".fg-line").removeClass("fg-toggled")
  649. })), $(".fg-float")[0] && $(".fg-float .form-control").each(function() {
  650. var i = $(this).val();
  651. 0 == !i.length && $(this).closest(".fg-line").addClass("fg-toggled")
  652. }), $("audio, video")[0] && $("video,audio").mediaelementplayer(), $(".chosen")[0] && $(".chosen").chosen({
  653. width: "100%",
  654. allow_single_deselect: !0
  655. }), $("#input-slider")[0]) {
  656. var slider = document.getElementById("input-slider");
  657. noUiSlider.create(slider, {
  658. start: [20],
  659. connect: "lower",
  660. range: {
  661. min: 0,
  662. max: 100
  663. }
  664. })
  665. }
  666. if ($("#input-slider-range")[0]) {
  667. var sliderRange = document.getElementById("input-slider-range");
  668. noUiSlider.create(sliderRange, {
  669. start: [40, 70],
  670. connect: !0,
  671. range: {
  672. min: 0,
  673. max: 100
  674. }
  675. })
  676. }
  677. if ($("#input-slider-value")[0]) {
  678. var sliderRangeValue = document.getElementById("input-slider-value");
  679. noUiSlider.create(sliderRangeValue, {
  680. start: [10, 50],
  681. connect: !0,
  682. range: {
  683. min: 0,
  684. max: 100
  685. }
  686. }), sliderRangeValue.noUiSlider.on("update", function(values, handle) {
  687. document.getElementById("input-slider-value-output").innerHTML = values[handle]
  688. })
  689. }
  690. if ($("input-mask")[0] && $(".input-mask").mask(), $(".color-picker")[0] && $(".color-picker").each(function() {
  691. var colorOutput = $(this).closest(".cp-container").find(".cp-value");
  692. $(this).farbtastic(colorOutput)
  693. }), $(".html-editor")[0] && $(".html-editor").summernote({
  694. height: 150
  695. }), $(".html-editor-click")[0] && ($("body").on("click", ".hec-button", function() {
  696. $(".html-editor-click").summernote({
  697. focus: !0
  698. }), $(".hec-save").show()
  699. }), $("body").on("click", ".hec-save", function() {
  700. $(".html-editor-click").code(), $(".html-editor-click").destroy(), $(".hec-save").hide()
  701. })), $(".html-editor-airmod")[0] && $(".html-editor-airmod").summernote({
  702. airMode: !0
  703. }), $(".date-time-picker")[0] && $(".date-time-picker").datetimepicker(), $(".time-picker")[0] && $(".time-picker").datetimepicker({
  704. format: "LT"
  705. }), $(".date-picker")[0] && $(".date-picker").datetimepicker({
  706. format: "DD/MM/YYYY"
  707. }), $(".date-picker").on("dp.hide", function() {
  708. $(this).closest(".dtp-container").removeClass("fg-toggled"), $(this).blur()
  709. }), $(".form-wizard-basic")[0] && $(".form-wizard-basic").bootstrapWizard({
  710. tabClass: "fw-nav",
  711. nextSelector: ".next",
  712. previousSelector: ".previous"
  713. }), function() {
  714. Waves.attach(".btn:not(.btn-icon):not(.btn-float)"), Waves.attach(".btn-icon, .btn-float", ["waves-circle", "waves-float"]), Waves.init()
  715. }(), $(".lightbox")[0] && $(".lightbox").lightGallery({
  716. enableTouch: !0
  717. }), $("body").on("click", ".a-prevent", function(e) {
  718. e.preventDefault()
  719. }), $(".collapse")[0] && ($(".collapse").on("show.bs.collapse", function(e) {
  720. $(this).closest(".panel").find(".panel-heading").addClass("active")
  721. }), $(".collapse").on("hide.bs.collapse", function(e) {
  722. $(this).closest(".panel").find(".panel-heading").removeClass("active")
  723. }), $(".collapse.in").each(function() {
  724. $(this).closest(".panel").find(".panel-heading").addClass("active")
  725. })), $('[data-toggle="tooltip"]')[0] && $('[data-toggle="tooltip"]').tooltip(), $('[data-toggle="popover"]')[0] && $('[data-toggle="popover"]').popover(), $("html").hasClass("ie9") && $("input, textarea").placeholder({
  726. customClass: "ie9-placeholder"
  727. }), $(".typeahead")[0]) {
  728. var statesArray = ["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"],
  729. states = new Bloodhound({
  730. datumTokenizer: Bloodhound.tokenizers.whitespace,
  731. queryTokenizer: Bloodhound.tokenizers.whitespace,
  732. local: statesArray
  733. });
  734. $(".typeahead").typeahead({
  735. hint: !0,
  736. highlight: !0,
  737. minLength: 1
  738. }, {
  739. name: "states",
  740. source: states
  741. })
  742. }
  743. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement