【代码优化】优化静态js、css文件的加载方式

This commit is contained in:
戒酒的李白
2024-07-03 00:46:11 +08:00
parent 7ac7495f72
commit b816f1cf3c
70 changed files with 0 additions and 23521 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-54
View File
@@ -1,54 +0,0 @@
/* latin-ext */
@font-face {
font-family: 'DM Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(../font/rP2Hp2ywxg089UriCZ2IHSeH.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'DM Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(../font/rP2Hp2ywxg089UriCZOIHQ.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
font-family: 'DM Sans';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url(../font/rP2Cp2ywxg089UriAWCrCBamC2QX.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'DM Sans';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url(../font/rP2Cp2ywxg089UriAWCrCBimCw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
font-family: 'DM Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(../font/rP2Cp2ywxg089UriASitCBamC2QX.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'DM Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(../font/rP2Cp2ywxg089UriASitCBimCw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
File diff suppressed because it is too large Load Diff
-78
View File
@@ -1,78 +0,0 @@
/* DayGridView
--------------------------------------------------------------------------------------------------*/
/* day row structure */
.fc-dayGridWeek-view .fc-content-skeleton,
.fc-dayGridDay-view .fc-content-skeleton {
/* there may be week numbers in these views, so no padding-top */
padding-bottom: 1em;
/* ensure a space at bottom of cell for user selecting/clicking */
}
.fc-dayGrid-view .fc-body .fc-row {
min-height: 4em;
/* ensure that all rows are at least this tall */
}
/* a "rigid" row will take up a constant amount of height because content-skeleton is absolute */
.fc-row.fc-rigid {
overflow: hidden;
}
.fc-row.fc-rigid .fc-content-skeleton {
position: absolute;
top: 0;
left: 0;
right: 0;
}
/* week and day number styling */
.fc-day-top.fc-other-month {
opacity: 0.3;
}
.fc-dayGrid-view .fc-week-number,
.fc-dayGrid-view .fc-day-number {
padding: 2px;
}
.fc-dayGrid-view th.fc-week-number,
.fc-dayGrid-view th.fc-day-number {
padding: 0 2px;
/* column headers can't have as much v space */
}
.fc-ltr .fc-dayGrid-view .fc-day-top .fc-day-number {
float: right;
}
.fc-rtl .fc-dayGrid-view .fc-day-top .fc-day-number {
float: left;
}
.fc-ltr .fc-dayGrid-view .fc-day-top .fc-week-number {
float: left;
border-radius: 0 0 3px 0;
}
.fc-rtl .fc-dayGrid-view .fc-day-top .fc-week-number {
float: right;
border-radius: 0 0 0 3px;
}
.fc-dayGrid-view .fc-day-top .fc-week-number {
min-width: 1.5em;
text-align: center;
background-color: #f2f2f2;
color: #808080;
}
/* when week/day number have own column */
.fc-dayGrid-view td.fc-week-number {
text-align: center;
}
.fc-dayGrid-view td.fc-week-number > * {
/* work around the way we do column resizing and ensure a minimum width */
display: inline-block;
min-width: 1.25em;
}
-309
View File
@@ -1,309 +0,0 @@
/* TimeGridView all-day area
--------------------------------------------------------------------------------------------------*/
.fc-timeGrid-view .fc-day-grid {
position: relative;
z-index: 2;
/* so the "more.." popover will be over the time grid */
}
.fc-timeGrid-view .fc-day-grid .fc-row {
min-height: 3em;
/* all-day section will never get shorter than this */
}
.fc-timeGrid-view .fc-day-grid .fc-row .fc-content-skeleton {
padding-bottom: 1em;
/* give space underneath events for clicking/selecting days */
}
/* TimeGrid axis running down the side (for both the all-day area and the slot area)
--------------------------------------------------------------------------------------------------*/
.fc .fc-axis {
/* .fc to overcome default cell styles */
vertical-align: middle;
padding: 0 4px;
white-space: nowrap;
}
.fc-ltr .fc-axis {
text-align: right;
}
.fc-rtl .fc-axis {
text-align: left;
}
/* TimeGrid Structure
--------------------------------------------------------------------------------------------------*/
.fc-time-grid-container,
.fc-time-grid {
/* so slats/bg/content/etc positions get scoped within here */
position: relative;
z-index: 1;
}
.fc-time-grid {
min-height: 100%;
/* so if height setting is 'auto', .fc-bg stretches to fill height */
}
.fc-time-grid table {
/* don't put outer borders on slats/bg/content/etc */
border: 0 hidden transparent;
}
.fc-time-grid > .fc-bg {
z-index: 1;
}
.fc-time-grid .fc-slats,
.fc-time-grid > hr {
/* the <hr> TimeGridView injects when grid is shorter than scroller */
position: relative;
z-index: 2;
}
.fc-time-grid .fc-content-col {
position: relative;
/* because now-indicator lives directly inside */
}
.fc-time-grid .fc-content-skeleton {
position: absolute;
z-index: 3;
top: 0;
left: 0;
right: 0;
}
/* divs within a cell within the fc-content-skeleton */
.fc-time-grid .fc-business-container {
position: relative;
z-index: 1;
}
.fc-time-grid .fc-bgevent-container {
position: relative;
z-index: 2;
}
.fc-time-grid .fc-highlight-container {
position: relative;
z-index: 3;
}
.fc-time-grid .fc-event-container {
position: relative;
z-index: 4;
}
.fc-time-grid .fc-now-indicator-line {
z-index: 5;
}
.fc-time-grid .fc-mirror-container {
/* also is fc-event-container */
position: relative;
z-index: 6;
}
/* TimeGrid Slats (lines that run horizontally)
--------------------------------------------------------------------------------------------------*/
.fc-time-grid .fc-slats td {
height: 1.5em;
border-bottom: 0;
/* each cell is responsible for its top border */
}
.fc-time-grid .fc-slats .fc-minor td {
border-top-style: dotted;
}
/* TimeGrid Highlighting Slots
--------------------------------------------------------------------------------------------------*/
.fc-time-grid .fc-highlight-container {
/* a div within a cell within the fc-highlight-skeleton */
position: relative;
/* scopes the left/right of the fc-highlight to be in the column */
}
.fc-time-grid .fc-highlight {
position: absolute;
left: 0;
right: 0;
/* top and bottom will be in by JS */
}
/* TimeGrid Event Containment
--------------------------------------------------------------------------------------------------*/
.fc-ltr .fc-time-grid .fc-event-container {
/* space on the sides of events for LTR (default) */
margin: 0 2.5% 0 2px;
}
.fc-rtl .fc-time-grid .fc-event-container {
/* space on the sides of events for RTL */
margin: 0 2px 0 2.5%;
}
.fc-time-grid .fc-event,
.fc-time-grid .fc-bgevent {
position: absolute;
z-index: 1;
/* scope inner z-index's */
}
.fc-time-grid .fc-bgevent {
/* background events always span full width */
left: 0;
right: 0;
}
/* TimeGrid Event Styling
----------------------------------------------------------------------------------------------------
We use the full "fc-time-grid-event" class instead of using descendants because the event won't
be a descendant of the grid when it is being dragged.
*/
.fc-time-grid-event {
margin-bottom: 1px;
}
.fc-time-grid-event-inset {
-webkit-box-shadow: 0px 0px 0px 1px #fff;
box-shadow: 0px 0px 0px 1px #fff;
}
.fc-time-grid-event.fc-not-start {
/* events that are continuing from another day */
/* replace space made by the top border with padding */
border-top-width: 0;
padding-top: 1px;
/* remove top rounded corners */
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.fc-time-grid-event.fc-not-end {
/* replace space made by the top border with padding */
border-bottom-width: 0;
padding-bottom: 1px;
/* remove bottom rounded corners */
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.fc-time-grid-event .fc-content {
overflow: hidden;
max-height: 100%;
}
.fc-time-grid-event .fc-time,
.fc-time-grid-event .fc-title {
padding: 0 1px;
}
.fc-time-grid-event .fc-time {
font-size: 0.85em;
white-space: nowrap;
}
/* short mode, where time and title are on the same line */
.fc-time-grid-event.fc-short .fc-content {
/* don't wrap to second line (now that contents will be inline) */
white-space: nowrap;
}
.fc-time-grid-event.fc-short .fc-time,
.fc-time-grid-event.fc-short .fc-title {
/* put the time and title on the same line */
display: inline-block;
vertical-align: top;
}
.fc-time-grid-event.fc-short .fc-time span {
display: none;
/* don't display the full time text... */
}
.fc-time-grid-event.fc-short .fc-time:before {
content: attr(data-start);
/* ...instead, display only the start time */
}
.fc-time-grid-event.fc-short .fc-time:after {
content: " - ";
/* seperate with a dash, wrapped in nbsp's */
}
.fc-time-grid-event.fc-short .fc-title {
font-size: 0.85em;
/* make the title text the same size as the time */
padding: 0;
/* undo padding from above */
}
/* resizer (cursor device) */
.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer {
left: 0;
right: 0;
bottom: 0;
height: 8px;
overflow: hidden;
line-height: 8px;
font-size: 11px;
font-family: monospace;
text-align: center;
cursor: s-resize;
}
.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer:after {
content: "=";
}
/* resizer (touch device) */
.fc-time-grid-event.fc-selected .fc-resizer {
/* 10x10 dot */
border-radius: 5px;
border-width: 1px;
width: 8px;
height: 8px;
border-style: solid;
border-color: inherit;
background: #fff;
/* horizontally center */
left: 50%;
margin-left: -5px;
/* center on the bottom edge */
bottom: -5px;
}
/* Now Indicator
--------------------------------------------------------------------------------------------------*/
.fc-time-grid .fc-now-indicator-line {
border-top-width: 1px;
left: 0;
right: 0;
}
/* arrow on axis */
.fc-time-grid .fc-now-indicator-arrow {
margin-top: -5px;
/* vertically center on top coordinate */
}
.fc-ltr .fc-time-grid .fc-now-indicator-arrow {
left: 0;
/* triangle pointing right... */
border-width: 5px 0 5px 6px;
border-top-color: transparent;
border-bottom-color: transparent;
}
.fc-rtl .fc-time-grid .fc-now-indicator-arrow {
right: 0;
/* triangle pointing left... */
border-width: 5px 6px 5px 0;
border-top-color: transparent;
border-bottom-color: transparent;
}
-118
View File
@@ -1,118 +0,0 @@
/* List View
--------------------------------------------------------------------------------------------------*/
/* possibly reusable */
.fc-event-dot {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 5px;
}
/* view wrapper */
.fc-rtl .fc-list-view {
direction: rtl;
/* unlike core views, leverage browser RTL */
}
.fc-list-view {
border-width: 1px;
border-style: solid;
}
/* table resets */
.fc .fc-list-table {
table-layout: auto;
/* for shrinkwrapping cell content */
}
.fc-list-table td {
border-width: 1px 0 0;
padding: 8px 14px;
}
.fc-list-table tr:first-child td {
border-top-width: 0;
}
/* day headings with the list */
.fc-list-heading {
border-bottom-width: 1px;
}
.fc-list-heading td {
font-weight: bold;
}
.fc-ltr .fc-list-heading-main {
float: left;
}
.fc-ltr .fc-list-heading-alt {
float: right;
}
.fc-rtl .fc-list-heading-main {
float: right;
}
.fc-rtl .fc-list-heading-alt {
float: left;
}
/* event list items */
.fc-list-item.fc-has-url {
cursor: pointer;
/* whole row will be clickable */
}
.fc-list-item-marker,
.fc-list-item-time {
white-space: nowrap;
width: 1px;
}
/* make the dot closer to the event title */
.fc-ltr .fc-list-item-marker {
padding-right: 0;
}
.fc-rtl .fc-list-item-marker {
padding-left: 0;
}
.fc-list-item-title a {
/* every event title cell has an <a> tag */
text-decoration: none;
color: inherit;
}
.fc-list-item-title a[href]:hover {
/* hover effect only on titles with hrefs */
text-decoration: underline;
}
/* message when no events */
.fc-list-empty-wrap2 {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.fc-list-empty-wrap1 {
width: 100%;
height: 100%;
display: table;
}
.fc-list-empty {
display: table-cell;
vertical-align: middle;
text-align: center;
}
.fc-unthemed .fc-list-empty {
/* theme will provide own background */
background-color: #eee;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

File diff suppressed because one or more lines are too long
-215
View File
@@ -1,215 +0,0 @@
(function(jQuery) {
"use strict";
// for apexchart
function apexChartUpdate(chart, detail) {
let color = getComputedStyle(document.documentElement).getPropertyValue('--dark');
if (detail.dark) {
color = getComputedStyle(document.documentElement).getPropertyValue('--white');
}
chart.updateOptions({
chart: {
foreColor: color
}
})
}
if (jQuery("#hospital-chart-02").length) var donut = new Morris.Donut({
element: "hospital-chart-02",
resize: !0,
colors: ["#4788ff", "#4fd69c", "#37d5f2", "#f75676"],
data: [
{
label: "New Patient",
value: 40
},
{
label: "Exit Patient",
value: 12
},
{
label: "ICU Patient",
value: 20
},
{
label: "Discharge Patient",
value: 33
}
],
hideHover: "auto"
});
if (jQuery("#hospital-chart-03").length) {
const options = {
series: [{
name: 'Operation',
data: [44, 25, 10, 60, 50, 25, 40, 20]
}, {
name: 'Visitors',
data: [25, 38, 70, 0, 30, 15, 30, 30]
}],
colors: ['#4788ff', '#4fd69c'],
chart: {
type: 'bar',
height: 340,
stacked: true,
zoom: {
enabled: true
}
},
responsive: [{
breakpoint: 580,
options: {
legend: {
position: 'bottom',
offsetX: -30,
offsetY: 0,
}
}
}],
plotOptions: {
bar: {
horizontal: false,
borderRadius: 4
},
},
xaxis: {
type: 'category',
categories: ['India', 'Canada', 'U.S.A', 'Africa', 'London ', 'Europe ','Dubai','Kuvet'],
},
yaxis: {
labels: {
offsetY: 0,
minWidth: 20,
maxWidth: 20,
}
},
legend: {
position: 'top',
offsetX: -35
},
fill: {
opacity: 1
},
dataLabels: {
enabled: false
}
};
const chart = new ApexCharts(document.querySelector("#hospital-chart-03"), options);
chart.render();
const body = document.querySelector('body')
if (body.classList.contains('dark')) {
apexChartUpdate(chart, {
dark: true
})
}
document.addEventListener('ChangeColorMode', function (e) {
apexChartUpdate(chart, e.detail)
})
}
if (jQuery("#dash-chart-04").length) {
const options = {
series: [{
name: 'Success',
data: [110, 85, 87, 40, 45, 20, 91, 45, 94, 88]
}, {
name: 'Failed',
data: [40, 55, 35, 30, 75, 80, 63, 45, 66, 115]
}],
chart: {
type: 'bar',
height: 280
},
colors: ['#4788ff', '#f75676'],
plotOptions: {
bar: {
horizontal: false,
borderRadius: 4
},
},
legend: {
position: 'bottom',
offsetX: 35
},
dataLabels: {
enabled: false
},
stroke: {
show: true,
width: 2,
colors: ['transparent']
},
xaxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct'],
},
yaxis: {
title: {
text: '$ (thousands)'
},
labels: {
offsetY: 0,
minWidth: 20,
maxWidth: 20,
}
},
fill: {
opacity: 1
},
tooltip: {
y: {
formatter: function (val) {
return "$ " + val + " thousands"
}
}
}
};
const chart = new ApexCharts(document.querySelector("#dash-chart-04"), options);
chart.render();
const body = document.querySelector('body')
if (body.classList.contains('dark')) {
apexChartUpdate(chart, {
dark: true
})
}
document.addEventListener('ChangeColorMode', function (e) {
apexChartUpdate(chart, e.detail)
})
}
if (jQuery("#hospital-chart-05").length) {
var options = {
series: [22, 83, 10, 30],
colors: ['#f75676', '#4fd69c', '#37d5f2', '#4788ff'],
chart: {
height: 290,
type: 'pie',
},
legend: {
position: 'bottom',
offsetX: 0
},
labels: ['Cancelled', 'Completed', 'Pending', 'Upcoming'],
};
var chart = new ApexCharts(document.querySelector("#hospital-chart-05"), options);
chart.render();
const body = document.querySelector('body')
if (body.classList.contains('dark')) {
apexChartUpdate(chart, {
dark: true
})
}
document.addEventListener('ChangeColorMode', function (e) {
apexChartUpdate(chart, e.detail)
})
}
})(jQuery);
-600
View File
@@ -1,600 +0,0 @@
/*
Template: Datum - Responsive Bootstrap 4 Admin Dashboard Template
Author: iqonic.design
Design and Developed by: iqonic.design
NOTE: This file contains the styling for responsive Template.
*/
/*----------------------------------------------
Index Of Script
------------------------------------------------
:: Tooltip
:: Fixed Nav
:: Magnific Popup
:: Ripple Effect
:: Sidebar Widget
:: FullScreen
:: Page Loader
:: Counter
:: Progress Bar
:: Page Menu
:: Close navbar Toggle
:: Mailbox
:: chatuser
:: chatuser main
:: Chat start
:: todo Page
:: user toggle
:: Data tables
:: Form Validation
:: Active Class for Pricing Table
:: Flatpicker
:: Scrollbar
:: checkout
:: Datatables
:: image-upload
:: video
:: dark mode
:: Button
:: Pricing tab
:: SVG Animation
:: Date Picker
:: Choies.js
------------------------------------------------
Index Of Script
----------------------------------------------*/
(function(jQuery) {
"use strict";
jQuery(document).ready(function() {
/*---------------------------------------------------------------------
Tooltip
-----------------------------------------------------------------------*/
jQuery('[data-toggle="popover"]').popover();
jQuery('[data-toggle="tooltip"]').tooltip();
/*---------------------------------------------------------------------
Fixed Nav
-----------------------------------------------------------------------*/
$(window).on('scroll', function () {
if ($(window).scrollTop() > 0) {
$('.iq-top-navbar').addClass('fixed');
} else {
$('.iq-top-navbar').removeClass('fixed');
}
});
$(window).on('scroll', function () {
if ($(window).scrollTop() > 0) {
$('.white-bg-menu').addClass('sticky-menu');
} else {
$('.white-bg-menu').removeClass('sticky-menu');
}
});
/*---------------------------------------------------------------------
Sidebar Widget
-----------------------------------------------------------------------*/
jQuery(document).on("click", '.side-menu > li > a', function() {
jQuery('.side-menu > li > a').parent().removeClass('active');
jQuery(this).parent().addClass('active');
});
// Active menu
var parents = jQuery('li.active').parents('.submenu.collapse');
parents.addClass('show');
parents.parents('li').addClass('active');
jQuery('li.active > a[aria-expanded="false"]').attr('aria-expanded', 'true');
/*---------------------------------------------------------------------
FullScreen
-----------------------------------------------------------------------*/
jQuery(document).on('click', '.full-screen', function() {
let elem = jQuery(this);
elem.find('i').addClass('d-none');
elem.find('i').addClass('d-none');
if (!document.fullscreenElement &&
!document.mozFullScreenElement && // Mozilla
!document.webkitFullscreenElement && // Webkit-Browser
!document.msFullscreenElement) { // MS IE ab version 11
elem.find('.min').removeClass('d-none');
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
} else if (document.documentElement.msRequestFullscreen) {
document.documentElement.msRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
} else {
elem.find('.max').removeClass('d-none');
if (document.cancelFullScreen) {
document.cancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
}
});
/*---------------------------------------------------------------------
Page Loader
-----------------------------------------------------------------------*/
jQuery("#load").fadeOut();
jQuery("#loading").delay().fadeOut("");
/*---------------------------------------------------------------------
Counter
-----------------------------------------------------------------------*/
if (window.counterUp !== undefined) {
const counterUp = window.counterUp["default"]
const $counters = $(".counter");
$counters.each(function (ignore, counter) {
var waypoint = new Waypoint( {
element: $(this),
handler: function() {
counterUp(counter, {
duration: 1000,
delay: 10
});
this.destroy();
},
offset: 'bottom-in-view',
} );
});
}
/*---------------------------------------------------------------------
Progress Bar
-----------------------------------------------------------------------*/
jQuery('.iq-progress-bar > span').each(function() {
let progressBar = jQuery(this);
let width = jQuery(this).data('percent');
progressBar.css({
'transition': 'width 2s'
});
setTimeout(function() {
progressBar.css('width', width + '%');
}, 100);
});
jQuery('.progress-bar-vertical > span').each(function () {
let progressBar = jQuery(this);
let height = jQuery(this).data('percent');
progressBar.css({
'transition': 'height 2s'
});
setTimeout(function () {
progressBar.css('height', height + '%');
}, 100);
});
/*---------------------------------------------------------------------
Page Menu
-----------------------------------------------------------------------*/
jQuery(document).on('click', '.wrapper-menu', function() {
jQuery(this).toggleClass('open');
});
jQuery(document).on('click', ".wrapper-menu", function() {
jQuery("body").toggleClass("sidebar-main");
});
/*---------------------------------------------------------------------
Close navbar Toggle
-----------------------------------------------------------------------*/
jQuery('.close-toggle').on('click', function () {
jQuery('.h-collapse.navbar-collapse').collapse('hide');
});
/*---------------------------------------------------------------------
user toggle
-----------------------------------------------------------------------*/
jQuery(document).on('click', '.user-toggle', function() {
jQuery(this).parent().addClass('show-data');
});
jQuery(document).on('click', ".close-data", function() {
jQuery('.user-toggle').parent().removeClass('show-data');
});
jQuery(document).on("click", function(event){
var $trigger = jQuery(".user-toggle");
if($trigger !== event.target && !$trigger.has(event.target).length){
jQuery(".user-toggle").parent().removeClass('show-data');
}
});
/*---------------------------------------------------------------------
Data tables
-----------------------------------------------------------------------*/
if($.fn.DataTable){
const table = $('.data-table').DataTable();
}
/*---------------------------------------------------------------------
Form Validation
-----------------------------------------------------------------------*/
// Example starter JavaScript for disabling form submissions if there are invalid fields
window.addEventListener('load', function() {
// Fetch all the forms we want to apply custom Bootstrap validation styles to
var forms = document.getElementsByClassName('needs-validation');
// Loop over them and prevent submission
var validation = Array.prototype.filter.call(forms, function(form) {
form.addEventListener('submit', function(event) {
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add('was-validated');
}, false);
});
}, false);
/*---------------------------------------------------------------------
Active Class for Pricing Table
-----------------------------------------------------------------------*/
jQuery("#my-table tr th").click(function () {
jQuery('#my-table tr th').children().removeClass('active');
jQuery(this).children().addClass('active');
jQuery("#my-table td").each(function () {
if (jQuery(this).hasClass('active')) {
jQuery(this).removeClass('active')
}
});
var col = jQuery(this).index();
jQuery("#my-table tr td:nth-child(" + parseInt(col + 1) + ")").addClass('active');
});
/*---------------------------------------------------------------------
Scrollbar
-----------------------------------------------------------------------*/
jQuery('.data-scrollbar').each(function () {
var attr = $(this).attr('data-scroll');
if (typeof attr !== typeof undefined && attr !== false){
let Scrollbar = window.Scrollbar;
var a = jQuery(this).data('scroll');
Scrollbar.init(document.querySelector('div[data-scroll= "' + a + '"]'));
}
});
/*---------------------------------------------------------------------
image-upload
-----------------------------------------------------------------------*/
$('.form_gallery-upload').on('change', function() {
var length = $(this).get(0).files.length;
var galleryLabel = $(this).attr('data-name');
if( length > 1 ){
$(galleryLabel).text(length + " files selected");
} else {
$(galleryLabel).text($(this)[0].files[0].name);
}
});
/*---------------------------------------------------------------------
video
-----------------------------------------------------------------------*/
$(document).ready(function(){
$('.form_video-upload input').change(function () {
$('.form_video-upload p').text(this.files.length + " file(s) selected");
});
});
/*---------------------------------------------------------------------
dark mode
-----------------------------------------------------------------------*/
const urlParams = new URLSearchParams(window.location.search);
const mode = urlParams.get('dark');
if (mode !== null) {
$('body').removeClass('sidebar-dark', 'sidebar-light')
switch (mode) {
case "true":
$('body').addClass('dark')
break;
case "false":
$('body').removeClass('sidebar-dark', 'sidebar-light')
break;
default:
$('body').removeClass('sidebar-dark').removeClass('sidebar-light')
break;
}
}
/*---------------------------------------------------------------------
Button
-----------------------------------------------------------------------*/
jQuery('.qty-btn').on('click',function(){
var id = jQuery(this).attr('id');
var val = parseInt(jQuery('#quantity').val());
if(id == 'btn-minus')
{
if(val != 0)
{
jQuery('#quantity').val(val-1);
}
else
{
jQuery('#quantity').val(0);
}
}
else
{
jQuery('#quantity').val(val+1);
}
});
});
$(document).on('click', '[data-toggel-extra="side-nav"]', function () {
const pannel = $(this).attr('data-expand-extra')
$(pannel).addClass('active')
})
$(document).on('click', '[data-toggel-extra="side-nav-close"]', function () {
const pannel = $(this).attr('data-expand-extra')
$(pannel).removeClass('active')
})
$(document).on('click', '[data-toggel-extra="right-sidenav"]', function () {
const target = $(this).data('target')
$(target).addClass('active')
})
$(document).on('click', '[data-extra-dismiss="right-sidenav"]', function () {
$(this).closest('.right-sidenav').removeClass('active')
})
$(document).on('click', '[data-toggle="end-call"]', function(){
$(this).closest('.tab-pane').removeClass('active').removeClass('show')
$($(this).attr('data-target')).tab('show')
$('.chat-action').find('[data-toggle="tab"]').removeClass('active')
})
$(document).on('click', '[data-toggle-extra="tab"]', function () {
const target = $(this).attr('data-target-extra')
$('[data-toggle-extra="tab-content"]').removeClass('active')
$(target).addClass('active')
$(this).parent().find('.active').removeClass('active')
$(this).addClass('active')
})
$('emoji-picker').on('emoji-click', function(e){
$(e.target.dataset.targetInput).val($(e.target.dataset.targetInput).val()+e.detail.unicode)
})
$('.dropdown-menu').on('click', function(event){
event.stopPropagation();
});
var board = $('.draggable-item');
var selector = [];
if(board.length > 0 )
{
for(var i = 0 ; i < board.length ; i++) {
selector.push(document.querySelector('#draggable-item-'+i));
selector.push(document.querySelector('#list-draggable-item-'+i));
}
}
dragula( selector ).on('drop', function(el) {
$(el).addClass(' animate__animated animate__rubberBand')
setTimeout(function () {
$(el).removeClass(' animate__animated animate__rubberBand')
}, 1000)
});
// calender 1 js
var calendar1;
if (jQuery('#calendar1').length) {
var calendarEl = document.getElementById('calendar1');
calendar1 = new FullCalendar.Calendar(calendarEl, {
selectable: true,
plugins: ["timeGrid", "dayGrid", "list", "interaction"],
timeZone: "UTC",
defaultView: "dayGridMonth",
contentHeight: "auto",
eventLimit: true,
dayMaxEvents: 4,
header: {
left: "prev,next today",
center: "title",
right: "dayGridMonth,timeGridWeek,timeGridDay,listWeek"
},
dateClick: function (info) {
$('#schedule-start-date').val(info.dateStr)
$('#schedule-end-date').val(info.dateStr)
$('#date-event').modal('show')
},
events: [
{
title: 'Click for Google',
url: 'http://google.com/',
start: moment(new Date(), 'YYYY-MM-DD').add(-20, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#4731b6'
},
{
title: 'All Day Event',
start: moment(new Date(), 'YYYY-MM-DD').add(-18, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#465af7'
},
{
title: 'Long Event',
start: moment(new Date(), 'YYYY-MM-DD').add(-16, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
end: moment(new Date(), 'YYYY-MM-DD').add(-13, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#7858d7'
},
{
groupId: '999',
title: 'Repeating Event',
start: moment(new Date(), 'YYYY-MM-DD').add(-14, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#465af7'
},
{
groupId: '999',
title: 'Repeating Event',
start: moment(new Date(), 'YYYY-MM-DD').add(-12, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#5baa73'
},
{
groupId: '999',
title: 'Repeating Event',
start: moment(new Date(), 'YYYY-MM-DD').add(-10, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#01041b'
},
{
title: 'Birthday Party',
start: moment(new Date(), 'YYYY-MM-DD').add(-8, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#4731b6'
},
{
title: 'Meeting',
start: moment(new Date(), 'YYYY-MM-DD').add(-6, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#15ca92'
},
{
title: 'Birthday Party',
start: moment(new Date(), 'YYYY-MM-DD').add(-5, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#f4a965'
},
{
title: 'Birthday Party',
start: moment(new Date(), 'YYYY-MM-DD').add(-2, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#ea643f'
},
{
title: 'Meeting',
start: moment(new Date(), 'YYYY-MM-DD').add(0, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#15ca92'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: moment(new Date(), 'YYYY-MM-DD').add(0, 'days').format('YYYY-MM-DD') + 'T06:30:00.000Z',
color: '#4731b6'
},
{
groupId: '999',
title: 'Repeating Event',
start: moment(new Date(), 'YYYY-MM-DD').add(0, 'days').format('YYYY-MM-DD') + 'T07:30:00.000Z',
color: '#5baa73'
},
{
title: 'Birthday Party',
start: moment(new Date(), 'YYYY-MM-DD').add(0, 'days').format('YYYY-MM-DD') + 'T08:30:00.000Z',
color: '#f4a965'
},
{
title: 'Doctor Meeting',
start: moment(new Date(), 'YYYY-MM-DD').add(0, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#f4a965'
},
{
title: 'All Day Event',
start: moment(new Date(), 'YYYY-MM-DD').add(1, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#465af7'
},
{
groupId: '999',
title: 'Repeating Event',
start: moment(new Date(), 'YYYY-MM-DD').add(8, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#465af7'
},
{
groupId: '999',
title: 'Repeating Event',
start: moment(new Date(), 'YYYY-MM-DD').add(10, 'days').format('YYYY-MM-DD') + 'T05:30:00.000Z',
color: '#5baa73'
}
]
});
calendar1.render();
$(document).on("submit", "#submit-schedule", function (e) {
e.preventDefault()
const title = $(this).find('#schedule-title').val()
const startDate = moment(new Date($(this).find('#schedule-start-date').val()), 'YYYY-MM-DD').format('YYYY-MM-DD') + 'T05:30:00.000Z'
const endDate = moment(new Date($(this).find('#schedule-end-date').val()), 'YYYY-MM-DD').format('YYYY-MM-DD') + 'T05:30:00.000Z'
const color = $(this).find('#schedule-color').val()
const event = {
title: title,
start: startDate || '2020-12-22T02:30:00',
end: endDate || '2020-12-12T14:30:00',
color: color || '#7858d7'
}
$(this).closest('#date-event').modal('hide')
calendar1.addEvent(event)
})
}
const progressBar = document.getElementsByClassName('circle-progress')
Array.from(progressBar, (elem) => {
const minValue = elem.getAttribute('data-min-value')
const maxValue = elem.getAttribute('data-max-value')
const value = elem.getAttribute('data-value')
const type = elem.getAttribute('data-type')
if (elem.getAttribute('id') !== '' && elem.getAttribute('id') !== null) {
new CircleProgress('#'+elem.getAttribute('id'), {
min: minValue,
max: maxValue,
value: value,
textFormat: type,
});
}
})
/*---------------------------------------------------------------------
Vanila Datepicker
-----------------------------------------------------------------------*/
const datepickers = document.querySelectorAll('.vanila-datepicker')
Array.from(datepickers, (elem) => {
new Datepicker(elem)
})
const daterangePickers = document.querySelectorAll('.vanila-daterangepicker')
Array.from(daterangePickers, (elem) => {
new DateRangePicker(elem)
})
/*---------------------------------------------------------------------
Choies.js
-----------------------------------------------------------------------*/
const choies = document.querySelectorAll('.choicesjs')
Array.from(choies,(elem) => {
new Choices(elem, {
removeItemButton: true,
})
})
})(jQuery);
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
-46
View File
@@ -1,46 +0,0 @@
function getTimeRemaining(endtime) {
const total = Date.parse(endtime) - Date.parse(new Date());
const seconds = Math.floor((total / 1000) % 60);
const minutes = Math.floor((total / 1000 / 60) % 60);
const hours = Math.floor((total / (1000 * 60 * 60)) % 24);
const days = Math.floor(total / (1000 * 60 * 60 * 24));
return {
total,
days,
hours,
minutes,
seconds
};
}
function initializeClock(elem, endtime) {
const clock = document.querySelector(elem)
const daysSpan = clock.querySelector('[data-days]')
const hoursSpan = clock.querySelector('[data-hours]')
const minutesSpan = clock.querySelector('[data-minutes]')
const secondsSpan = clock.querySelector('[data-seconds]')
function updateClock() {
const t = getTimeRemaining(endtime)
daysSpan.innerHTML = t.days
hoursSpan.innerHTML = ('0' + t.hours).slice(-2)
minutesSpan.innerHTML = ('0' + t.minutes).slice(-2)
secondsSpan.innerHTML = ('0' + t.seconds).slice(-2)
if (t.total <= 0) {
clearInterval(timeinterval)
}
}
updateClock()
const timeinterval = setInterval(updateClock, 1000)
}
let time = document.querySelector('.countdown').getAttribute('data-date')
if (time == undefined) {
time = Date.parse(new Date()) + 15 * 24 * 60 * 60 * 1000
}
const deadline = new Date(time)
initializeClock('.countdown', deadline)
-51
View File
@@ -1,51 +0,0 @@
(function (jQuery) {
"use strict";
// data-mode="click" for using event
// data-dark="false" for property
// icon class // la-sun // la-moon
const storageDark = localStorage.getItem('dark')
if($('body').hasClass('dark')){
changeMode('true');
} else {
changeMode('false');
}
if (storageDark !== 'null') {
changeMode(storageDark)
}
jQuery(document).on("change", '.change-mode input[type="checkbox"]' ,function (e) {
const dark = $(this).attr('data-active');
if (dark === 'true') {
$(this).attr('data-active','false')
} else {
$(this).attr('data-active','true')
}
changeMode(dark)
})
function changeMode (dark) {
const body = jQuery('body')
if (dark === 'true') {
// $('[data-mode="toggle"]').find('i.a-right').removeClass('ri-sun-line');
// $('[data-mode="toggle"]').find('i.a-left').addClass('ri-moon-clear-line');
$('#dark-mode').prop('checked', true).attr('data-active', 'false')
$('.darkmode-logo').removeClass('d-none')
$('.light-logo').addClass('d-none')
body.addClass('dark')
dark = true
} else {
// $('[data-mode="toggle"]').find('i.a-left').removeClass('ri-moon-clear-line');
// $('[data-mode="toggle"]').find('i.a-right').addClass('ri-sun-line');
$('#dark-mode').prop('checked', false).attr('data-active', 'true');
$('.light-logo').removeClass('d-none')
$('.darkmode-logo').addClass('d-none')
body.removeClass('dark')
dark = false
}
updateLocalStorage(dark)
const event = new CustomEvent("ChangeColorMode", {detail: {dark: dark} });
document.dispatchEvent(event);
}
function updateLocalStorage(dark) {
localStorage.setItem('dark', dark)
}
})(jQuery)
-2
View File
@@ -1,2 +0,0 @@
/*! jQuery Flex Tree 1.2.0 2020-08-19 */
!function(a){var b="flexTree",c={};a.fn[b]=function(b){b=a.extend(!0,{id:void 0,targetElement:a(this),type:void 0,debug:!1,name:"flex_tree",items:{},className:"flex-tree",buildTree:!0,collapsed:!1,collapsable:!0,addControlOnParent:!0,threeState:!0},c,b),!1===b.collapsable&&(b.collapsed=!1),!1===b.addControlOnParent&&(b.threeState=!1);var d;if(b.buildTree){d=a("<ul/>").attr("class",b.className).attr("id",b.id);var e=function(b){b=a.extend(!0,{items:{},ul:d,collapsed:!1,collapsable:!0,addControlOnParent:!0,threeState:!0},b),a.each(b.items,function(c,d){if("object"==typeof d.childrens&&d.childrens.length){var f=a("<li/>");!b.addControlOnParent||"checkbox"!==b.type&&"radio"!==b.type||f.append(a("<input/>").attr("type",b.type).attr("name","radio"===b.type||!1===b.threeState?d.name||b.name:d.name).attr("name",d.name).attr("value",d.value).attr("class","node").attr("id",d.id).prop("checked",d.checked)),f.append(a('<span class="node"/> ').addClass(b.collapsable?b.collapsed?"open":"closed":"").append(a("<label/>").append(d.label).attr("class","node")));var g=a("<ul/>");b.ul.append(f),f.append(g),!0===b.collapsed&&g.hide(),e({items:d.childrens,name:b.name,ul:g,collapsed:b.collapsed,collapsable:b.collapsable,type:b.type,addControlOnParent:b.addControlOnParent,threeState:b.threeState})}else b.ul.append(a("<li/>").append(a("<label/>").append("undefined"!=typeof b.type?a("<input/>").attr("type",b.type).attr("name","checkbox"===b.type?d.name||b.name:b.name).attr("value",d.value).attr("class","leaf").attr("id",d.id).prop("checked",d.checked):void 0).append(d.label)))})};e(b),a(b.targetElement).append(d)}else d=b.targetElement,d.addClass(b.className);if(b.collapsable&&a("li span.node",d).on("click",function(b){a(this).toggleClass("closed").toggleClass("open").next().toggle(200)}),b.threeState&&"checkbox"===b.type){a('input[type="checkbox"].node',d).on("click",function(b){a(this).removeClass("indeterminate").prop("indeterminate",!1);var c=a(this);c.parent().find('ul input[type="checkbox"]').each(function(){a(this).prop("checked",c.prop("checked")).prop("indeterminate",!1).removeClass("indeterminate")})});var f=function(){var b=a(this).closest("ul").prevAll('input[type="checkbox"].node');if(b.length){a(this).prop("checked")||b.prop("checked",!1);var c=a(this).prop("checked"),d=a(this).prop("checked");a(this).closest("li").siblings("li").find("input:first").each(function(){a(this).prop("checked")&&!0!==a(this).prop("indeterminate")||(c=!1),(a(this).prop("checked")||!0===a(this).prop("indeterminate"))&&(d=!0)}),d||!0===a(this).prop("indeterminate")?b.addClass("indeterminate").prop("indeterminate",!0):b.removeClass("indeterminate").prop("indeterminate",!1),c&&b.prop("checked",!0).prop("indeterminate",!1).removeClass("indeterminate"),f.apply(b)}};a('input[type="checkbox"]',d).on("click",f),a('input[type="checkbox"].leaf',d).each(function(){f.apply(this)})}}}(jQuery);
-3
View File
@@ -1,3 +0,0 @@
import Picker from './picker.js'
import Database from './database.js'
export { Picker, Database }
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-343
View File
@@ -1,343 +0,0 @@
/*!
FullCalendar List View Plugin v4.3.0
Docs & License: https://fullcalendar.io/
(c) 2019 Adam Shaw
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@fullcalendar/core')) :
typeof define === 'function' && define.amd ? define(['exports', '@fullcalendar/core'], factory) :
(global = global || self, factory(global.FullCalendarList = {}, global.FullCalendar));
}(this, function (exports, core) { 'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var ListEventRenderer = /** @class */ (function (_super) {
__extends(ListEventRenderer, _super);
function ListEventRenderer(listView) {
var _this = _super.call(this, listView.context) || this;
_this.listView = listView;
return _this;
}
ListEventRenderer.prototype.attachSegs = function (segs) {
if (!segs.length) {
this.listView.renderEmptyMessage();
}
else {
this.listView.renderSegList(segs);
}
};
ListEventRenderer.prototype.detachSegs = function () {
};
// generates the HTML for a single event row
ListEventRenderer.prototype.renderSegHtml = function (seg) {
var _a = this.context, view = _a.view, theme = _a.theme;
var eventRange = seg.eventRange;
var eventDef = eventRange.def;
var eventInstance = eventRange.instance;
var eventUi = eventRange.ui;
var url = eventDef.url;
var classes = ['fc-list-item'].concat(eventUi.classNames);
var bgColor = eventUi.backgroundColor;
var timeHtml;
if (eventDef.allDay) {
timeHtml = core.getAllDayHtml(view);
}
else if (core.isMultiDayRange(eventRange.range)) {
if (seg.isStart) {
timeHtml = core.htmlEscape(this._getTimeText(eventInstance.range.start, seg.end, false // allDay
));
}
else if (seg.isEnd) {
timeHtml = core.htmlEscape(this._getTimeText(seg.start, eventInstance.range.end, false // allDay
));
}
else { // inner segment that lasts the whole day
timeHtml = core.getAllDayHtml(view);
}
}
else {
// Display the normal time text for the *event's* times
timeHtml = core.htmlEscape(this.getTimeText(eventRange));
}
if (url) {
classes.push('fc-has-url');
}
return '<tr class="' + classes.join(' ') + '">' +
(this.displayEventTime ?
'<td class="fc-list-item-time ' + theme.getClass('widgetContent') + '">' +
(timeHtml || '') +
'</td>' :
'') +
'<td class="fc-list-item-marker ' + theme.getClass('widgetContent') + '">' +
'<span class="fc-event-dot"' +
(bgColor ?
' style="background-color:' + bgColor + '"' :
'') +
'></span>' +
'</td>' +
'<td class="fc-list-item-title ' + theme.getClass('widgetContent') + '">' +
'<a' + (url ? ' href="' + core.htmlEscape(url) + '"' : '') + '>' +
core.htmlEscape(eventDef.title || '') +
'</a>' +
'</td>' +
'</tr>';
};
// like "4:00am"
ListEventRenderer.prototype.computeEventTimeFormat = function () {
return {
hour: 'numeric',
minute: '2-digit',
meridiem: 'short'
};
};
return ListEventRenderer;
}(core.FgEventRenderer));
/*
Responsible for the scroller, and forwarding event-related actions into the "grid".
*/
var ListView = /** @class */ (function (_super) {
__extends(ListView, _super);
function ListView(context, viewSpec, dateProfileGenerator, parentEl) {
var _this = _super.call(this, context, viewSpec, dateProfileGenerator, parentEl) || this;
_this.computeDateVars = core.memoize(computeDateVars);
_this.eventStoreToSegs = core.memoize(_this._eventStoreToSegs);
var eventRenderer = _this.eventRenderer = new ListEventRenderer(_this);
_this.renderContent = core.memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer), eventRenderer.unrender.bind(eventRenderer));
_this.el.classList.add('fc-list-view');
var listViewClassNames = (_this.theme.getClass('listView') || '').split(' '); // wish we didn't have to do this
for (var _i = 0, listViewClassNames_1 = listViewClassNames; _i < listViewClassNames_1.length; _i++) {
var listViewClassName = listViewClassNames_1[_i];
if (listViewClassName) { // in case input was empty string
_this.el.classList.add(listViewClassName);
}
}
_this.scroller = new core.ScrollComponent('hidden', // overflow x
'auto' // overflow y
);
_this.el.appendChild(_this.scroller.el);
_this.contentEl = _this.scroller.el; // shortcut
context.calendar.registerInteractiveComponent(_this, {
el: _this.el
// TODO: make aware that it doesn't do Hits
});
return _this;
}
ListView.prototype.render = function (props) {
var _a = this.computeDateVars(props.dateProfile), dayDates = _a.dayDates, dayRanges = _a.dayRanges;
this.dayDates = dayDates;
this.renderContent(this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges));
};
ListView.prototype.destroy = function () {
_super.prototype.destroy.call(this);
this.renderContent.unrender();
this.scroller.destroy(); // will remove the Grid too
this.calendar.unregisterInteractiveComponent(this);
};
ListView.prototype.updateSize = function (isResize, viewHeight, isAuto) {
_super.prototype.updateSize.call(this, isResize, viewHeight, isAuto);
this.eventRenderer.computeSizes(isResize);
this.eventRenderer.assignSizes(isResize);
this.scroller.clear(); // sets height to 'auto' and clears overflow
if (!isAuto) {
this.scroller.setHeight(this.computeScrollerHeight(viewHeight));
}
};
ListView.prototype.computeScrollerHeight = function (viewHeight) {
return viewHeight -
core.subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller
};
ListView.prototype._eventStoreToSegs = function (eventStore, eventUiBases, dayRanges) {
return this.eventRangesToSegs(core.sliceEventStore(eventStore, eventUiBases, this.props.dateProfile.activeRange, this.nextDayThreshold).fg, dayRanges);
};
ListView.prototype.eventRangesToSegs = function (eventRanges, dayRanges) {
var segs = [];
for (var _i = 0, eventRanges_1 = eventRanges; _i < eventRanges_1.length; _i++) {
var eventRange = eventRanges_1[_i];
segs.push.apply(segs, this.eventRangeToSegs(eventRange, dayRanges));
}
return segs;
};
ListView.prototype.eventRangeToSegs = function (eventRange, dayRanges) {
var _a = this, dateEnv = _a.dateEnv, nextDayThreshold = _a.nextDayThreshold;
var range = eventRange.range;
var allDay = eventRange.def.allDay;
var dayIndex;
var segRange;
var seg;
var segs = [];
for (dayIndex = 0; dayIndex < dayRanges.length; dayIndex++) {
segRange = core.intersectRanges(range, dayRanges[dayIndex]);
if (segRange) {
seg = {
component: this,
eventRange: eventRange,
start: segRange.start,
end: segRange.end,
isStart: eventRange.isStart && segRange.start.valueOf() === range.start.valueOf(),
isEnd: eventRange.isEnd && segRange.end.valueOf() === range.end.valueOf(),
dayIndex: dayIndex
};
segs.push(seg);
// detect when range won't go fully into the next day,
// and mutate the latest seg to the be the end.
if (!seg.isEnd && !allDay &&
dayIndex + 1 < dayRanges.length &&
range.end <
dateEnv.add(dayRanges[dayIndex + 1].start, nextDayThreshold)) {
seg.end = range.end;
seg.isEnd = true;
break;
}
}
}
return segs;
};
ListView.prototype.renderEmptyMessage = function () {
this.contentEl.innerHTML =
'<div class="fc-list-empty-wrap2">' + // TODO: try less wraps
'<div class="fc-list-empty-wrap1">' +
'<div class="fc-list-empty">' +
core.htmlEscape(this.opt('noEventsMessage')) +
'</div>' +
'</div>' +
'</div>';
};
// called by ListEventRenderer
ListView.prototype.renderSegList = function (allSegs) {
var segsByDay = this.groupSegsByDay(allSegs); // sparse array
var dayIndex;
var daySegs;
var i;
var tableEl = core.htmlToElement('<table class="fc-list-table ' + this.calendar.theme.getClass('tableList') + '"><tbody></tbody></table>');
var tbodyEl = tableEl.querySelector('tbody');
for (dayIndex = 0; dayIndex < segsByDay.length; dayIndex++) {
daySegs = segsByDay[dayIndex];
if (daySegs) { // sparse array, so might be undefined
// append a day header
tbodyEl.appendChild(this.buildDayHeaderRow(this.dayDates[dayIndex]));
daySegs = this.eventRenderer.sortEventSegs(daySegs);
for (i = 0; i < daySegs.length; i++) {
tbodyEl.appendChild(daySegs[i].el); // append event row
}
}
}
this.contentEl.innerHTML = '';
this.contentEl.appendChild(tableEl);
};
// Returns a sparse array of arrays, segs grouped by their dayIndex
ListView.prototype.groupSegsByDay = function (segs) {
var segsByDay = []; // sparse array
var i;
var seg;
for (i = 0; i < segs.length; i++) {
seg = segs[i];
(segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))
.push(seg);
}
return segsByDay;
};
// generates the HTML for the day headers that live amongst the event rows
ListView.prototype.buildDayHeaderRow = function (dayDate) {
var dateEnv = this.dateEnv;
var mainFormat = core.createFormatter(this.opt('listDayFormat')); // TODO: cache
var altFormat = core.createFormatter(this.opt('listDayAltFormat')); // TODO: cache
return core.createElement('tr', {
className: 'fc-list-heading',
'data-date': dateEnv.formatIso(dayDate, { omitTime: true })
}, '<td class="' + (this.calendar.theme.getClass('tableListHeading') ||
this.calendar.theme.getClass('widgetHeader')) + '" colspan="3">' +
(mainFormat ?
core.buildGotoAnchorHtml(this, dayDate, { 'class': 'fc-list-heading-main' }, core.htmlEscape(dateEnv.format(dayDate, mainFormat)) // inner HTML
) :
'') +
(altFormat ?
core.buildGotoAnchorHtml(this, dayDate, { 'class': 'fc-list-heading-alt' }, core.htmlEscape(dateEnv.format(dayDate, altFormat)) // inner HTML
) :
'') +
'</td>');
};
return ListView;
}(core.View));
ListView.prototype.fgSegSelector = '.fc-list-item'; // which elements accept event actions
function computeDateVars(dateProfile) {
var dayStart = core.startOfDay(dateProfile.renderRange.start);
var viewEnd = dateProfile.renderRange.end;
var dayDates = [];
var dayRanges = [];
while (dayStart < viewEnd) {
dayDates.push(dayStart);
dayRanges.push({
start: dayStart,
end: core.addDays(dayStart, 1)
});
dayStart = core.addDays(dayStart, 1);
}
return { dayDates: dayDates, dayRanges: dayRanges };
}
var main = core.createPlugin({
views: {
list: {
class: ListView,
buttonTextKey: 'list',
listDayFormat: { month: 'long', day: 'numeric', year: 'numeric' } // like "January 1, 2016"
},
listDay: {
type: 'list',
duration: { days: 1 },
listDayFormat: { weekday: 'long' } // day-of-week is all we need. full date is probably in header
},
listWeek: {
type: 'list',
duration: { weeks: 1 },
listDayFormat: { weekday: 'long' },
listDayAltFormat: { month: 'long', day: 'numeric', year: 'numeric' }
},
listMonth: {
type: 'list',
duration: { month: 1 },
listDayAltFormat: { weekday: 'long' } // day-of-week is nice-to-have
},
listYear: {
type: 'list',
duration: { year: 1 },
listDayAltFormat: { weekday: 'long' } // day-of-week is nice-to-have
}
}
});
exports.ListView = ListView;
exports.default = main;
Object.defineProperty(exports, '__esModule', { value: true });
}));
-19
View File
@@ -1,19 +0,0 @@
(function (jQuery) {
"use strict";
const urlParams = new URLSearchParams(window.location.search);
const sidebar = urlParams.get('sidebar');
if (sidebar !== null) {
$('.iq-sidebar').removeClass('sidebar-dark', 'sidebar-light')
switch (sidebar) {
case "0":
$('.iq-sidebar').addClass('sidebar-dark')
break;
case "1":
$('.iq-sidebar').addClass('sidebar-light')
break;
default:
$('.iq-sidebar').removeClass('sidebar-dark').removeClass('sidebar-light')
break;
}
}
})(jQuery)
-561
View File
@@ -1,561 +0,0 @@
/*
Template: Datum - Responsive Bootstrap 4 Admin Dashboard Template
Author: iqonic.design
Design and Developed by: http://iqonic.design/
NOTE: This file contains the styling for Slider in Template.
*/
jQuery(document).ready(function() {
if(typeof $.fn.slick !== typeof undefined){
/*---------------------------------------------------------------------
slick
-----------------------------------------------------------------------*/
jQuery('.slick-slider').slick({
centerMode: true,
centerPadding: '60px',
slidesToShow: 9,
slidesToScroll: 1,
focusOnSelect: true,
responsive: [{
breakpoint: 992,
settings: {
arrows: false,
centerMode: true,
centerPadding: '30',
slidesToShow: 3
}
}, {
breakpoint: 480,
settings: {
arrows: false,
centerMode: true,
centerPadding: '15',
slidesToShow: 1
}
}],
nextArrow: '<a href="#" class="ri-arrow-left-s-line left"></a>',
prevArrow: '<a href="#" class="ri-arrow-right-s-line right"></a>',
});
jQuery('.top-rated-item').slick({
slidesToShow: 4,
speed: 300,
slidesToScroll: 1,
focusOnSelect: true,
appendArrows: jQuery('#top-rated-item-slick-arrow'),
responsive: [{
breakpoint: 1200,
settings: {
slidesToShow: 3
}
},{
breakpoint: 798,
settings: {
slidesToShow: 2
}
},{
breakpoint: 480,
settings: {
arrows: false,
autoplay:true,
slidesToShow: 1
}
}],
});
jQuery('#newrealease-slider').slick({
dots: false,
arrows: false,
infinite: true,
speed: 300,
centerMode: true,
centerPadding: false,
variableWidth: true ,
infinite: true,
focusOnSelect: true,
autoplay: false,
slidesToShow: 7,
slidesToScroll: 1,
});
jQuery("#newrealease-slider .slick-active.slick-center").prev('.slick-active').addClass('temp');
jQuery("#newrealease-slider .slick-active.temp").prev().addClass('temp-1');
jQuery("#newrealease-slider .slick-active.temp-1").prev().addClass('temp-2');
jQuery("#newrealease-slider .slick-active.slick-center").next('.slick-active').addClass('temp-next');
jQuery("#newrealease-slider .slick-active.temp-next").next().addClass('temp-next-1');
jQuery("#newrealease-slider .slick-active.temp-next-1").next().addClass('temp-next-2');
jQuery("#newrealease-slider").on("afterChange", function (){
var slick_index = jQuery(".slick-active.slick-center").data('slick-index');
jQuery('#newrealease-slider .slick-active[data-slick-index="'+(slick_index-1)+'"]').addClass('temp');
jQuery('#newrealease-slider .slick-active[data-slick-index="'+(slick_index-2)+'"]').addClass('temp-1');
jQuery('#newrealease-slider .slick-active[data-slick-index="'+(slick_index-3)+'"]').addClass('temp-2');
jQuery('#newrealease-slider .slick-active[data-slick-index="'+(parseInt(slick_index+1))+'"]').addClass('temp-next');
jQuery('#newrealease-slider .slick-active[data-slick-index="'+(parseInt(slick_index+2))+'"]').addClass('temp-next-1');
jQuery('#newrealease-slider .slick-active[data-slick-index="'+(parseInt(slick_index+3))+'"]').addClass('temp-next-2');
});
jQuery("#newrealease-slider").on("beforeChange", function (){
var slick_index = jQuery(".slick-active.slick-center").data('slick-index');
jQuery('#newrealease-slider .slick-active[data-slick-index="'+(slick_index-1)+'"]').removeClass('temp');
jQuery('#newrealease-slider .slick-active[data-slick-index="'+(slick_index-2)+'"]').removeClass('temp-1');
jQuery('#newrealease-slider .slick-active[data-slick-index="'+(slick_index-3)+'"]').removeClass('temp-2');
jQuery('#newrealease-slider .slick-active[data-slick-index="'+(parseInt(slick_index+1))+'"]').removeClass('temp-next');
jQuery('#newrealease-slider .slick-active[data-slick-index="'+(parseInt(slick_index+2))+'"]').removeClass('temp-next-1');
jQuery('#newrealease-slider .slick-active[data-slick-index="'+(parseInt(slick_index+3))+'"]').removeClass('temp-next-2');
});
jQuery('#favorites-slider').slick({
dots: false,
arrows: false,
infinite: true,
speed: 300,
centerMode: false,
autoplay: true,
slidesToShow: 3,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
slidesToScroll: 1,
infinite: true,
}
},
{
breakpoint: 992,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
jQuery('#similar-slider').slick({
dots: false,
arrows: false,
infinite: true,
speed: 300,
centerMode: false,
autoplay: true,
slidesToShow: 4,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
slidesToScroll: 1,
infinite: true,
}
},
{
breakpoint: 768,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
},
{
breakpoint: 576,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
jQuery('#single-similar-slider').slick({
dots: false,
arrows: false,
infinite: true,
speed: 300,
centerMode: false,
autoplay: true,
slidesToShow: 3,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
slidesToScroll: 1,
infinite: true,
}
},
{
breakpoint: 768,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
},
{
breakpoint: 576,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
jQuery('#trendy-slider').slick({
dots: false,
arrows: false,
infinite: true,
speed: 300,
centerMode: false,
autoplay: true,
slidesToShow: 4,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
slidesToScroll: 1,
infinite: true,
}
},
{
breakpoint: 768,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
},
{
breakpoint: 576,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
jQuery('#description-slider').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
asNavFor: '#description-slider-nav'
});
jQuery('#description-slider-nav').slick({
slidesToShow: 3,
slidesToScroll: 1,
asNavFor: '#description-slider',
dots: false,
arrows: false,
infinite: true,
vertical: true,
centerMode: false,
focusOnSelect: true
});
jQuery('.realeases-banner').slick({
slidesToShow: 5,
speed: 300,
arrows:false,
slidesToScroll: 1,
vertical: true,
verticalSwiping: true,
focusOnSelect: true,
responsive: [{
breakpoint: 992,
settings: {
arrows: false,
slidesToShow: 3
}
}, {
breakpoint: 480,
settings: {
arrows: false,
verticalSwiping:false,
slidesToShow:4
}
}],
});
jQuery('.feature-album').slick({
slidesToShow: 6,
speed: 300,
slidesToScroll: 1,
focusOnSelect: true,
appendArrows: jQuery('#feature-album-slick-arrow'),
responsive: [{
breakpoint: 1200,
settings: {
slidesToShow: 4
}
},{
breakpoint: 992,
settings: {
slidesToShow: 3
}
}, {
breakpoint: 480,
settings: {
arrows: false,
autoplay:true,
slidesToShow: 1
}
}],
});
jQuery('.feature-album-artist').slick({
slidesToShow: 6,
speed: 300,
slidesToScroll: 1,
appendArrows: jQuery('#feature-album-artist-slick-arrow'),
focusOnSelect: true,
responsive: [{
breakpoint: 1200,
settings: {
slidesToShow: 4
}
},{
breakpoint: 992,
settings: {
arrows:true,
slidesToShow: 3
}
}, {
breakpoint: 480,
settings: {
arrows:false,
autoplay:true,
slidesToShow: 1
}
}],
});
jQuery('.hot-songs').slick({
slidesToShow: 2,
speed: 300,
appendArrows: jQuery('#hot-song-slick-arrow'),
slidesToScroll: 1,
rows:3,
focusOnSelect: true,
responsive: [{
breakpoint: 992,
settings: {
arrows: true,
slidesToShow: 2
}
}, {
breakpoint: 480,
settings: {
arrows: false,
autoplay:true,
slidesToShow: 1
}
}],
});
/*---slider salon----*/
jQuery('.salone-styles').slick({
dots: false,
arrows: true,
infinite: true,
speed: 200,
autoplay: false,
slidesToShow: 2,
slidesToScroll: 1,
appendArrows: jQuery('#trending-order-slick-arrow'),
responsive: [
{
breakpoint: 1200,
settings: {
slidesToShow: 1
}
},
{
breakpoint: 1024,
settings: {
slidesToShow: 1
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 1
}
}
]
});
jQuery('.hot-video').slick({
slidesToShow: 2,
speed: 300,
appendArrows: jQuery('#hot-video-slick-arrow'),
slidesToScroll: 1,
focusOnSelect: true,
responsive: [{
breakpoint: 992,
settings: {
arrows: true,
slidesToShow: 2
}
}, {
breakpoint: 480,
settings: {
arrows: false,
autoplay:true,
slidesToShow: 1
}
}],
});
/*---------------------------------------------------------------------
active music
-----------------------------------------------------------------------*/
jQuery( 'ul.iq-song-slide li').on('click', function(){
jQuery('ul.iq-song-slide li').removeClass('active');
jQuery(this).addClass('active');
});
/*---------------------------------------------------------------------
social media post
-----------------------------------------------------------------------*/
jQuery('.post-social').slick({
dots: false,
arrows: false,
infinite: true,
speed: 200,
autoplay: true,
slidesToShow: 1,
slidesToScroll: 1,
});
jQuery('.trending-order').slick({
dots: false,
arrows: true,
infinite: true,
speed: 200,
autoplay: false,
slidesToShow: 2,
slidesToScroll: 1,
appendArrows: jQuery('#trending-order-slick-arrow'),
responsive: [
{
breakpoint: 1300,
settings: {
slidesToShow: 2
}
},
{
breakpoint: 1024,
settings: {
slidesToShow: 2
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 1
}
}
]
});
jQuery('.resto-blog').slick({
dots: false,
arrows: false,
infinite: true,
speed: 200,
autoplay: false,
slidesToShow: 2,
slidesToScroll: 1,
responsive: [
{
breakpoint: 600,
settings: {
slidesToShow: 1
}
}
]
});
jQuery('.image-slide-1').slick({
dots: false,
arrows: false,
infinite: true,
speed: 200,
autoplay: true,
slidesToShow: 1,
slidesToScroll: 1,
});
jQuery('.stylist-salon').slick({
slidesToShow: 4,
speed: 300,
slidesToScroll: 1,
focusOnSelect: true,
autoplay: true,
arrows: false,
responsive: [{
breakpoint: 992,
settings: {
arrows: false,
slidesToShow: 2
}
}, {
breakpoint: 480,
settings: {
arrows: false,
autoplay: true,
slidesToShow: 1
}
}],
});
jQuery('.stylist-salon1').slick({
slidesToShow: 4,
speed: 300,
slidesToScroll: 1,
focusOnSelect: true,
autoplay: true,
responsive: [{
breakpoint: 992,
settings: {
arrows: true,
slidesToShow: 2
}
}, {
breakpoint: 480,
settings: {
arrows: false,
autoplay: true,
slidesToShow: 1
}
}],
});
}
});
-138
View File
@@ -1,138 +0,0 @@
$(document).ready(function () {
$('#basic').on('click', function () {
Swal.fire('Hello! This is a Basic Message.')
});
$('#basic-title').on('click', function () {
Swal.fire(
'The Internet?',
'That thing is still around?',
'question'
)
});
$('#success').on('click', function () {
Swal.fire({
icon: 'success',
title: 'Your work has been saved',
showConfirmButton: false,
})
});
$('#info').on('click', function () {
Swal.fire({
icon: 'info',
title: 'Good Job!',
showConfirmButton: false,
})
});
$('#warning').on('click', function () {
Swal.fire({
icon: 'warning',
title: 'Changes are not saved',
showConfirmButton: false,
})
});
$('#danger').on('click', function () {
Swal.fire({
icon: 'error',
title: 'OOps!!',
text: 'Something went Wrong',
showConfirmButton: false,
})
});
$('#confirmation').on('click', function () {
Swal.fire({
title: "Are you sure?",
text: "Once deleted, you will not be able to recover this imaginary file!",
icon: "warning",
buttons: true,
dangerMode: true,
})
.then((willDelete) => {
if (willDelete) {
Swal.fire("Poof! Your imaginary file has been deleted!", {
icon: "success",
});
} else {
Swal.fire("Your imaginary file is safe!");
}
});
});
$('#custom-buttons').on('click', function () {
Swal.fire("A wild Pikachu appeared! What do you want to do?", {
buttons: {
cancel: "Run away!",
catch: {
text: "Throw Pokéball!",
value: "catch",
},
defeat: true,
},
})
.then((value) => {
switch (value) {
case "defeat":
Swal.fire("Pikachu fainted! You gained 500 XP!");
break;
case "catch":
Swal.fire("Gotcha!", "Pikachu was caught!", "success");
break;
default:
Swal.fire("Got away safely!");
}
});
});
$('#ajax-request').on('click', function () {
Swal.fire({
text: 'Search for a movie. e.g. "La La Land".',
content: "input",
button: {
text: "Search!",
closeModal: false,
},
})
.then(name => {
if (!name) throw null;
return fetch(`https://itunes.apple.com/search?term=${name}&entity=movie`);
})
.then(results => {
return results.json();
})
.then(json => {
const movie = json.results[0];
if (!movie) {
return Swal.fire("No movie was found!");
}
const name = movie.trackName;
const imageURL = movie.artworkUrl100;
Swal.fire({
title: "Top result:",
text: name,
icon: imageURL,
});
})
.catch(err => {
if (err) {
Swal.fire("Oh noes!", "The AJAX request failed!", "error");
} else {
Swal.fire.stopLoading();
Swal.fire.close();
}
});
});
$('#form-input').on('click', function () {
Swal.fire("Write something here:", {
content: "input",
})
.then((value) => {
Swal.fire(`You typed: ${value}`);
});
});
});
-528
View File
@@ -1,528 +0,0 @@
$(function () {
var
$table = $('#tree-table-1'),
rows = $table.find('tr');
rows.each(function (index, row) {
var
$row = $(row),
level = $row.data('level'),
id = $row.data('id'),
$columnName = $row.find('td[data-column="name"]'),
children = $table.find('tr[data-parent="' + id + '"]');
if (children.length) {
var expander = $columnName.prepend('' +
'<span class="treegrid-expander glyphicon glyphicon-chevron-right"></span>' +
'');
children.hide();
expander.on('click', function (e) {
var $target = $(e.target);
if ($target.hasClass('glyphicon-chevron-right')) {
$target
.removeClass('glyphicon-chevron-right')
.addClass('glyphicon-chevron-down');
children.show();
} else {
$target
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
reverseHide($table, $row);
}
});
}
$columnName.prepend('' +
'<span class="treegrid-indent" style="width:' + 15 * level + 'px"></span>' +
'');
});
// Reverse hide all elements
reverseHide = function (table, element) {
var
$element = $(element),
id = $element.data('id'),
children = table.find('tr[data-parent="' + id + '"]');
if (children.length) {
children.each(function (i, e) {
reverseHide(table, e);
});
$element
.find('.glyphicon-chevron-down')
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
children.hide();
}
};
});
// table 2
$(function () {
var
$table = $('#tree-table-2'),
rows = $table.find('tr');
rows.each(function (index, row) {
var
$row = $(row),
level = $row.data('level'),
id = $row.data('id'),
$columnName = $row.find('td[data-column="name"]'),
children = $table.find('tr[data-parent="' + id + '"]');
if (children.length) {
var expander = $columnName.prepend('' +
'<span class="treegrid-expander glyphicon glyphicon-plus"></span>' +
'');
children.hide();
expander.on('click', function (e) {
var $target = $(e.target);
if ($target.hasClass('glyphicon-plus')) {
$target
.removeClass('glyphicon-plus')
.addClass('glyphicon-minus');
children.show();
} else {
$target
.removeClass('glyphicon-minus')
.addClass('glyphicon-plus');
reverseHide($table, $row);
}
});
}
$columnName.prepend('' +
'<span class="treegrid-indent" style="width:' + 15 * level + 'px"></span>' +
'');
});
// Reverse hide all elements
reverseHide = function (table, element) {
var
$element = $(element),
id = $element.data('id'),
children = table.find('tr[data-parent="' + id + '"]');
if (children.length) {
children.each(function (i, e) {
reverseHide(table, e);
});
$element
.find('.glyphicon-chevron-down')
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
children.hide();
}
};
});
// table 3
$(function () {
var
$table = $('#tree-table-3'),
rows = $table.find('tr');
rows.each(function (index, row) {
var
$row = $(row),
level = $row.data('level'),
id = $row.data('id'),
$columnName = $row.find('td[data-column="name"]'),
children = $table.find('tr[data-parent="' + id + '"]');
if (children.length) {
var expander = $columnName.prepend('' +
'<span class="treegrid-expander glyphicon glyphicon-chevron-right"></span>' +
'');
children.hide();
expander.on('click', function (e) {
var $target = $(e.target);
if ($target.hasClass('glyphicon-chevron-right')) {
$target
.removeClass('glyphicon-chevron-right')
.addClass('glyphicon-chevron-down');
children.show();
} else {
$target
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
reverseHide($table, $row);
}
});
}
$columnName.prepend('' +
'<span class="treegrid-indent" style="width:' + 15 * level + 'px"></span>' +
'');
});
// Reverse hide all elements
reverseHide = function (table, element) {
var
$element = $(element),
id = $element.data('id'),
children = table.find('tr[data-parent="' + id + '"]');
if (children.length) {
children.each(function (i, e) {
reverseHide(table, e);
});
$element
.find('.glyphicon-chevron-down')
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
children.hide();
}
};
});
// table 4
$(function () {
var
$table = $('#tree-table-4'),
rows = $table.find('tr');
rows.each(function (index, row) {
var
$row = $(row),
level = $row.data('level'),
id = $row.data('id'),
$columnName = $row.find('td[data-column="name"]'),
children = $table.find('tr[data-parent="' + id + '"]');
if (children.length) {
var expander = $columnName.prepend('' +
'<span class="treegrid-expander glyphicon glyphicon-chevron-right"></span>' +
'');
children.hide();
expander.on('click', function (e) {
var $target = $(e.target);
if ($target.hasClass('glyphicon-chevron-right')) {
$target
.removeClass('glyphicon-chevron-right')
.addClass('glyphicon-chevron-down');
children.show();
} else {
$target
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
reverseHide($table, $row);
}
});
}
$columnName.prepend('' +
'<span class="treegrid-indent" style="width:' + 15 * level + 'px"></span>' +
'');
});
// Reverse hide all elements
reverseHide = function (table, element) {
var
$element = $(element),
id = $element.data('id'),
children = table.find('tr[data-parent="' + id + '"]');
if (children.length) {
children.each(function (i, e) {
reverseHide(table, e);
});
$element
.find('.glyphicon-chevron-down')
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
children.hide();
}
};
});
// table 5
$(function () {
var
$table = $('#tree-table-5'),
rows = $table.find('tr');
rows.each(function (index, row) {
var
$row = $(row),
level = $row.data('level'),
id = $row.data('id'),
$columnName = $row.find('td[data-column="name"]'),
children = $table.find('tr[data-parent="' + id + '"]');
if (children.length) {
var expander = $columnName.prepend('' +
'<span class="treegrid-expander glyphicon glyphicon-chevron-right"></span>' +
'');
children.hide();
expander.on('click', function (e) {
var $target = $(e.target);
if ($target.hasClass('glyphicon-chevron-right')) {
$target
.removeClass('glyphicon-chevron-right')
.addClass('glyphicon-chevron-down');
children.show();
} else {
$target
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
reverseHide($table, $row);
}
});
}
$columnName.prepend('' +
'<span class="treegrid-indent" style="width:' + 15 * level + 'px"></span>' +
'');
});
// Reverse hide all elements
reverseHide = function (table, element) {
var
$element = $(element),
id = $element.data('id'),
children = table.find('tr[data-parent="' + id + '"]');
if (children.length) {
children.each(function (i, e) {
reverseHide(table, e);
});
$element
.find('.glyphicon-chevron-down')
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
children.hide();
}
};
});
// table 6
$(function () {
var
$table = $('#tree-table-6'),
rows = $table.find('tr');
rows.each(function (index, row) {
var
$row = $(row),
level = $row.data('level'),
id = $row.data('id'),
$columnName = $row.find('td[data-column="name"]'),
children = $table.find('tr[data-parent="' + id + '"]');
if (children.length) {
var expander = $columnName.prepend('' +
'<span class="treegrid-expander glyphicon glyphicon-chevron-right"></span>' +
'');
children.hide();
expander.on('click', function (e) {
var $target = $(e.target);
if ($target.hasClass('glyphicon-chevron-right')) {
$target
.removeClass('glyphicon-chevron-right')
.addClass('glyphicon-chevron-down');
children.show();
} else {
$target
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
reverseHide($table, $row);
}
});
}
$columnName.prepend('' +
'<span class="treegrid-indent" style="width:' + 15 * level + 'px"></span>' +
'');
});
// Reverse hide all elements
reverseHide = function (table, element) {
var
$element = $(element),
id = $element.data('id'),
children = table.find('tr[data-parent="' + id + '"]');
if (children.length) {
children.each(function (i, e) {
reverseHide(table, e);
});
$element
.find('.glyphicon-chevron-down')
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
children.hide();
}
};
});
// table 7
$(function () {
var
$table = $('#tree-table-7'),
rows = $table.find('tr');
rows.each(function (index, row) {
var
$row = $(row),
level = $row.data('level'),
id = $row.data('id'),
$columnName = $row.find('td[data-column="name"]'),
children = $table.find('tr[data-parent="' + id + '"]');
if (children.length) {
var expander = $columnName.prepend('' +
'<span class="treegrid-expander glyphicon glyphicon-chevron-right"></span>' +
'');
children.hide();
expander.on('click', function (e) {
var $target = $(e.target);
if ($target.hasClass('glyphicon-chevron-right')) {
$target
.removeClass('glyphicon-chevron-right')
.addClass('glyphicon-chevron-down');
children.show();
} else {
$target
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
reverseHide($table, $row);
}
});
}
$columnName.prepend('' +
'<span class="treegrid-indent" style="width:' + 15 * level + 'px"></span>' +
'');
});
// Reverse hide all elements
reverseHide = function (table, element) {
var
$element = $(element),
id = $element.data('id'),
children = table.find('tr[data-parent="' + id + '"]');
if (children.length) {
children.each(function (i, e) {
reverseHide(table, e);
});
$element
.find('.glyphicon-chevron-down')
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
children.hide();
}
};
});
// table 8
$(function () {
var
$table = $('#tree-table-8'),
rows = $table.find('tr');
rows.each(function (index, row) {
var
$row = $(row),
level = $row.data('level'),
id = $row.data('id'),
$columnName = $row.find('td[data-column="name"]'),
children = $table.find('tr[data-parent="' + id + '"]');
if (children.length) {
var expander = $columnName.prepend('' +
'<span class="treegrid-expander glyphicon glyphicon-chevron-right"></span>' +
'');
children.hide();
expander.on('click', function (e) {
var $target = $(e.target);
if ($target.hasClass('glyphicon-chevron-right')) {
$target
.removeClass('glyphicon-chevron-right')
.addClass('glyphicon-chevron-down');
children.show();
} else {
$target
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
reverseHide($table, $row);
}
});
}
$columnName.prepend('' +
'<span class="treegrid-indent" style="width:' + 15 * level + 'px"></span>' +
'');
});
// Reverse hide all elements
reverseHide = function (table, element) {
var
$element = $(element),
id = $element.data('id'),
children = table.find('tr[data-parent="' + id + '"]');
if (children.length) {
children.each(function (i, e) {
reverseHide(table, e);
});
$element
.find('.glyphicon-chevron-down')
.removeClass('glyphicon-chevron-down')
.addClass('glyphicon-chevron-right');
children.hide();
}
};
});
-82
View File
@@ -1,82 +0,0 @@
$(function () {
/*---------------------------------------------------------------------
Basic Tree
-----------------------------------------------------------------------*/
$('.basic-tree li:has(ul)').addClass('t-parent').find(' > span').attr('title', 'Collapse this branch');
$('.basic-tree li.t-parent > span').on('click', function (e) {
var children = $(this).parent('li.t-parent').find(' > ul > li');
if (children.is(":visible")) {
children.hide('fast');
$(this).attr('title', 'Expand this branch').find(' > i').addClass('fa-plus').removeClass('fa-minus');
} else {
children.show('fast');
$(this).attr('title', 'Collapse this branch').find(' > i').addClass('fa-minus').removeClass('fa-plus');
}
e.stopPropagation();
});
/*---------------------------------------------------------------------
Checkbox Tree
-----------------------------------------------------------------------*/
jQuery('#flex-tree-check').flexTree({
type: 'checkbox',
name: 'foo[]',
collapsed: false,
items: [
{
label: 'Item 1',
childrens: [
{
label: 'Item 1.1',
value: 'item_1_1',
checked: true
},
{
label: 'Item 1.2',
value: 'item_1_2',
childrens: [
{
label: 'Item 1.2.1',
value: 'item_1_2_1',
childrens: [
{
label: 'Item 1.2.2.1',
value: 'item_1_2_2_1'
},
{
label: 'Item 1.2.2.2',
value: 'item_1_2_2_2',
id: 'foo'
}]
},
{
label: 'Item 1.2.2',
value: 'item_1_2_2'
}]
},
{
label: 'Item 1.3',
value: 'item_1_3',
checked: true
}]
},
{
label: 'Item 2',
childrens: [
{
label: 'Item 2.1',
value: 'item_2_1',
checked: true
}]
}]
});
});
@@ -1,488 +0,0 @@
var gdpData = {
"AF": 16.63,
"AL": 11.58,
"DZ": 158.97,
"AO": 85.81,
"AG": 1.1,
"AR": 351.02,
"AM": 8.83,
"AU": 1219.72,
"AT": 366.26,
"AZ": 52.17,
"BS": 7.54,
"BH": 21.73,
"BD": 105.4,
"BB": 3.96,
"BY": 52.89,
"BE": 461.33,
"BZ": 1.43,
"BJ": 6.49,
"BT": 1.4,
"BO": 19.18,
"BA": 16.2,
"BW": 12.5,
"BR": 2023.53,
"BN": 11.96,
"BG": 44.84,
"BF": 8.67,
"BI": 1.47,
"KH": 11.36,
"CM": 21.88,
"CA": 1563.66,
"CV": 1.57,
"CF": 2.11,
"TD": 7.59,
"CL": 199.18,
"CN": 5745.13,
"CO": 283.11,
"KM": 0.56,
"CD": 12.6,
"CG": 11.88,
"CR": 35.02,
"CI": 22.38,
"HR": 59.92,
"CY": 22.75,
"CZ": 195.23,
"DK": 304.56,
"DJ": 1.14,
"DM": 0.38,
"DO": 50.87,
"EC": 61.49,
"EG": 216.83,
"SV": 21.8,
"GQ": 14.55,
"ER": 2.25,
"EE": 19.22,
"ET": 30.94,
"FJ": 3.15,
"FI": 231.98,
"FR": 2555.44,
"GA": 12.56,
"GM": 1.04,
"GE": 11.23,
"DE": 3305.9,
"GH": 18.06,
"GR": 305.01,
"GD": 0.65,
"GT": 40.77,
"GN": 4.34,
"GW": 0.83,
"GY": 2.2,
"HT": 6.5,
"HN": 15.34,
"HK": 226.49,
"HU": 132.28,
"IS": 12.77,
"IN": 1430.02,
"ID": 695.06,
"IR": 337.9,
"IQ": 84.14,
"IE": 204.14,
"IL": 201.25,
"IT": 2036.69,
"JM": 13.74,
"JP": 5390.9,
"JO": 27.13,
"KZ": 129.76,
"KE": 32.42,
"KI": 0.15,
"KR": 986.26,
"UNDEFINED": 5.73,
"KW": 117.32,
"KG": 4.44,
"LA": 6.34,
"LV": 23.39,
"LB": 39.15,
"LS": 1.8,
"LR": 0.98,
"LY": 77.91,
"LT": 35.73,
"LU": 52.43,
"MK": 9.58,
"MG": 8.33,
"MW": 5.04,
"MY": 218.95,
"MV": 1.43,
"ML": 9.08,
"MT": 7.8,
"MR": 3.49,
"MU": 9.43,
"MX": 1004.04,
"MD": 5.36,
"MN": 5.81,
"ME": 3.88,
"MA": 91.7,
"MZ": 10.21,
"MM": 35.65,
"NA": 11.45,
"NP": 15.11,
"NL": 770.31,
"NZ": 138,
"NI": 6.38,
"NE": 5.6,
"NG": 206.66,
"NO": 413.51,
"OM": 53.78,
"PK": 174.79,
"PA": 27.2,
"PG": 8.81,
"PY": 17.17,
"PE": 153.55,
"PH": 189.06,
"PL": 438.88,
"PT": 223.7,
"QA": 126.52,
"RO": 158.39,
"RU": 1476.91,
"RW": 5.69,
"WS": 0.55,
"ST": 0.19,
"SA": 434.44,
"SN": 12.66,
"RS": 38.92,
"SC": 0.92,
"SL": 1.9,
"SG": 217.38,
"SK": 86.26,
"SI": 46.44,
"SB": 0.67,
"ZA": 354.41,
"ES": 1374.78,
"LK": 48.24,
"KN": 0.56,
"LC": 1,
"VC": 0.58,
"SD": 65.93,
"SR": 3.3,
"SZ": 3.17,
"SE": 444.59,
"CH": 522.44,
"SY": 59.63,
"TW": 426.98,
"TJ": 5.58,
"TZ": 22.43,
"TH": 312.61,
"TL": 0.62,
"TG": 3.07,
"TO": 0.3,
"TT": 21.2,
"TN": 43.86,
"TR": 729.05,
"TM": 0,
"UG": 17.12,
"UA": 136.56,
"AE": 239.65,
"GB": 2258.57,
"US": 14624.18,
"UY": 40.71,
"UZ": 37.72,
"VU": 0.72,
"VE": 285.21,
"VN": 101.99,
"YE": 30.02,
"ZM": 15.69,
"ZW": 5.57
};
$(function () {
if(typeof $.fn.vectorMap !== typeof undefined && $('#world-map-gdp1').length > 0){
$('#world-map-gdp1').vectorMap({
map: 'world_mill',
series: {
regions: [{
normalizeFunction: 'polynomial'
}]
},
onRegionTipShow: function (e, el, code) {
el.html(el.html() + ' (GDP - ' + gdpData[code] + ')');
}
});
}
if(typeof $.fn.vectorMap !== typeof undefined && $('#world-map-gdp').length > 0){
$('#world-map-gdp').vectorMap({
map: 'world_mill',
series: {
regions: [{
values: gdpData,
scale: ['#C8EEFF', '#0071A4'],
normalizeFunction: 'polynomial'
}]
},
onRegionTipShow: function (e, el, code) {
el.html(el.html() + ' (GDP - ' + gdpData[code] + ')');
}
});
}
if(typeof $.fn.vectorMap !== typeof undefined && $('#world-map-markers') > 0){
$('#world-map-markers').vectorMap({
map: 'world_mill',
scaleColors: ['#C8EEFF', '#0071A4'],
normalizeFunction: 'polynomial',
hoverOpacity: 0.7,
hoverColor: false,
markerStyle: {
initial: {
fill: '#F8E23B',
stroke: '#383f47'
}
},
backgroundColor: '#383f47',
lines: [
{ points: [[41.90, 12.45], [43.73, 7.41], [-0.52, 166.93]], text: "first road" },
{ points: [[31.52, -87.37], [21.18, -157.49]], text: "second path" }
],
markers: [
{ latLng: [41.90, 12.45], name: 'Vatican City' },
{ latLng: [43.73, 7.41], name: 'Monaco' },
{ latLng: [-0.52, 166.93], name: 'Nauru' },
{ latLng: [-8.51, 179.21], name: 'Tuvalu' },
{ latLng: [43.93, 12.46], name: 'San Marino' },
{ latLng: [47.14, 9.52], name: 'Liechtenstein' },
{ latLng: [7.11, 171.06], name: 'Marshall Islands' },
{ latLng: [17.3, -62.73], name: 'Saint Kitts and Nevis' },
{ latLng: [3.2, 73.22], name: 'Maldives' },
{ latLng: [35.88, 14.5], name: 'Malta' },
{ latLng: [12.05, -61.75], name: 'Grenada' },
{ latLng: [13.16, -61.23], name: 'Saint Vincent and the Grenadines' },
{ latLng: [13.16, -59.55], name: 'Barbados' },
{ latLng: [17.11, -61.85], name: 'Antigua and Barbuda' },
{ latLng: [-4.61, 55.45], name: 'Seychelles' },
{ latLng: [7.35, 134.46], name: 'Palau' },
{ latLng: [42.5, 1.51], name: 'Andorra' },
{ latLng: [14.01, -60.98], name: 'Saint Lucia' },
{ latLng: [6.91, 158.18], name: 'Federated States of Micronesia' },
{ latLng: [1.3, 103.8], name: 'Singapore' },
{ latLng: [1.46, 173.03], name: 'Kiribati' },
{ latLng: [-21.13, -175.2], name: 'Tonga' },
{ latLng: [15.3, -61.38], name: 'Dominica' },
{ latLng: [-20.2, 57.5], name: 'Mauritius' },
{ latLng: [26.02, 50.55], name: 'Bahrain' },
{ latLng: [0.33, 6.73], name: 'São Tomé and Príncipe' }
]
});
}
})
$(function () {
var map,
markers = [
{ latLng: [52.50, 13.39], name: 'Berlin' },
{ latLng: [53.56, 10.00], name: 'Hamburg' },
{ latLng: [48.13, 11.56], name: 'Munich' },
{ latLng: [50.95, 6.96], name: 'Cologne' },
{ latLng: [50.11, 8.68], name: 'Frankfurt am Main' },
{ latLng: [48.77, 9.17], name: 'Stuttgart' },
{ latLng: [51.23, 6.78], name: 'Düsseldorf' },
{ latLng: [51.51, 7.46], name: 'Dortmund' },
{ latLng: [51.45, 7.01], name: 'Essen' },
{ latLng: [53.07, 8.80], name: 'Bremen' }
],
cityAreaData = [
887.70,
755.16,
310.69,
405.17,
248.31,
207.35,
217.22,
280.71,
210.32,
325.42
]
if ($.fn.vectorMap !== undefined && $('#rusia-map').length > 0) {
$('#rusia-map').vectorMap({
map: 'de_merc',
regionsSelectable: true,
markersSelectable: true,
markers: markers,
markerStyle: {
initial: {
fill: '#4DAC26'
},
selected: {
fill: '#CA0020'
}
},
regionStyle: {
initial: {
fill: '#B8E186'
},
selected: {
fill: '#F4A582'
}
},
series: {
markers: [{
attribute: 'r',
scale: [5, 15],
values: cityAreaData
}]
},
onRegionSelected: function () {
if (window.localStorage) {
window.localStorage.setItem(
'jvectormap-selected-regions',
JSON.stringify(map.getSelectedRegions())
);
}
},
onMarkerSelected: function () {
if (window.localStorage) {
window.localStorage.setItem(
'jvectormap-selected-markers',
JSON.stringify(map.getSelectedMarkers())
);
}
}
})
}
});
$(function () {
if ($.fn.vectorMap !== undefined && $('#legend-map').length > 0) {
$('#legend-map').vectorMap({
map: 'us_aea',
markers: [
[61.18, -149.53],
[21.18, -157.49],
[40.66, -73.56],
[41.52, -87.37],
[35.22, -80.84],
[31.52, -87.37]
],
series: {
markers: [{
attribute: 'fill',
scale: ['#C8EEFF', '#0071A4'],
normalizeFunction: 'polynomial',
values: [408, 512, 550, 781],
legend: {
vertical: true
}
}, {
attribute: 'image',
scale: {
bank: '../assets/images/vectormap/icon-bank.png',
factory: '../assets/images/vectormap/icon-factory.png'
},
values: {
'4': 'bank',
'5': 'factory'
},
legend: {
horizontal: true,
cssClass: 'jvectormap-legend-icons',
title: 'Business type'
}
}],
regions: [{
scale: {
red: '#ff0000',
green: '#00ff00'
},
attribute: 'fill',
values: {
"US-KS": 'red',
"US-MO": 'red',
"US-IA": 'green',
"US-NE": 'green'
},
legend: {
horizontal: true,
title: 'Color'
}
}, {
scale: {
redGreen: '../assets/images/vectormap/bg-red-green.png',
yellowBlue: '../assets/images/vectormap/bg-yellow-blue.png'
},
values: {
"US-TX": 'redGreen',
"US-CA": 'yellowBlue'
},
attribute: 'fill',
legend: {
horizontal: true,
cssClass: 'jvectormap-legend-bg',
title: 'Pattern',
labelRender: function (v) {
return {
redGreen: 'low',
yellowBlue: 'high'
}[v];
}
}
}]
}
})
}
});
$(function () {
var plants = [
{ name: 'VAK', coords: [50.0091294, 9.0371812], status: 'closed', offsets: [0, 2] },
{ name: 'MZFR', coords: [49.0543102, 8.4825862], status: 'closed', offsets: [0, 2] },
{ name: 'AVR', coords: [50.9030599, 6.4213693], status: 'closed' },
{ name: 'KKR', coords: [53.1472465, 12.9903674], status: 'closed' },
{ name: 'KRB', coords: [48.513264, 10.4020357], status: 'activeUntil2018' },
{ name: 'KWO', coords: [49.364503, 9.076252], status: 'closed' },
{ name: 'KWL', coords: [52.5331853, 7.2505223], status: 'closed', offsets: [0, -2] },
{ name: 'HDR', coords: [50.1051446, 8.9348691], status: 'closed', offsets: [0, -2] },
{ name: 'KKS', coords: [53.6200685, 9.5306289], status: 'closed' },
{ name: 'KKN', coords: [48.6558015, 12.2500848], status: 'closed', offsets: [0, -2] },
{ name: 'KGR', coords: [54.1417497, 13.6583877], status: 'closed' },
{ name: 'KWB', coords: [49.709331, 8.415865], status: 'closed' },
{ name: 'KWW', coords: [51.6396481, 9.3915617], status: 'closed' },
{ name: 'GKN', coords: [49.0401151, 9.1721088], status: 'activeUntil2022' },
{ name: 'KKB', coords: [53.8913533, 9.2005777], status: 'closed', offsets: [0, -5] },
{ name: 'KKI', coords: [48.5544748, 12.3472095], status: 'activeUntil2022', offsets: [0, 2] },
{ name: 'KKU', coords: [53.4293465, 8.4774649], status: 'closed' },
{ name: 'KNK', coords: [49.1473279, 8.3827739], status: 'closed' },
{ name: 'KKP', coords: [49.2513078, 8.4356761], status: 'activeUntil2022', offsets: [0, -2] },
{ name: 'KKG', coords: [49.9841308, 10.1846373], status: 'activeUntil2018' },
{ name: 'KKK', coords: [53.4104656, 10.4091597], status: 'closed' },
{ name: 'KWG', coords: [52.0348748, 9.4097793], status: 'activeUntil2022' },
{ name: 'KBR', coords: [53.850666, 9.3457603], status: 'closed', offsets: [0, 5] },
{ name: 'KMK', coords: [50.408791, 7.4861956], status: 'closed' },
{ name: 'THTR', coords: [51.6786228, 7.9700232], status: 'closed' },
{ name: 'KKE', coords: [52.4216974, 7.3706389], status: 'activeUntil2022', offsets: [0, 2] }
];
if ($.fn.vectorMap !== undefined && $('#icon-map').length > 0) {
$('#icon-map').vectorMap({
map: 'de_merc',
markers: plants.map(function (h) { return { name: h.name, latLng: h.coords } }),
labels: {
markers: {
render: function (index) {
return plants[index].name;
},
offsets: function (index) {
var offset = plants[index]['offsets'] || [0, 0];
return [offset[0] - 7, offset[1] + 3];
}
}
},
series: {
markers: [{
attribute: 'image',
scale: {
'closed': '../assets/images/vectormap/icon-np-3.png',
'activeUntil2018': '../assets/images/vectormap/icon-np-2.png',
'activeUntil2022': '../assets/images/vectormap/icon-np-1.png'
},
values: plants.reduce(function (p, c, i) { p[i] = c.status; return p }, {}),
legend: {
horizontal: true,
title: 'Nuclear power station status',
labelRender: function (v) {
return {
closed: 'Closed',
activeUntil2018: 'Scheduled for shut down<br> before 2018',
activeUntil2022: 'Scheduled for shut down<br> before 2022'
}[v];
}
}
}]
}
})
}
});
Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB