download all files

This commit is contained in:
Roman Pyrih
2025-06-24 14:14:35 +02:00
parent ebed09c00b
commit 4c71b5d9c2
72007 changed files with 10407727 additions and 40029 deletions

View File

@@ -0,0 +1,67 @@
.maxwidth10rem {
max-width: 10rem;
}
span.cron_url {
border: 1px solid #ccc;
border-radius: 3px;
padding: 3px;
margin: 5px;
font-family: monospace;
background-color: #eee;
}
#beforeAfterSlider {
border: 1px solid #aaa;
border-radius: 4px;
}
.reportHead {
padding: 4px 4px 4px 2rem !important;
}
.bootstrap .reportHead.alert.alert-success,
.bootstrap .reportHead.alert.alert-warning {
border-radius: 0;
}
.bootstrap .reportHead.alert.alert-success::before,
.bootstrap .reportHead.alert.alert-warning::before {
top: 2px;
left: 0.5rem;
}
.adminjprestawebpconfiguration .collapse, .adminjprestawebpconfiguration .collapsing {
}
.adminjprestawebpconfiguration .report {
font-family: monospace;
border: 1px solid #ccc;
border-top: none !important;
background-color: #ddd;
margin: 0 0 5px 0;
border-radius: 0 3px;
padding: 5px;
color: #363a41;
}
.adminjprestawebpconfiguration .reportHead {
margin-bottom: 0 !important;
border-bottom: 1px solid #ccc !important;
margin-top: 3px !important;
}
.adminjprestawebpconfiguration label .alert {
margin-bottom: 3px;
}
.adminjprestawebpconfiguration .btntoggle {
margin: 0 5px;
font-size: 0.8rem;
}
.adminjprestawebpconfiguration .btntoggle.collapsed {
}
.pre {
font-family: monospace;
}
.pre .log_error {
color: red;
font-weight: bold;
}
h4 {
text-transform: uppercase;
border-bottom: 1px solid #eee;
padding-bottom: 5px;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
.lazyload, .lazyloading {
padding: 30% !important;
}

View File

@@ -0,0 +1,93 @@
/* Reset styles for #pagecache_stats */
#pagecache_stats, #pagecache_stats *, #pagecache_stats a:hover, #pagecache_stats a:visited, #pagecache_stats a:active {
background: none;
border: none;
bottom: auto;
clear: none;
cursor: default;
/* didn't really know what the default for display should be*/
/*display:inline;*/
float: none;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-style: normal;
height: auto;
left: auto;
letter-spacing: normal;
line-height: normal;
max-height: none;
max-width: none;
min-height: 0;
min-width: 0;
overflow: visible;
position: static;
right: auto;
text-align: left;
text-decoration: none;
text-indent: 0;
text-transform: none;
top: auto;
visibility: visible;
white-space: normal;
width: auto;
z-index: auto;
}
#pagecache_stats td, #pagecache_stats th {
padding: 2px 5px;
}
#pagecache_stats td:first-child {
font-weight: bold;
color: #777;
}
#pagecache_stats thead th {
color: black;
padding: 3px;
text-align: left;
font-size: 17px;
font-weight: bold;
background-color: #777;
line-height: 24px;
}
#pagecache_stats .pcadv {
display: none;
}
#pagecache_stats {
width: 33%;
float: left;
z-index: 10000;
margin: 5px;
position: fixed;
bottom: 15px;
color: white;
background-color: black !important;
opacity: 0.9;
filter: alpha(opacity=90);
border: 1px black solid;
border-radius: 5px 5px 0 0;
}
#pagecache_stats pre {
color: white;
}
#pagecache_stats:hover {
opacity: 1;
filter: alpha(opacity=100);
}
#pagecache_stats tr:hover {
background-color: #222;
}
#pagecache_stats .pcactions {
display: inline;
float: right;
}
#pagecache_stats a:hover, #pagecache_stats a:visited, #pagecache_stats a:active,
#pagecache_stats a:hover img, #pagecache_stats a:visited img, #pagecache_stats a:active img {
cursor: pointer;
}

View File

@@ -0,0 +1,206 @@
.twentytwenty-horizontal .twentytwenty-handle:before, .twentytwenty-horizontal .twentytwenty-handle:after, .twentytwenty-vertical .twentytwenty-handle:before, .twentytwenty-vertical .twentytwenty-handle:after {
content: " ";
display: block;
background: white;
position: absolute;
z-index: 30;
-webkit-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
-moz-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5); }
.twentytwenty-horizontal .twentytwenty-handle:before, .twentytwenty-horizontal .twentytwenty-handle:after {
width: 3px;
height: 9999px;
left: 50%;
margin-left: -1.5px; }
.twentytwenty-vertical .twentytwenty-handle:before, .twentytwenty-vertical .twentytwenty-handle:after {
width: 9999px;
height: 3px;
top: 50%;
margin-top: -1.5px; }
.twentytwenty-before-label, .twentytwenty-after-label, .twentytwenty-overlay {
position: absolute;
top: 0;
width: 100%;
height: 100%; }
.twentytwenty-before-label, .twentytwenty-after-label, .twentytwenty-overlay {
-webkit-transition-duration: 0.5s;
-moz-transition-duration: 0.5s;
transition-duration: 0.5s; }
.twentytwenty-before-label, .twentytwenty-after-label {
-webkit-transition-property: opacity;
-moz-transition-property: opacity;
transition-property: opacity; }
.twentytwenty-before-label:before, .twentytwenty-after-label:before {
color: white;
font-size: 13px;
letter-spacing: 0.1em; }
.twentytwenty-before-label:before, .twentytwenty-after-label:before {
position: absolute;
background: rgba(255, 255, 255, 0.2);
line-height: 38px;
padding: 0 20px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px; }
.twentytwenty-horizontal .twentytwenty-before-label:before, .twentytwenty-horizontal .twentytwenty-after-label:before {
top: 50%;
margin-top: -19px; }
.twentytwenty-vertical .twentytwenty-before-label:before, .twentytwenty-vertical .twentytwenty-after-label:before {
left: 50%;
margin-left: -45px;
text-align: center;
width: 90px; }
.twentytwenty-left-arrow, .twentytwenty-right-arrow, .twentytwenty-up-arrow, .twentytwenty-down-arrow {
width: 0;
height: 0;
border: 6px inset transparent;
position: absolute; }
.twentytwenty-left-arrow, .twentytwenty-right-arrow {
top: 50%;
margin-top: -6px; }
.twentytwenty-up-arrow, .twentytwenty-down-arrow {
left: 50%;
margin-left: -6px; }
.twentytwenty-container {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
z-index: 0;
overflow: hidden;
position: relative;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none; }
.twentytwenty-container img {
max-width: 100%;
position: absolute;
top: 0;
display: block; }
.twentytwenty-container.active .twentytwenty-overlay, .twentytwenty-container.active :hover.twentytwenty-overlay {
background: rgba(0, 0, 0, 0); }
.twentytwenty-container.active .twentytwenty-overlay .twentytwenty-before-label,
.twentytwenty-container.active .twentytwenty-overlay .twentytwenty-after-label, .twentytwenty-container.active :hover.twentytwenty-overlay .twentytwenty-before-label,
.twentytwenty-container.active :hover.twentytwenty-overlay .twentytwenty-after-label {
opacity: 0; }
.twentytwenty-container * {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box; }
.twentytwenty-before-label {
opacity: 0; }
.twentytwenty-before-label:before {
content: attr(data-content); }
.twentytwenty-after-label {
opacity: 0; }
.twentytwenty-after-label:before {
content: attr(data-content); }
.twentytwenty-horizontal .twentytwenty-before-label:before {
left: 10px; }
.twentytwenty-horizontal .twentytwenty-after-label:before {
right: 10px; }
.twentytwenty-vertical .twentytwenty-before-label:before {
top: 10px; }
.twentytwenty-vertical .twentytwenty-after-label:before {
bottom: 10px; }
.twentytwenty-overlay {
-webkit-transition-property: background;
-moz-transition-property: background;
transition-property: background;
background: rgba(0, 0, 0, 0);
z-index: 25; }
.twentytwenty-overlay:hover {
background: rgba(0, 0, 0, 0.5); }
.twentytwenty-overlay:hover .twentytwenty-after-label {
opacity: 1; }
.twentytwenty-overlay:hover .twentytwenty-before-label {
opacity: 1; }
.twentytwenty-before {
z-index: 20; }
.twentytwenty-after {
z-index: 10; }
.twentytwenty-handle {
height: 38px;
width: 38px;
position: absolute;
left: 50%;
top: 50%;
margin-left: -22px;
margin-top: -22px;
border: 3px solid white;
-webkit-border-radius: 1000px;
-moz-border-radius: 1000px;
border-radius: 1000px;
-webkit-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
-moz-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
z-index: 40;
cursor: pointer; }
.twentytwenty-horizontal .twentytwenty-handle:before {
bottom: 50%;
margin-bottom: 22px;
-webkit-box-shadow: 0 3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
-moz-box-shadow: 0 3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
box-shadow: 0 3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); }
.twentytwenty-horizontal .twentytwenty-handle:after {
top: 50%;
margin-top: 22px;
-webkit-box-shadow: 0 -3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
-moz-box-shadow: 0 -3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
box-shadow: 0 -3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); }
.twentytwenty-vertical .twentytwenty-handle:before {
left: 50%;
margin-left: 22px;
-webkit-box-shadow: 3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
-moz-box-shadow: 3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
box-shadow: 3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); }
.twentytwenty-vertical .twentytwenty-handle:after {
right: 50%;
margin-right: 22px;
-webkit-box-shadow: -3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
-moz-box-shadow: -3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
box-shadow: -3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); }
.twentytwenty-left-arrow {
border-right: 6px solid white;
left: 50%;
margin-left: -17px; }
.twentytwenty-right-arrow {
border-left: 6px solid white;
right: 50%;
margin-right: -17px; }
.twentytwenty-up-arrow {
border-bottom: 6px solid white;
top: 50%;
margin-top: -17px; }
.twentytwenty-down-arrow {
border-top: 6px solid white;
bottom: 50%;
margin-bottom: -17px; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 961 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="48px" height="6px" viewBox="0 0 128 16" xml:space="preserve"><path fill="#949494" d="M6.4,4.8A3.2,3.2,0,1,1,3.2,8,3.2,3.2,0,0,1,6.4,4.8Zm12.8,0A3.2,3.2,0,1,1,16,8,3.2,3.2,0,0,1,19.2,4.8ZM32,4.8A3.2,3.2,0,1,1,28.8,8,3.2,3.2,0,0,1,32,4.8Zm12.8,0A3.2,3.2,0,1,1,41.6,8,3.2,3.2,0,0,1,44.8,4.8Zm12.8,0A3.2,3.2,0,1,1,54.4,8,3.2,3.2,0,0,1,57.6,4.8Zm12.8,0A3.2,3.2,0,1,1,67.2,8,3.2,3.2,0,0,1,70.4,4.8Zm12.8,0A3.2,3.2,0,1,1,80,8,3.2,3.2,0,0,1,83.2,4.8ZM96,4.8A3.2,3.2,0,1,1,92.8,8,3.2,3.2,0,0,1,96,4.8Zm12.8,0A3.2,3.2,0,1,1,105.6,8,3.2,3.2,0,0,1,108.8,4.8Zm12.8,0A3.2,3.2,0,1,1,118.4,8,3.2,3.2,0,0,1,121.6,4.8Z"/><g><path fill="#000" d="M-42.7,3.84A4.16,4.16,0,0,1-38.54,8a4.16,4.16,0,0,1-4.16,4.16A4.16,4.16,0,0,1-46.86,8,4.16,4.16,0,0,1-42.7,3.84Zm12.8-.64A4.8,4.8,0,0,1-25.1,8a4.8,4.8,0,0,1-4.8,4.8A4.8,4.8,0,0,1-34.7,8,4.8,4.8,0,0,1-29.9,3.2Zm12.8-.64A5.44,5.44,0,0,1-11.66,8a5.44,5.44,0,0,1-5.44,5.44A5.44,5.44,0,0,1-22.54,8,5.44,5.44,0,0,1-17.1,2.56Z"/><animateTransform attributeName="transform" type="translate" values="23 0;36 0;49 0;62 0;74.5 0;87.5 0;100 0;113 0;125.5 0;138.5 0;151.5 0;164.5 0;178 0" calcMode="discrete" dur="1170ms" repeatCount="indefinite"/></g></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,205 @@
/*
* countUp.js
* by @inorganik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* @author @inorganik
* @copyright Jamie Perkins
* @license The MIT License (MIT)
*
*/
// target = id of html element or var of previously selected html element where counting occurs
// startVal = the value you want to begin at
// endVal = the value you want to arrive at
// decimals = number of decimal places, default 0
// duration = duration of animation in seconds, default 2
// options = optional object of options (see below)
var CountUp = function(target, startVal, endVal, decimals, duration, options) {
// make sure requestAnimationFrame and cancelAnimationFrame are defined
// polyfill for browsers without native support
// by Opera engineer Erik Möller
var lastTime = 0;
var vendors = ['webkit', 'moz', 'ms', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
window.cancelAnimationFrame =
window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
}
if (!window.requestAnimationFrame) {
window.requestAnimationFrame = function(callback, element) {
var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
var id = window.setTimeout(function() { callback(currTime + timeToCall); },
timeToCall);
lastTime = currTime + timeToCall;
return id;
};
}
if (!window.cancelAnimationFrame) {
window.cancelAnimationFrame = function(id) {
clearTimeout(id);
};
}
var self = this;
// default options
self.options = {
useEasing : true, // toggle easing
useGrouping : true, // 1,000,000 vs 1000000
separator : ',', // character to use as a separator
decimal : '.', // character to use as a decimal
easingFn: null, // optional custom easing closure function, default is Robert Penner's easeOutExpo
formattingFn: null // optional custom formatting function, default is self.formatNumber below
};
// extend default options with passed options object
for (var key in options) {
if (options.hasOwnProperty(key)) {
self.options[key] = options[key];
}
}
if (self.options.separator === '') { self.options.useGrouping = false; }
if (!self.options.prefix) self.options.prefix = '';
if (!self.options.suffix) self.options.suffix = '';
self.d = (typeof target === 'string') ? document.getElementById(target) : target;
self.startVal = Number(startVal);
self.endVal = Number(endVal);
self.countDown = (self.startVal > self.endVal);
self.frameVal = self.startVal;
self.decimals = Math.max(0, decimals || 0);
self.dec = Math.pow(10, self.decimals);
self.duration = Number(duration) * 1000 || 2000;
self.formatNumber = function(nStr) {
nStr = nStr.toFixed(self.decimals);
nStr += '';
var x, x1, x2, rgx;
x = nStr.split('.');
x1 = x[0];
x2 = x.length > 1 ? self.options.decimal + x[1] : '';
rgx = /(\d+)(\d{3})/;
if (self.options.useGrouping) {
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + self.options.separator + '$2');
}
}
return self.options.prefix + x1 + x2 + self.options.suffix;
};
// Robert Penner's easeOutExpo
self.easeOutExpo = function(t, b, c, d) {
return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b;
};
self.easingFn = self.options.easingFn ? self.options.easingFn : self.easeOutExpo;
self.formattingFn = self.options.formattingFn ? self.options.formattingFn : self.formatNumber;
self.version = function () { return '1.7.1'; };
// Print value to target
self.printValue = function(value) {
var result = self.formattingFn(value);
if (self.d.tagName === 'INPUT') {
this.d.value = result;
}
else if (self.d.tagName === 'text' || self.d.tagName === 'tspan') {
this.d.textContent = result;
}
else {
this.d.innerHTML = result;
}
};
self.count = function(timestamp) {
if (!self.startTime) { self.startTime = timestamp; }
self.timestamp = timestamp;
var progress = timestamp - self.startTime;
self.remaining = self.duration - progress;
// to ease or not to ease
if (self.options.useEasing) {
if (self.countDown) {
self.frameVal = self.startVal - self.easingFn(progress, 0, self.startVal - self.endVal, self.duration);
} else {
self.frameVal = self.easingFn(progress, self.startVal, self.endVal - self.startVal, self.duration);
}
} else {
if (self.countDown) {
self.frameVal = self.startVal - ((self.startVal - self.endVal) * (progress / self.duration));
} else {
self.frameVal = self.startVal + (self.endVal - self.startVal) * (progress / self.duration);
}
}
// don't go past endVal since progress can exceed duration in the last frame
if (self.countDown) {
self.frameVal = (self.frameVal < self.endVal) ? self.endVal : self.frameVal;
} else {
self.frameVal = (self.frameVal > self.endVal) ? self.endVal : self.frameVal;
}
// decimal
self.frameVal = Math.round(self.frameVal*self.dec)/self.dec;
// format and print value
self.printValue(self.frameVal);
// whether to continue
if (progress < self.duration) {
self.rAF = requestAnimationFrame(self.count);
} else {
if (self.callback) { self.callback(); }
}
};
// start your animation
self.start = function(callback) {
self.callback = callback;
self.rAF = requestAnimationFrame(self.count);
return false;
};
// toggles pause/resume animation
self.pauseResume = function() {
if (!self.paused) {
self.paused = true;
cancelAnimationFrame(self.rAF);
} else {
self.paused = false;
delete self.startTime;
self.duration = self.remaining;
self.startVal = self.frameVal;
requestAnimationFrame(self.count);
}
};
// reset to startVal so animation can be run again
self.reset = function() {
self.paused = false;
delete self.startTime;
self.startVal = startVal;
cancelAnimationFrame(self.rAF);
self.printValue(self.startVal);
};
// pass a new endVal and start animation
self.update = function (newEndVal) {
cancelAnimationFrame(self.rAF);
self.paused = false;
delete self.startTime;
self.startVal = self.frameVal;
self.endVal = Number(newEndVal);
self.countDown = (self.startVal > self.endVal);
self.rAF = requestAnimationFrame(self.count);
};
// format startVal on initialization
self.printValue(self.startVal);
};

View File

@@ -0,0 +1,45 @@
/*
* Buttons for DataTables 1.6.2
* @author SpryMedia Ltd
* @copyright SpryMedia Ltd
* @license MIT license: datatables.net/license
*/
(function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(v){return d(v,window,document)}):"object"===typeof exports?module.exports=function(v,u){v||(v=window);u&&u.fn.dataTable||(u=require("datatables.net")(v,u).$);return d(u,v,v.document)}:d(jQuery,window,document)})(function(d,v,u,n){function y(a,b,c){d.fn.animate?a.stop().fadeIn(b,c):(a.css("display","block"),c&&c.call(a))}function z(a,b,c){d.fn.animate?a.stop().fadeOut(b,c):(a.css("display","none"),c&&c.call(a))}
function B(a,b){a=new m.Api(a);b=b?b:a.init().buttons||m.defaults.buttons;return(new r(a,b)).container()}var m=d.fn.dataTable,E=0,F=0,q=m.ext.buttons,r=function(a,b){if(!(this instanceof r))return function(b){return(new r(b,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});d.isArray(b)&&(b={buttons:b});this.c=d.extend(!0,{},r.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new m.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+E++};this.dom={container:d("<"+this.c.dom.container.tag+
"/>").addClass(this.c.dom.container.className)};this._constructor()};d.extend(r.prototype,{action:function(a,b){a=this._nodeToButton(a);if(b===n)return a.conf.action;a.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a);a=this.c.dom.button.active;c=d(c.node);if(b===n)return c.hasClass(a);c.toggleClass(a,b===n?!0:b);return this},add:function(a,b){var c=this.s.buttons;if("string"===typeof b){b=b.split("-");var e=this.s;c=0;for(var d=b.length-1;c<d;c++)e=e.buttons[1*b[c]];c=e.buttons;
b=1*b[b.length-1]}this._expandButton(c,a,e!==n,b);this._draw();return this},container:function(){return this.dom.container},disable:function(a){a=this._nodeToButton(a);d(a.node).addClass(this.c.dom.button.disabled).attr("disabled",!0);return this},destroy:function(){d("body").off("keyup."+this.s.namespace);var a=this.s.buttons.slice(),b;var c=0;for(b=a.length;c<b;c++)this.remove(a[c].node);this.dom.container.remove();a=this.s.dt.settings()[0];c=0;for(b=a.length;c<b;c++)if(a.inst===this){a.splice(c,
1);break}return this},enable:function(a,b){if(!1===b)return this.disable(a);a=this._nodeToButton(a);d(a.node).removeClass(this.c.dom.button.disabled).removeAttr("disabled");return this},name:function(){return this.c.name},node:function(a){if(!a)return this.dom.container;a=this._nodeToButton(a);return d(a.node)},processing:function(a,b){var c=this.s.dt,e=this._nodeToButton(a);if(b===n)return d(e.node).hasClass("processing");d(e.node).toggleClass("processing",b);d(c.table().node()).triggerHandler("buttons-processing.dt",
[b,c.button(a),c,d(a),e.conf]);return this},remove:function(a){var b=this._nodeToButton(a),c=this._nodeToHost(a),e=this.s.dt;if(b.buttons.length)for(var g=b.buttons.length-1;0<=g;g--)this.remove(b.buttons[g].node);b.conf.destroy&&b.conf.destroy.call(e.button(a),e,d(a),b.conf);this._removeKey(b.conf);d(b.node).remove();a=d.inArray(b,c);c.splice(a,1);return this},text:function(a,b){var c=this._nodeToButton(a);a=this.c.dom.collection.buttonLiner;a=c.inCollection&&a&&a.tag?a.tag:this.c.dom.buttonLiner.tag;
var e=this.s.dt,g=d(c.node),f=function(a){return"function"===typeof a?a(e,g,c.conf):a};if(b===n)return f(c.conf.text);c.conf.text=b;a?g.children(a).html(f(b)):g.html(f(b));return this},_constructor:function(){var a=this,b=this.s.dt,c=b.settings()[0],e=this.c.buttons;c._buttons||(c._buttons=[]);c._buttons.push({inst:this,name:this.c.name});for(var g=0,f=e.length;g<f;g++)this.add(e[g]);b.on("destroy",function(b,e){e===c&&a.destroy()});d("body").on("keyup."+this.s.namespace,function(b){if(!u.activeElement||
u.activeElement===u.body){var c=String.fromCharCode(b.keyCode).toLowerCase();-1!==a.s.listenKeys.toLowerCase().indexOf(c)&&a._keypress(c,b)}})},_addKey:function(a){a.key&&(this.s.listenKeys+=d.isPlainObject(a.key)?a.key.key:a.key)},_draw:function(a,b){a||(a=this.dom.container,b=this.s.buttons);a.children().detach();for(var c=0,e=b.length;c<e;c++)a.append(b[c].inserter),a.append(" "),b[c].buttons&&b[c].buttons.length&&this._draw(b[c].collection,b[c].buttons)},_expandButton:function(a,b,c,e){var g=
this.s.dt,f=0;b=d.isArray(b)?b:[b];for(var k=0,h=b.length;k<h;k++){var t=this._resolveExtends(b[k]);if(t)if(d.isArray(t))this._expandButton(a,t,c,e);else{var l=this._buildButton(t,c);l&&(e!==n&&null!==e?(a.splice(e,0,l),e++):a.push(l),l.conf.buttons&&(l.collection=d("<"+this.c.dom.collection.tag+"/>"),l.conf._collection=l.collection,this._expandButton(l.buttons,l.conf.buttons,!0,e)),t.init&&t.init.call(g.button(l.node),g,d(l.node),t),f++)}}},_buildButton:function(a,b){var c=this.c.dom.button,e=this.c.dom.buttonLiner,
g=this.c.dom.collection,f=this.s.dt,k=function(b){return"function"===typeof b?b(f,l,a):b};b&&g.button&&(c=g.button);b&&g.buttonLiner&&(e=g.buttonLiner);if(a.available&&!a.available(f,a))return!1;var h=function(a,b,c,e){e.action.call(b.button(c),a,b,c,e);d(b.table().node()).triggerHandler("buttons-action.dt",[b.button(c),b,c,e])};g=a.tag||c.tag;var t=a.clickBlurs===n?!0:a.clickBlurs,l=d("<"+g+"/>").addClass(c.className).attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",
function(b){b.preventDefault();!l.hasClass(c.disabled)&&a.action&&h(b,f,l,a);t&&l.trigger("blur")}).on("keyup.dtb",function(b){13===b.keyCode&&!l.hasClass(c.disabled)&&a.action&&h(b,f,l,a)});"a"===g.toLowerCase()&&l.attr("href","#");"button"===g.toLowerCase()&&l.attr("type","button");e.tag?(g=d("<"+e.tag+"/>").html(k(a.text)).addClass(e.className),"a"===e.tag.toLowerCase()&&g.attr("href","#"),l.append(g)):l.html(k(a.text));!1===a.enabled&&l.addClass(c.disabled);a.className&&l.addClass(a.className);
a.titleAttr&&l.attr("title",k(a.titleAttr));a.attr&&l.attr(a.attr);a.namespace||(a.namespace=".dt-button-"+F++);e=(e=this.c.dom.buttonContainer)&&e.tag?d("<"+e.tag+"/>").addClass(e.className).append(l):l;this._addKey(a);this.c.buttonCreated&&(e=this.c.buttonCreated(a,e));return{conf:a,node:l.get(0),inserter:e,buttons:[],inCollection:b,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,e=b.length;c<e;c++){if(b[c].node===a)return b[c];if(b[c].buttons.length){var d=this._nodeToButton(a,
b[c].buttons);if(d)return d}}},_nodeToHost:function(a,b){b||(b=this.s.buttons);for(var c=0,e=b.length;c<e;c++){if(b[c].node===a)return b;if(b[c].buttons.length){var d=this._nodeToHost(a,b[c].buttons);if(d)return d}}},_keypress:function(a,b){if(!b._buttonsHandled){var c=function(e){for(var g=0,f=e.length;g<f;g++){var k=e[g].conf,h=e[g].node;k.key&&(k.key===a?(b._buttonsHandled=!0,d(h).click()):!d.isPlainObject(k.key)||k.key.key!==a||k.key.shiftKey&&!b.shiftKey||k.key.altKey&&!b.altKey||k.key.ctrlKey&&
!b.ctrlKey||k.key.metaKey&&!b.metaKey||(b._buttonsHandled=!0,d(h).click()));e[g].buttons.length&&c(e[g].buttons)}};c(this.s.buttons)}},_removeKey:function(a){if(a.key){var b=d.isPlainObject(a.key)?a.key.key:a.key;a=this.s.listenKeys.split("");b=d.inArray(b,a);a.splice(b,1);this.s.listenKeys=a.join("")}},_resolveExtends:function(a){var b=this.s.dt,c,e=function(c){for(var e=0;!d.isPlainObject(c)&&!d.isArray(c);){if(c===n)return;if("function"===typeof c){if(c=c(b,a),!c)return!1}else if("string"===typeof c){if(!q[c])throw"Unknown button type: "+
c;c=q[c]}e++;if(30<e)throw"Buttons: Too many iterations";}return d.isArray(c)?c:d.extend({},c)};for(a=e(a);a&&a.extend;){if(!q[a.extend])throw"Cannot extend unknown button type: "+a.extend;var g=e(q[a.extend]);if(d.isArray(g))return g;if(!g)return!1;var f=g.className;a=d.extend({},g,a);f&&a.className!==f&&(a.className=f+" "+a.className);var k=a.postfixButtons;if(k){a.buttons||(a.buttons=[]);f=0;for(c=k.length;f<c;f++)a.buttons.push(k[f]);a.postfixButtons=null}if(k=a.prefixButtons){a.buttons||(a.buttons=
[]);f=0;for(c=k.length;f<c;f++)a.buttons.splice(f,0,k[f]);a.prefixButtons=null}a.extend=g.extend}return a},_popover:function(a,b,c){var e=this.c,g=d.extend({align:"button-left",autoClose:!1,background:!0,backgroundClassName:"dt-button-background",contentClassName:e.dom.collection.className,collectionLayout:"",collectionTitle:"",dropup:!1,fade:400,rightAlignClassName:"dt-button-right",tag:e.dom.collection.tag},c),f=b.node(),k=function(){z(d(".dt-button-collection"),g.fade,function(){d(this).detach()});
d(b.buttons('[aria-haspopup="true"][aria-expanded="true"]').nodes()).attr("aria-expanded","false");d("div.dt-button-background").off("click.dtb-collection");r.background(!1,g.backgroundClassName,g.fade,f);d("body").off(".dtb-collection");b.off("buttons-action.b-internal")};!1===a&&k();c=d(b.buttons('[aria-haspopup="true"][aria-expanded="true"]').nodes());c.length&&(f=c.eq(0),k());c=d("<div/>").addClass("dt-button-collection").addClass(g.collectionLayout).css("display","none");a=d(a).addClass(g.contentClassName).attr("role",
"menu").appendTo(c);f.attr("aria-expanded","true");f.parents("body")[0]!==u.body&&(f=u.body.lastChild);g.collectionTitle&&c.prepend('<div class="dt-button-collection-title">'+g.collectionTitle+"</div>");y(c.insertAfter(f));var h=d(b.table().container());e=c.css("position");"dt-container"===g.align&&(f=f.parent(),c.css("width",h.width()));if("absolute"===e){e=f.position();c.css({top:e.top+f.outerHeight(),left:e.left});var t=c.outerHeight();c.outerWidth();var l=h.offset().top+h.height();l=e.top+f.outerHeight()+
t-l;var p=e.top-t,w=h.offset().top;e=e.top-t-5;(l>w-p||g.dropup)&&-e<w&&c.css("top",e);e=h.offset().left;h=h.width();h=e+h;t=c.offset().left;l=c.width();l=t+l;p=f.offset().left;w=f.outerWidth();w=p+w;p=0;c.hasClass(g.rightAlignClassName)||"button-right"===g.align?(p=w-l,e>t+p&&(e-=t+p,h-=l+p,p=e>h?p+h:p+e)):(p=e-t,h<l+p&&(e-=t+p,h-=l+p,p=e>h?p+h:p+e));c.css("left",c.position().left+p)}else e=c.height()/2,e>d(v).height()/2&&(e=d(v).height()/2),c.css("marginTop",-1*e);g.background&&r.background(!0,
g.backgroundClassName,g.fade,f);d("div.dt-button-background").on("click.dtb-collection",function(){});d("body").on("click.dtb-collection",function(b){var c=d.fn.addBack?"addBack":"andSelf";d(b.target).parents()[c]().filter(a).length||k()}).on("keyup.dtb-collection",function(a){27===a.keyCode&&k()});g.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal",function(a,b,c,e){e[0]!==f[0]&&k()})},0);d(c).trigger("buttons-popover.dt")}});r.background=function(a,b,c,e){c===n&&(c=400);e||(e=u.body);
a?y(d("<div/>").addClass(b).css("display","none").insertAfter(e),c):z(d("div."+b),c,function(){d(this).removeClass(b).remove()})};r.instanceSelector=function(a,b){if(a===n||null===a)return d.map(b,function(a){return a.inst});var c=[],e=d.map(b,function(a){return a.name}),g=function(a){if(d.isArray(a))for(var f=0,h=a.length;f<h;f++)g(a[f]);else"string"===typeof a?-1!==a.indexOf(",")?g(a.split(",")):(a=d.inArray(d.trim(a),e),-1!==a&&c.push(b[a].inst)):"number"===typeof a&&c.push(b[a].inst)};g(a);return c};
r.buttonSelector=function(a,b){for(var c=[],e=function(a,b,c){for(var d,g,f=0,h=b.length;f<h;f++)if(d=b[f])g=c!==n?c+f:f+"",a.push({node:d.node,name:d.conf.name,idx:g}),d.buttons&&e(a,d.buttons,g+"-")},g=function(a,b){var f,k=[];e(k,b.s.buttons);var h=d.map(k,function(a){return a.node});if(d.isArray(a)||a instanceof d)for(h=0,f=a.length;h<f;h++)g(a[h],b);else if(null===a||a===n||"*"===a)for(h=0,f=k.length;h<f;h++)c.push({inst:b,node:k[h].node});else if("number"===typeof a)c.push({inst:b,node:b.s.buttons[a].node});
else if("string"===typeof a)if(-1!==a.indexOf(","))for(k=a.split(","),h=0,f=k.length;h<f;h++)g(d.trim(k[h]),b);else if(a.match(/^\d+(\-\d+)*$/))h=d.map(k,function(a){return a.idx}),c.push({inst:b,node:k[d.inArray(a,h)].node});else if(-1!==a.indexOf(":name"))for(a=a.replace(":name",""),h=0,f=k.length;h<f;h++)k[h].name===a&&c.push({inst:b,node:k[h].node});else d(h).filter(a).each(function(){c.push({inst:b,node:this})});else"object"===typeof a&&a.nodeName&&(k=d.inArray(a,h),-1!==k&&c.push({inst:b,node:h[k]}))},
f=0,k=a.length;f<k;f++)g(b,a[f]);return c};r.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"},collection:{tag:"div",className:""},button:{tag:"ActiveXObject"in v?"a":"button",className:"dt-button",active:"active",disabled:"disabled"},buttonLiner:{tag:"span",className:""}}};r.version="1.6.2";d.extend(q,{collection:{text:function(a){return a.i18n("buttons.collection","Collection")},className:"buttons-collection",init:function(a,
b,c){b.attr("aria-expanded",!1)},action:function(a,b,c,e){a.stopPropagation();e._collection.parents("body").length?this.popover(!1,e):this.popover(e._collection,e)},attr:{"aria-haspopup":!0}},copy:function(a,b){if(q.copyHtml5)return"copyHtml5";if(q.copyFlash&&q.copyFlash.available(a,b))return"copyFlash"},csv:function(a,b){if(q.csvHtml5&&q.csvHtml5.available(a,b))return"csvHtml5";if(q.csvFlash&&q.csvFlash.available(a,b))return"csvFlash"},excel:function(a,b){if(q.excelHtml5&&q.excelHtml5.available(a,
b))return"excelHtml5";if(q.excelFlash&&q.excelFlash.available(a,b))return"excelFlash"},pdf:function(a,b){if(q.pdfHtml5&&q.pdfHtml5.available(a,b))return"pdfHtml5";if(q.pdfFlash&&q.pdfFlash.available(a,b))return"pdfFlash"},pageLength:function(a){a=a.settings()[0].aLengthMenu;var b=d.isArray(a[0])?a[0]:a,c=d.isArray(a[0])?a[1]:a;return{extend:"collection",text:function(a){return a.i18n("buttons.pageLength",{"-1":"Show all rows",_:"Show %d rows"},a.page.len())},className:"buttons-page-length",autoClose:!0,
buttons:d.map(b,function(a,b){return{text:c[b],className:"button-page-length",action:function(b,c){c.page.len(a).draw()},init:function(b,c,e){var d=this;c=function(){d.active(b.page.len()===a)};b.on("length.dt"+e.namespace,c);c()},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}),init:function(a,b,c){var e=this;a.on("length.dt"+c.namespace,function(){e.text(c.text)})},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}});m.Api.register("buttons()",function(a,b){b===n&&(b=a,a=n);this.selector.buttonGroup=
a;var c=this.iterator(!0,"table",function(c){if(c._buttons)return r.buttonSelector(r.instanceSelector(a,c._buttons),b)},!0);c._groupSelector=a;return c});m.Api.register("button()",function(a,b){a=this.buttons(a,b);1<a.length&&a.splice(1,a.length);return a});m.Api.registerPlural("buttons().active()","button().active()",function(a){return a===n?this.map(function(a){return a.inst.active(a.node)}):this.each(function(b){b.inst.active(b.node,a)})});m.Api.registerPlural("buttons().action()","button().action()",
function(a){return a===n?this.map(function(a){return a.inst.action(a.node)}):this.each(function(b){b.inst.action(b.node,a)})});m.Api.register(["buttons().enable()","button().enable()"],function(a){return this.each(function(b){b.inst.enable(b.node,a)})});m.Api.register(["buttons().disable()","button().disable()"],function(){return this.each(function(a){a.inst.disable(a.node)})});m.Api.registerPlural("buttons().nodes()","button().node()",function(){var a=d();d(this.each(function(b){a=a.add(b.inst.node(b.node))}));
return a});m.Api.registerPlural("buttons().processing()","button().processing()",function(a){return a===n?this.map(function(a){return a.inst.processing(a.node)}):this.each(function(b){b.inst.processing(b.node,a)})});m.Api.registerPlural("buttons().text()","button().text()",function(a){return a===n?this.map(function(a){return a.inst.text(a.node)}):this.each(function(b){b.inst.text(b.node,a)})});m.Api.registerPlural("buttons().trigger()","button().trigger()",function(){return this.each(function(a){a.inst.node(a.node).trigger("click")})});
m.Api.register("button().popover()",function(a,b){return this.map(function(c){return c.inst._popover(a,this.button(this[0].node),b)})});m.Api.register("buttons().containers()",function(){var a=d(),b=this._groupSelector;this.iterator(!0,"table",function(c){if(c._buttons){c=r.instanceSelector(b,c._buttons);for(var e=0,d=c.length;e<d;e++)a=a.add(c[e].container())}});return a});m.Api.register("buttons().container()",function(){return this.containers().eq(0)});m.Api.register("button().add()",function(a,
b){var c=this.context;c.length&&(c=r.instanceSelector(this._groupSelector,c[0]._buttons),c.length&&c[0].add(b,a));return this.button(this._groupSelector,a)});m.Api.register("buttons().destroy()",function(){this.pluck("inst").unique().each(function(a){a.destroy()});return this});m.Api.registerPlural("buttons().remove()","buttons().remove()",function(){this.each(function(a){a.inst.remove(a.node)});return this});var x;m.Api.register("buttons.info()",function(a,b,c){var e=this;if(!1===a)return this.off("destroy.btn-info"),
z(d("#datatables_buttons_info"),400,function(){d(this).remove()}),clearTimeout(x),x=null,this;x&&clearTimeout(x);d("#datatables_buttons_info").length&&d("#datatables_buttons_info").remove();a=a?"<h2>"+a+"</h2>":"";y(d('<div id="datatables_buttons_info" class="dt-button-info"/>').html(a).append(d("<div/>")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body"));c!==n&&0!==c&&(x=setTimeout(function(){e.buttons.info(!1)},c));this.on("destroy.btn-info",function(){e.buttons.info(!1)});
return this});m.Api.register("buttons.exportData()",function(a){if(this.context.length)return G(new m.Api(this.context[0]),a)});m.Api.register("buttons.exportInfo()",function(a){a||(a={});var b=a;var c="*"===b.filename&&"*"!==b.title&&b.title!==n&&null!==b.title&&""!==b.title?b.title:b.filename;"function"===typeof c&&(c=c());c===n||null===c?c=null:(-1!==c.indexOf("*")&&(c=d.trim(c.replace("*",d("head > title").text()))),c=c.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(b=A(b.extension))||
(b=""),c+=b);b=A(a.title);b=null===b?null:-1!==b.indexOf("*")?b.replace("*",d("head > title").text()||"Exported data"):b;return{filename:c,title:b,messageTop:C(this,a.message||a.messageTop,"top"),messageBottom:C(this,a.messageBottom,"bottom")}});var A=function(a){return null===a||a===n?null:"function"===typeof a?a():a},C=function(a,b,c){b=A(b);if(null===b)return null;a=d("caption",a.table().container()).eq(0);return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"":b},D=d("<textarea/>")[0],
G=function(a,b){var c=d.extend(!0,{},{rows:null,columns:"",modifier:{search:"applied",order:"applied"},orthogonal:"display",stripHtml:!0,stripNewlines:!0,decodeEntities:!0,trim:!0,format:{header:function(a){return e(a)},footer:function(a){return e(a)},body:function(a){return e(a)}},customizeData:null},b),e=function(a){if("string"!==typeof a)return a;a=a.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");a=a.replace(/<!\-\-.*?\-\->/g,"");c.stripHtml&&(a=a.replace(/<[^>]*>/g,""));c.trim&&
(a=a.replace(/^\s+|\s+$/g,""));c.stripNewlines&&(a=a.replace(/\n/g," "));c.decodeEntities&&(D.innerHTML=a,a=D.value);return a};b=a.columns(c.columns).indexes().map(function(b){var d=a.column(b).header();return c.format.header(d.innerHTML,b,d)}).toArray();var g=a.table().footer()?a.columns(c.columns).indexes().map(function(b){var d=a.column(b).footer();return c.format.footer(d?d.innerHTML:"",b,d)}).toArray():null,f=d.extend({},c.modifier);a.select&&"function"===typeof a.select.info&&f.selected===n&&
a.rows(c.rows,d.extend({selected:!0},f)).any()&&d.extend(f,{selected:!0});f=a.rows(c.rows,f).indexes().toArray();var k=a.cells(f,c.columns);f=k.render(c.orthogonal).toArray();k=k.nodes().toArray();for(var h=b.length,m=[],l=0,p=0,r=0<h?f.length/h:0;p<r;p++){for(var q=[h],u=0;u<h;u++)q[u]=c.format.body(f[l],p,u,k[l]),l++;m[p]=q}b={header:b,footer:g,body:m};c.customizeData&&c.customizeData(b);return b};d.fn.dataTable.Buttons=r;d.fn.DataTable.Buttons=r;d(u).on("init.dt plugin-init.dt",function(a,b){"dt"===
a.namespace&&(a=b.oInit.buttons||m.defaults.buttons)&&!b._buttons&&(new r(b,a)).container()});m.ext.feature.push({fnInit:B,cFeature:"B"});m.ext.features&&m.ext.features.register("buttons",B);return r});

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,168 @@
/*
* DataTables 1.10.19
* @author SpryMedia Ltd
* @copyright SpryMedia Ltd
* @license MIT license: datatables.net/license
*/
(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E,H){E||(E=window);H||(H="undefined"!==typeof window?require("jquery"):require("jquery")(E));return h(H,E,E.document)}:h(jQuery,window,document)})(function(h,E,H,k){function Z(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),
d[c]=e,"o"===b[1]&&Z(a[e])});a._hungarianMap=d}function J(a,b,c){a._hungarianMap||Z(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),J(a[d],b[d],c)):b[d]=b[e]})}function Ca(a){var b=n.defaults.oLanguage,c=b.sDecimal;c&&Da(c);if(a){var d=a.sZeroRecords;!a.sEmptyTable&&(d&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(d&&"Loading..."===b.sLoadingRecords)&&F(a,
a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&c!==a&&Da(a)}}function fb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":
"");"boolean"===typeof a.scrollX&&(a.scrollX=a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&J(n.models.oSearch,a[b])}function gb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"===typeof b&&!h.isArray(b)&&(a.aDataSort=[b])}function hb(a){if(!n.__browser){var b={};n.__browser=b;var c=h("<div/>").css({position:"fixed",top:0,left:-1*h(E).scrollLeft(),height:1,width:1,
overflow:"hidden"}).append(h("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(h("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,n.__browser);a.oScroll.iBarWidth=n.__browser.barWidth}
function ib(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==e;)a.hasOwnProperty(d)&&(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ea(a,b){var c=n.defaults.column,d=a.aoColumns.length,c=h.extend({},n.models.oColumn,c,{nTh:b?b:H.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},n.models.oSearch,c[d]);ka(a,d,h(b).data())}function ka(a,b,c){var b=a.aoColumns[b],
d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(gb(c),J(n.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),h.extend(b,c),F(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),F(b,c,"aDataSort"));var g=b.mData,j=S(g),i=b.mRender?
S(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return N(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,
b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function $(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Fa(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&la(a);r(a,null,"column-sizing",[a])}function aa(a,b){var c=ma(a,"bVisible");return"number"===
typeof c[b]?c[b]:null}function ba(a,b){var c=ma(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function V(a){var b=0;h.each(a.aoColumns,function(a,d){d.bVisible&&"none"!==h(d.nTh).css("display")&&b++});return b}function ma(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Ga(a){var b=a.aoColumns,c=a.aoData,d=n.ext.type.detect,e,f,g,j,i,h,l,q,t;e=0;for(f=b.length;e<f;e++)if(l=b[e],t=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g<
j;g++){i=0;for(h=c.length;i<h;i++){t[i]===k&&(t[i]=B(a,i,e,"type"));q=d[g](t[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function jb(a,b,c,d){var e,f,g,j,i,m,l=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){m=b[e];var q=m.targets!==k?m.targets:m.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Ea(a);d(q[f],m)}else if("number"===typeof q[f]&&0>q[f])d(l.length+q[f],m);else if("string"===
typeof q[f]){j=0;for(i=l.length;j<i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&d(j,m)}}if(c){e=0;for(a=c.length;e<a;e++)d(e,c[e])}}function O(a,b,c,d){var e=a.aoData.length,f=h.extend(!0,{},n.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,j=0,i=g.length;j<i;j++)g[j].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==k&&(a.aIds[b]=f);(c||!a.oFeatures.bDeferRender)&&Ha(a,e,c,d);return e}function na(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,
e){c=Ia(a,e);return O(a,c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,i=f.fnGetData(g,d,{settings:a,row:b,col:c});if(i===k)return a.iDrawError!=e&&null===j&&(K(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j&&d!==k)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function kb(a,
b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function Ja(a){return h.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\\./g,".")})}function S(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=S(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||
-1!==a.indexOf("("))){var c=function(a,b,f){var g,j;if(""!==f){j=Ja(f);for(var i=0,m=j.length;i<m;i++){f=j[i].match(ca);g=j[i].match(W);if(f){j[i]=j[i].replace(ca,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");if(h.isArray(a)){i=0;for(m=a.length;i<m;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(W,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}
function N(a){if(h.isPlainObject(a))return N(a._);if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=Ja(e),f;f=e[e.length-1];for(var g,j,i=0,m=e.length-1;i<m;i++){g=e[i].match(ca);j=e[i].match(W);if(g){e[i]=e[i].replace(ca,"");a[e[i]]=[];f=e.slice();f.splice(0,i+1);g=f.join(".");if(h.isArray(d)){j=0;for(m=d.length;j<m;j++)f={},b(f,d[j],g),
a[e[i]].push(f)}else a[e[i]]=d;return}j&&(e[i]=e[i].replace(W,""),a=a[e[i]](d));if(null===a[e[i]]||a[e[i]]===k)a[e[i]]={};a=a[e[i]]}if(f.match(W))a[f.replace(W,"")](d);else a[f.replace(ca,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ka(a){return D(a.aoData,"_aData")}function oa(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function pa(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d,
1)}function da(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ia(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;La(a,e)}}function Ia(a,b,c,d){var e=[],f=b.firstChild,g,
j,i=0,m,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],t=function(a,b){if("string"===typeof a){var c=a.indexOf("@");-1!==c&&(c=a.substring(c+1),N(a)(d,b.getAttribute(c)))}},G=function(a){if(c===k||c===i)j=l[i],m=h.trim(a.innerHTML),j&&j._bAttrSrc?(N(j.mData._)(d,m),t(j.mData.sort,a),t(j.mData.type,a),t(j.mData.filter,a)):q?(j._setter||(j._setter=N(j.mData)),j._setter(d,m)):d[i]=m;i++};if(f)for(;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)G(f),e.push(f);f=f.nextSibling}else{e=b.anCells;
f=0;for(g=e.length;f<g;f++)G(e[f])}if(b=b.firstChild?b:b.nTr)(b=b.getAttribute("id"))&&N(a.rowId)(d,b);return{data:d,cells:e}}function Ha(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,m,l,q;if(null===e.nTr){j=c||H.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;La(a,e);l=0;for(q=a.aoColumns.length;l<q;l++){m=a.aoColumns[l];i=c?d[l]:H.createElement(m.sCellType);i._DT_CellIndex={row:b,column:l};g.push(i);if((!c||m.mRender||m.mData!==l)&&(!h.isPlainObject(m.mData)||m.mData._!==l+".display"))i.innerHTML=
B(a,b,l,"display");m.sClass&&(i.className+=" "+m.sClass);m.bVisible&&!c?j.appendChild(i):!m.bVisible&&c&&i.parentNode.removeChild(i);m.fnCreatedCell&&m.fnCreatedCell.call(a.oInstance,i,B(a,b,l),f,b,l)}r(a,"aoRowCreatedCallback",null,[j,f,b,g])}e.nTr.setAttribute("role","row")}function La(a,b){var c=b.nTr,d=b._aData;if(c){var e=a.rowIdFn(d);e&&(c.id=e);d.DT_RowClass&&(e=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?qa(b.__rowc.concat(e)):e,h(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));
d.DT_RowAttr&&h(c).attr(d.DT_RowAttr);d.DT_RowData&&h(c).data(d.DT_RowData)}}function lb(a){var b,c,d,e,f,g=a.nTHead,j=a.nTFoot,i=0===h("th, td",g).length,m=a.oClasses,l=a.aoColumns;i&&(e=h("<tr/>").appendTo(g));b=0;for(c=l.length;b<c;b++)f=l[b],d=h(f.nTh).addClass(f.sClass),i&&d.appendTo(e),a.oFeatures.bSort&&(d.addClass(f.sSortingClass),!1!==f.bSortable&&(d.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),Ma(a,f.nTh,b))),f.sTitle!=d[0].innerHTML&&d.html(f.sTitle),Na(a,"header")(a,d,
f,m);i&&ea(a.aoHeader,g);h(g).find(">tr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(m.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(m.sFooterTH);if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}function fa(a,b,c){var d,e,f,g=[],j=[],i=a.aoColumns.length,m;if(b){c===k&&(c=!1);d=0;for(e=b.length;d<e;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);j.push([])}d=
0;for(e=g.length;d<e;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(m=i=1,j[d][f]===k){a.appendChild(g[d][f].cell);for(j[d][f]=1;g[d+i]!==k&&g[d][f].cell==g[d+i][f].cell;)j[d+i][f]=1,i++;for(;g[d][f+m]!==k&&g[d][f].cell==g[d][f+m].cell;){for(c=0;c<i;c++)j[d+c][f+m]=1;m++}h(g[d][f].cell).attr("rowspan",i).attr("colspan",m)}}}}function P(a){var b=r(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))C(a,!1);else{var b=[],c=0,d=a.asStripeClasses,e=
d.length,f=a.oLanguage,g=a.iInitDisplayStart,j="ssp"==y(a),i=a.aiDisplay;a.bDrawing=!0;g!==k&&-1!==g&&(a._iDisplayStart=j?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);var g=a._iDisplayStart,m=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!mb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:m;for(j=j?0:g;j<f;j++){var l=i[j],q=a.aoData[l];null===q.nTr&&Ha(a,l);var t=q.nTr;if(0!==e){var G=d[c%e];q._sRowStripe!=G&&(h(t).removeClass(q._sRowStripe).addClass(G),
q._sRowStripe=G)}r(a,"aoRowCallback",null,[t,q._aData,c,j,l]);b.push(t);c++}}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==y(a)?c=f.sLoadingRecords:f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":e?d[0]:""}).append(h("<td />",{valign:"top",colSpan:V(a),"class":a.oClasses.sRowEmpty}).html(c))[0];r(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ka(a),g,m,i]);r(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ka(a),g,m,i]);d=h(a.nTBody);d.children().detach();
d.append(h(b));r(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function T(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&nb(a);d?ga(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;P(a);a._drawHold=!1}function ob(a){var b=a.oClasses,c=h(a.nTable),c=h("<div/>").insertBefore(c),d=a.oFeatures,e=h("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=
a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,m,l,q,k=0;k<f.length;k++){g=null;j=f[k];if("<"==j){i=h("<div/>")[0];m=f[k+1];if("'"==m||'"'==m){l="";for(q=2;f[k+q]!=m;)l+=f[k+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(m=l.split("."),i.id=m[0].substr(1,m[0].length-1),i.className=m[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;k+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=pb(a);else if("f"==j&&
d.bFilter)g=qb(a);else if("r"==j&&d.bProcessing)g=rb(a);else if("t"==j)g=sb(a);else if("i"==j&&d.bInfo)g=tb(a);else if("p"==j&&d.bPaginate)g=ub(a);else if(0!==n.ext.feature.length){i=n.ext.feature;q=0;for(m=i.length;q<m;q++)if(j==i[q].cFeature){g=i[q].fnInit(a);break}}g&&(i=a.aanFeatures,i[j]||(i[j]=[]),i[j].push(g),e.append(g))}c.replaceWith(e);a.nHolding=null}function ea(a,b){var c=h(b).children("tr"),d,e,f,g,j,i,m,l,q,k;a.splice(0,a.length);f=0;for(i=c.length;f<i;f++)a.push([]);f=0;for(i=c.length;f<
i;f++){d=c[f];for(e=d.firstChild;e;){if("TD"==e.nodeName.toUpperCase()||"TH"==e.nodeName.toUpperCase()){l=1*e.getAttribute("colspan");q=1*e.getAttribute("rowspan");l=!l||0===l||1===l?1:l;q=!q||0===q||1===q?1:q;g=0;for(j=a[f];j[g];)g++;m=g;k=1===l?!0:!1;for(j=0;j<l;j++)for(g=0;g<q;g++)a[f+g][m+j]={cell:e,unique:k},a[f+g].nTr=d}e=e.nextSibling}}}function ra(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],ea(c,b)));for(var b=0,e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||
!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function sa(a,b,c){r(a,"aoServerParams","serverParams",[b]);if(b&&h.isArray(b)){var d={},e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,j=a.oInstance,i=function(b){r(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var m="function"===typeof f?f(b,a):f,b="function"===typeof f&&m?m:h.extend(!0,b,m);delete g.data}m={data:b,success:function(b){var c=
b.error||b.sError;c&&K(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=r(a,null,"xhr",[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?K(a,0,"Invalid JSON response",1):4===b.readyState&&K(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData=b;r(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),i,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(m,{url:g||a.sAjaxSource})):
"function"===typeof g?a.jqXHR=g.call(j,b,i,a):(a.jqXHR=h.ajax(h.extend(m,g)),g.data=f)}function mb(a){return a.bAjaxDataGet?(a.iDraw++,C(a,!0),sa(a,vb(a),function(b){wb(a,b)}),!1):!0}function vb(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,m,l,k=X(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var t=function(a,b){j.push({name:a,value:b})};t("sEcho",a.iDraw);t("iColumns",c);t("sColumns",D(b,"sName").join(","));t("iDisplayStart",g);t("iDisplayLength",
i);var G={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)m=b[g],l=f[g],i="function"==typeof m.mData?"function":m.mData,G.columns.push({data:i,name:m.sName,searchable:m.bSearchable,orderable:m.bSortable,search:{value:l.sSearch,regex:l.bRegex}}),t("mDataProp_"+g,i),d.bFilter&&(t("sSearch_"+g,l.sSearch),t("bRegex_"+g,l.bRegex),t("bSearchable_"+g,m.bSearchable)),d.bSort&&t("bSortable_"+g,m.bSortable);d.bFilter&&(t("sSearch",e.sSearch),t("bRegex",
e.bRegex));d.bSort&&(h.each(k,function(a,b){G.order.push({column:b.col,dir:b.dir});t("iSortCol_"+a,b.col);t("sSortDir_"+a,b.dir)}),t("iSortingCols",k.length));b=n.ext.legacy.ajax;return null===b?a.sAjaxSource?j:G:b?j:G}function wb(a,b){var c=ta(a,b),d=b.sEcho!==k?b.sEcho:b.draw,e=b.iTotalRecords!==k?b.iTotalRecords:b.recordsTotal,f=b.iTotalDisplayRecords!==k?b.iTotalDisplayRecords:b.recordsFiltered;if(d){if(1*d<a.iDraw)return;a.iDraw=1*d}oa(a);a._iRecordsTotal=parseInt(e,10);a._iRecordsDisplay=parseInt(f,
10);d=0;for(e=c.length;d<e;d++)O(a,c[d]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;P(a);a._bInitComplete||ua(a,b);a.bAjaxDataGet=!0;C(a,!1)}function ta(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==k?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?S(c)(b):b}function qb(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",
g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function(){var b=!this.value?"":this.value;b!=e.sSearch&&(ga(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,P(a))},g=null!==a.searchDelay?a.searchDelay:"ssp"===y(a)?400:0,i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",g?Oa(f,g):f).on("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",
c);h(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{i[0]!==H.activeElement&&i.val(e.sSearch)}catch(d){}});return b[0]}function ga(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Ga(a);if("ssp"!=y(a)){xb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)yb(a,e[b].sSearch,b,e[b].bEscapeRegex!==k?!e[b].bEscapeRegex:e[b].bRegex,
e[b].bSmart,e[b].bCaseInsensitive);zb(a)}else f(b);a.bFiltered=!0;r(a,null,"search",[a])}function zb(a){for(var b=n.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var j=[],i=0,m=c.length;i<m;i++)e=c[i],d=a.aoData[e],b[f](a,d._aFilterData,e,d._aData,i)&&j.push(e);c.length=0;h.merge(c,j)}}function yb(a,b,c,d,e,f){if(""!==b){for(var g=[],j=a.aiDisplay,d=Pa(b,d,e,f),e=0;e<j.length;e++)b=a.aoData[j[e]]._aFilterData[c],d.test(b)&&g.push(j[e]);a.aiDisplay=g}}function xb(a,b,c,d,e,f){var d=Pa(b,
d,e,f),f=a.oPreviousSearch.sSearch,g=a.aiDisplayMaster,j,e=[];0!==n.ext.search.length&&(c=!0);j=Ab(a);if(0>=b.length)a.aiDisplay=g.slice();else{if(j||c||f.length>b.length||0!==b.indexOf(f)||a.bSorted)a.aiDisplay=g.slice();b=a.aiDisplay;for(c=0;c<b.length;c++)d.test(a.aoData[b[c]]._sFilterRow)&&e.push(b[c]);a.aiDisplay=e}}function Pa(a,b,c,d){a=b?a:Qa(a);c&&(a="^(?=.*?"+h.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(a){if('"'===a.charAt(0))var b=a.match(/^"(.*)"$/),a=b?b[1]:a;return a.replace('"',
"")}).join(")(?=.*?")+").*$");return RegExp(a,d?"i":"")}function Ab(a){var b=a.aoColumns,c,d,e,f,g,j,i,h,l=n.ext.type.search;c=!1;d=0;for(f=a.aoData.length;d<f;d++)if(h=a.aoData[d],!h._aFilterData){j=[];e=0;for(g=b.length;e<g;e++)c=b[e],c.bSearchable?(i=B(a,d,e,"filter"),l[c.sType]&&(i=l[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(va.innerHTML=i,i=Wb?va.textContent:va.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i);
h._aFilterData=j;h._sFilterRow=j.join(" ");c=!0}return c}function Bb(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}function Cb(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function tb(a){var b=a.sTableId,c=a.aanFeatures.i,d=h("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Db,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),h(a.nTable).attr("aria-describedby",
b+"_info"));return d[0]}function Db(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=Eb(a,j);c=c.fnInfoCallback;null!==c&&(j=c.call(a.oInstance,a,d,e,f,g,j));h(b).html(j)}}function Eb(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,
c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/e)))}function ha(a){var b,c,d=a.iInitDisplayStart,e=a.aoColumns,f;c=a.oFeatures;var g=a.bDeferLoading;if(a.bInitialised){ob(a);lb(a);fa(a,a.aoHeader);fa(a,a.aoFooter);C(a,!0);c.bAutoWidth&&Fa(a);b=0;for(c=e.length;b<c;b++)f=e[b],f.sWidth&&(f.nTh.style.width=v(f.sWidth));r(a,null,"preInit",[a]);T(a);e=
y(a);if("ssp"!=e||g)"ajax"==e?sa(a,[],function(c){var f=ta(a,c);for(b=0;b<f.length;b++)O(a,f[b]);a.iInitDisplayStart=d;T(a);C(a,!1);ua(a,c)},a):(C(a,!1),ua(a))}else setTimeout(function(){ha(a)},200)}function ua(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&$(a);r(a,null,"plugin-init",[a,b]);r(a,"aoInitComplete","init",[a,b])}function Ra(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Sa(a);r(a,null,"length",[a,c])}function pb(a){for(var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=h.isArray(d[0]),f=
e?d[0]:d,d=e?d[1]:d,e=h("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),g=0,j=f.length;g<j;g++)e[0][g]=new Option("number"===typeof d[g]?a.fnFormatNumber(d[g]):d[g],f[g]);var i=h("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).on("change.DT",function(){Ra(a,h(this).val());P(a)});h(a.nTable).on("length.dt.DT",function(b,c,d){a===
c&&h("select",i).val(d)});return i[0]}function ub(a){var b=a.sPaginationType,c=n.ext.pager[b],d="function"===typeof c,e=function(a){P(a)},b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;l<k;l++)Na(a,"pageButton")(a,f.p[l],l,h,b,i)}else c.fnUpdate(a,
e)},sName:"pagination"}));return b}function Ta(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===e?d=0:"number"===typeof b?(d=b*e,d>f&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<f&&(d+=e):"last"==b?d=Math.floor((f-1)/e)*e:K(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(r(a,null,"page",[a]),c&&P(a));return b}function rb(a){return h("<div/>",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}
function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",b?"block":"none");r(a,null,"processing",[a,b])}function sb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),m=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("<div/>",{"class":f.sScrollWrapper}).append(h("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden",
position:"relative",border:0,width:d?!d?null:v(d):"100%"}).append(h("<div/>",{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("<div/>",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:v(d)}).append(b));l&&i.append(h("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:v(d):"100%"}).append(h("<div/>",
{"class":f.sScrollFootInner}).append(m.removeAttr("id").css("margin-left",0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(),k=b[0],f=b[1],t=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(t.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=t;a.aoDrawCallback.push({fn:la,sName:"scrolling"});return i[0]}function la(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth,
f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,m=j.children("table"),j=a.nScrollBody,l=h(j),q=j.style,t=h(a.nScrollFoot).children("div"),n=t.children("table"),o=h(a.nTHead),p=h(a.nTable),s=p[0],r=s.style,u=a.nTFoot?h(a.nTFoot):null,x=a.oBrowser,U=x.bScrollOversize,Xb=D(a.aoColumns,"nTh"),Q,L,R,w,Ua=[],y=[],z=[],A=[],B,C=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};L=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!==
L&&a.scrollBarVis!==k)a.scrollBarVis=L,$(a);else{a.scrollBarVis=L;p.children("thead, tfoot").remove();u&&(R=u.clone().prependTo(p),Q=u.find("tr"),R=R.find("tr"));w=o.clone().prependTo(p);o=o.find("tr");L=w.find("tr");w.find("th, td").removeAttr("tabindex");c||(q.width="100%",f[0].style.width="100%");h.each(ra(a,w),function(b,c){B=aa(a,b);c.style.width=a.aoColumns[B].sWidth});u&&I(function(a){a.style.width=""},R);f=p.outerWidth();if(""===c){r.width="100%";if(U&&(p.find("tbody").height()>j.offsetHeight||
"scroll"==l.css("overflow-y")))r.width=v(p.outerWidth()-b);f=p.outerWidth()}else""!==d&&(r.width=v(d),f=p.outerWidth());I(C,L);I(function(a){z.push(a.innerHTML);Ua.push(v(h(a).css("width")))},L);I(function(a,b){if(h.inArray(a,Xb)!==-1)a.style.width=Ua[b]},o);h(L).height(0);u&&(I(C,R),I(function(a){A.push(a.innerHTML);y.push(v(h(a).css("width")))},R),I(function(a,b){a.style.width=y[b]},Q),h(R).height(0));I(function(a,b){a.innerHTML='<div class="dataTables_sizing">'+z[b]+"</div>";a.childNodes[0].style.height=
"0";a.childNodes[0].style.overflow="hidden";a.style.width=Ua[b]},L);u&&I(function(a,b){a.innerHTML='<div class="dataTables_sizing">'+A[b]+"</div>";a.childNodes[0].style.height="0";a.childNodes[0].style.overflow="hidden";a.style.width=y[b]},R);if(p.outerWidth()<f){Q=j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(U&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=v(Q-b);(""===c||""!==d)&&K(a,1,"Possible column misalignment",6)}else Q="100%";q.width=v(Q);
g.width=v(Q);u&&(a.nScrollFoot.style.width=v(Q));!e&&U&&(q.height=v(s.offsetHeight+b));c=p.outerWidth();m[0].style.width=v(c);i.width=v(c);d=p.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+(x.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";u&&(n[0].style.width=v(c),t[0].style.width=v(c),t[0].style[e]=d?b+"px":"0px");p.children("colgroup").insertBefore(p.children("thead"));l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=0}}function I(a,b,c){for(var d=0,e=0,
f=b.length,g,j;e<f;){g=b[e].firstChild;for(j=c?c[e].firstChild:null;g;)1===g.nodeType&&(c?a(g,j,d):a(g,d),d++),g=g.nextSibling,j=c?j.nextSibling:null;e++}}function Fa(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,e=d.sY,f=d.sX,g=d.sXInner,j=c.length,i=ma(a,"bVisible"),m=h("th",a.nTHead),l=b.getAttribute("width"),k=b.parentNode,t=!1,n,o,p=a.oBrowser,d=p.bScrollOversize;(n=b.style.width)&&-1!==n.indexOf("%")&&(l=n);for(n=0;n<i.length;n++)o=c[i[n]],null!==o.sWidth&&(o.sWidth=Fb(o.sWidthOrig,k),t=!0);if(d||
!t&&!f&&!e&&j==V(a)&&j==m.length)for(n=0;n<j;n++)i=aa(a,n),null!==i&&(c[i].sWidth=v(m.eq(n).width()));else{j=h(b).clone().css("visibility","hidden").removeAttr("id");j.find("tbody tr").remove();var s=h("<tr/>").appendTo(j.find("tbody"));j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");m=ra(a,j.find("thead")[0]);for(n=0;n<i.length;n++)o=c[i[n]],m[n].style.width=null!==o.sWidthOrig&&""!==o.sWidthOrig?v(o.sWidthOrig):
"",o.sWidthOrig&&f&&h(m[n]).append(h("<div/>").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(n=0;n<i.length;n++)t=i[n],o=c[t],h(Gb(a,t)).clone(!1).append(o.sContentPadding).appendTo(s);h("[name]",j).removeAttr("name");o=h("<div/>").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()<k.clientWidth&&l&&j.width(k.clientWidth)):e?j.width(k.clientWidth):
l&&j.width(l);for(n=e=0;n<i.length;n++)k=h(m[n]),g=k.outerWidth()-k.width(),k=p.bBounding?Math.ceil(m[n].getBoundingClientRect().width):k.outerWidth(),e+=k,c[i[n]].sWidth=v(k-g);b.style.width=v(e);o.remove()}l&&(b.style.width=v(l));if((l||f)&&!a._reszEvt)b=function(){h(E).on("resize.DT-"+a.sInstance,Oa(function(){$(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0}function Fb(a,b){if(!a)return 0;var c=h("<div/>").css("width",v(a)).appendTo(b||H.body),d=c[0].offsetWidth;c.remove();return d}function Gb(a,
b){var c=Hb(a,b);if(0>c)return null;var d=a.aoData[c];return!d.nTr?h("<td/>").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Hb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;f<g;f++)c=B(a,f,b,"display")+"",c=c.replace(Yb,""),c=c.replace(/&nbsp;/g," "),c.length>d&&(d=c.length,e=f);return e}function v(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function X(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var m=[];f=function(a){a.length&&
!h.isArray(a[0])?m.push(a):h.merge(m,a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;a<m.length;a++){i=m[a][0];f=e[i].aDataSort;b=0;for(c=f.length;b<c;b++)g=f[b],j=e[g].sType||"string",m[a]._idx===k&&(m[a]._idx=h.inArray(m[a][1],e[g].asSorting)),d.push({src:i,col:g,dir:m[a][1],index:m[a]._idx,type:j,formatter:n.ext.type.order[j+"-pre"]})}return d}function nb(a){var b,c,d=[],e=n.ext.type.order,f=a.aoData,g=0,j,i=a.aiDisplayMaster,h;Ga(a);h=X(a);b=0;for(c=h.length;b<
c;b++)j=h[b],j.formatter&&g++,Ib(a,j.col);if("ssp"!=y(a)&&0!==h.length){b=0;for(c=i.length;b<c;b++)d[i[b]]=b;g===h.length?i.sort(function(a,b){var c,e,g,j,i=h.length,k=f[a]._aSortData,n=f[b]._aSortData;for(g=0;g<i;g++)if(j=h[g],c=k[j.col],e=n[j.col],c=c<e?-1:c>e?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];return c<e?-1:c>e?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,n=f[a]._aSortData,o=f[b]._aSortData;for(j=0;j<k;j++)if(i=h[j],c=n[i.col],g=o[i.col],i=e[i.type+"-"+i.dir]||e["string-"+i.dir],
c=i(c,g),0!==c)return c;c=d[a];g=d[b];return c<g?-1:c>g?1:0})}a.bSorted=!0}function Jb(a){for(var b,c,d=a.aoColumns,e=X(a),a=a.oLanguage.oAria,f=0,g=d.length;f<g;f++){c=d[f];var j=c.asSorting;b=c.sTitle.replace(/<.*?>/g,"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0<e.length&&e[0].col==f?(i.setAttribute("aria-sort","asc"==e[0].dir?"ascending":"descending"),c=j[e[0].index+1]||j[0]):c=j[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);i.setAttribute("aria-label",b)}}function Va(a,
b,c,d){var e=a.aaSorting,f=a.aoColumns[b].asSorting,g=function(a,b){var c=a._idx;c===k&&(c=h.inArray(a[1],f));return c+1<f.length?c+1:b?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=h.inArray(b,D(e,"0")),-1!==c?(b=g(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=f[b],e[c]._idx=b)):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);T(a);"function"==
typeof d&&d(a)}function Ma(a,b,c,d){var e=a.aoColumns[c];Wa(b,{},function(b){!1!==e.bSortable&&(a.oFeatures.bProcessing?(C(a,!0),setTimeout(function(){Va(a,c,b.shiftKey,d);"ssp"!==y(a)&&C(a,!1)},0)):Va(a,c,b.shiftKey,d))})}function wa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=X(a),e=a.oFeatures,f,g;if(e.bSort&&e.bSortClasses){e=0;for(f=b.length;e<f;e++)g=b[e].src,h(D(a.aoData,"anCells",g)).removeClass(c+(2>e?e+1:3));e=0;for(f=d.length;e<f;e++)g=d[e].src,h(D(a.aoData,"anCells",g)).addClass(c+
(2>e?e+1:3))}a.aLastSort=d}function Ib(a,b){var c=a.aoColumns[b],d=n.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ba(a,b)));for(var f,g=n.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j<i;j++)if(c=a.aoData[j],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function xa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:Bb(a.oPreviousSearch),
columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:Bb(a.aoPreSearchCols[d])}})};r(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,b)}}function Kb(a,b,c){var d,e,f=a.aoColumns,b=function(b){if(b&&b.time){var g=r(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1===h.inArray(!1,g)&&(g=a.iStateDuration,!(0<g&&b.time<+new Date-1E3*g)&&!(b.columns&&f.length!==b.columns.length))){a.oLoadedState=h.extend(!0,{},b);b.start!==k&&
(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start);b.length!==k&&(a._iDisplayLength=b.length);b.order!==k&&(a.aaSorting=[],h.each(b.order,function(b,c){a.aaSorting.push(c[0]>=f.length?[0,c[1]]:c)}));b.search!==k&&h.extend(a.oPreviousSearch,Cb(b.search));if(b.columns){d=0;for(e=b.columns.length;d<e;d++)g=b.columns[d],g.visible!==k&&(f[d].bVisible=g.visible),g.search!==k&&h.extend(a.aoPreSearchCols[d],Cb(g.search))}r(a,"aoStateLoaded","stateLoaded",[a,b])}}c()};if(a.oFeatures.bStateSave){var g=
a.fnStateLoadCallback.call(a.oInstance,a,b);g!==k&&b(g)}else c()}function ya(a){var b=n.settings,a=h.inArray(a,D(b,"nTable"));return-1!==a?b[a]:null}function K(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)E.console&&console.log&&console.log(c);else if(b=n.ext,b=b.sErrMode||b.errMode,a&&r(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==
typeof b&&b(a,d,c)}}function F(a,b,c,d){h.isArray(c)?h.each(c,function(c,d){h.isArray(d)?F(a,b,d[0],d[1]):F(a,b,d)}):(d===k&&(d=c),b[c]!==k&&(a[d]=b[c]))}function Xa(a,b,c){var d,e;for(e in b)b.hasOwnProperty(e)&&(d=b[e],h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Wa(a,b,c){h(a).on("click.DT",b,function(b){h(a).blur();c(b)}).on("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).on("selectstart.DT",
function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function r(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Sa(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Na(a,b){var c=a.renderer,d=n.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===
typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ia(a,b){var c=[],c=Lb.numbers_length,d=Math.floor(c/2);b<=c?c=Y(0,b):a<=d?(c=Y(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=Y(b-(c-2),b):(c=Y(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function Da(a){h.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Ya)},"html-num":function(b){return za(b,
a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Ya)}},function(b,c){x.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(x.type.search[b+a]=x.type.search.html)})}function Mb(a){return function(){var b=[ya(this[n.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return n.ext.internal[a].apply(this,b)}}var n=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new s(ya(this[x.iApiIndex])):new s(this)};
this.fnAddData=function(a,b){var c=this.api(!0),d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&la(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,
b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():
c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};
this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return ya(this[x.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();
(d===k||d)&&h.draw();return 0};this.fnVersionCheck=x.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=x.internal;for(var e in n.ext.internal)e&&(this[e]=Mb(e));this.each(function(){var e={},g=1<d?Xa(e,a,!0):a,j=0,i,e=this.getAttribute("id"),m=!1,l=n.defaults,q=h(this);if("table"!=this.nodeName.toLowerCase())K(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{fb(l);gb(l.column);J(l,l,!0);J(l.column,l.column,!0);J(l,h.extend(g,q.data()));var t=n.settings,
j=0;for(i=t.length;j<i;j++){var o=t[j];if(o.nTable==this||o.nTHead&&o.nTHead.parentNode==this||o.nTFoot&&o.nTFoot.parentNode==this){var s=g.bRetrieve!==k?g.bRetrieve:l.bRetrieve;if(c||s)return o.oInstance;if(g.bDestroy!==k?g.bDestroy:l.bDestroy){o.oInstance.fnDestroy();break}else{K(o,0,"Cannot reinitialise DataTable",3);return}}if(o.sTableId==this.id){t.splice(j,1);break}}if(null===e||""===e)this.id=e="DataTables_Table_"+n.ext._unique++;var p=h.extend(!0,{},n.models.oSettings,{sDestroyWidth:q[0].style.width,
sInstance:e,sTableId:e});p.nTable=this;p.oApi=b.internal;p.oInit=g;t.push(p);p.oInstance=1===b.length?b:q.dataTable();fb(g);Ca(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=h.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);g=Xa(h.extend(!0,{},l),g);F(p.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));F(p,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod",
"aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]);F(p.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);F(p.oLanguage,g,"fnInfoCallback");
z(p,"aoDrawCallback",g.fnDrawCallback,"user");z(p,"aoServerParams",g.fnServerParams,"user");z(p,"aoStateSaveParams",g.fnStateSaveParams,"user");z(p,"aoStateLoadParams",g.fnStateLoadParams,"user");z(p,"aoStateLoaded",g.fnStateLoaded,"user");z(p,"aoRowCallback",g.fnRowCallback,"user");z(p,"aoRowCreatedCallback",g.fnCreatedRow,"user");z(p,"aoHeaderCallback",g.fnHeaderCallback,"user");z(p,"aoFooterCallback",g.fnFooterCallback,"user");z(p,"aoInitComplete",g.fnInitComplete,"user");z(p,"aoPreDrawCallback",
g.fnPreDrawCallback,"user");p.rowIdFn=S(g.rowId);hb(p);var u=p.oClasses;h.extend(u,n.ext.classes,g.oClasses);q.addClass(u.sTable);p.iInitDisplayStart===k&&(p.iInitDisplayStart=g.iDisplayStart,p._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(p.bDeferLoading=!0,e=h.isArray(g.iDeferLoading),p._iRecordsDisplay=e?g.iDeferLoading[0]:g.iDeferLoading,p._iRecordsTotal=e?g.iDeferLoading[1]:g.iDeferLoading);var v=p.oLanguage;h.extend(!0,v,g.oLanguage);v.sUrl&&(h.ajax({dataType:"json",url:v.sUrl,success:function(a){Ca(a);
J(l.oLanguage,a);h.extend(true,v,a);ha(p)},error:function(){ha(p)}}),m=!0);null===g.asStripeClasses&&(p.asStripeClasses=[u.sStripeOdd,u.sStripeEven]);var e=p.asStripeClasses,x=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(e,function(a){return x.hasClass(a)}))&&(h("tbody tr",this).removeClass(e.join(" ")),p.asDestroyStripes=e.slice());e=[];t=this.getElementsByTagName("thead");0!==t.length&&(ea(p.aoHeader,t[0]),e=ra(p));if(null===g.aoColumns){t=[];j=0;for(i=e.length;j<i;j++)t.push(null)}else t=
g.aoColumns;j=0;for(i=t.length;j<i;j++)Ea(p,e?e[j]:null);jb(p,g.aoColumnDefs,t,function(a,b){ka(p,a,b)});if(x.length){var w=function(a,b){return a.getAttribute("data-"+b)!==null?b:null};h(x[0]).children("th, td").each(function(a,b){var c=p.aoColumns[a];if(c.mData===a){var d=w(b,"sort")||w(b,"order"),e=w(b,"filter")||w(b,"search");if(d!==null||e!==null){c.mData={_:a+".display",sort:d!==null?a+".@data-"+d:k,type:d!==null?a+".@data-"+d:k,filter:e!==null?a+".@data-"+e:k};ka(p,a)}}})}var U=p.oFeatures,
e=function(){if(g.aaSorting===k){var a=p.aaSorting;j=0;for(i=a.length;j<i;j++)a[j][1]=p.aoColumns[j].asSorting[0]}wa(p);U.bSort&&z(p,"aoDrawCallback",function(){if(p.bSorted){var a=X(p),b={};h.each(a,function(a,c){b[c.src]=c.dir});r(p,null,"order",[p,a,b]);Jb(p)}});z(p,"aoDrawCallback",function(){(p.bSorted||y(p)==="ssp"||U.bDeferRender)&&wa(p)},"sc");var a=q.children("caption").each(function(){this._captionSide=h(this).css("caption-side")}),b=q.children("thead");b.length===0&&(b=h("<thead/>").appendTo(q));
p.nTHead=b[0];b=q.children("tbody");b.length===0&&(b=h("<tbody/>").appendTo(q));p.nTBody=b[0];b=q.children("tfoot");if(b.length===0&&a.length>0&&(p.oScroll.sX!==""||p.oScroll.sY!==""))b=h("<tfoot/>").appendTo(q);if(b.length===0||b.children().length===0)q.addClass(u.sNoFooter);else if(b.length>0){p.nTFoot=b[0];ea(p.aoFooter,p.nTFoot)}if(g.aaData)for(j=0;j<g.aaData.length;j++)O(p,g.aaData[j]);else(p.bDeferLoading||y(p)=="dom")&&na(p,h(p.nTBody).children("tr"));p.aiDisplay=p.aiDisplayMaster.slice();
p.bInitialised=true;m===false&&ha(p)};g.bStateSave?(U.bStateSave=!0,z(p,"aoDrawCallback",xa,"state_save"),Kb(p,g,e)):e()}});b=null;return this},x,s,o,u,Za={},Nb=/[\r\n]/g,Aa=/<.*?>/g,Zb=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,$b=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Ya=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,M=function(a){return!a||!0===a||"-"===a?!0:!1},Ob=function(a){var b=parseInt(a,10);return!isNaN(b)&&
isFinite(a)?b:null},Pb=function(a,b){Za[b]||(Za[b]=RegExp(Qa(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Za[b],"."):a},$a=function(a,b,c){var d="string"===typeof a;if(M(a))return!0;b&&d&&(a=Pb(a,b));c&&d&&(a=a.replace(Ya,""));return!isNaN(parseFloat(a))&&isFinite(a)},Qb=function(a,b,c){return M(a)?!0:!(M(a)||"string"===typeof a)?null:$a(a.replace(Aa,""),b,c)?!0:null},D=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;e<f;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<
f;e++)a[e]&&d.push(a[e][b]);return d},ja=function(a,b,c,d){var e=[],f=0,g=b.length;if(d!==k)for(;f<g;f++)a[b[f]][c]&&e.push(a[b[f]][c][d]);else for(;f<g;f++)e.push(a[b[f]][c]);return e},Y=function(a,b){var c=[],d;b===k?(b=0,d=a):(d=b,b=a);for(var e=b;e<d;e++)c.push(e);return c},Rb=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);return b},qa=function(a){var b;a:{if(!(2>a.length)){b=a.slice().sort();for(var c=b[0],d=1,e=b.length;d<e;d++){if(b[d]===c){b=!1;break a}c=b[d]}}b=!0}if(b)return a.slice();
b=[];var e=a.length,f,g=0,d=0;a:for(;d<e;d++){c=a[d];for(f=0;f<g;f++)if(b[f]===c)continue a;b.push(c);g++}return b};n.util={throttle:function(a,b){var c=b!==k?b:200,d,e;return function(){var b=this,g=+new Date,j=arguments;d&&g<d+c?(clearTimeout(e),e=setTimeout(function(){d=k;a.apply(b,j)},c)):(d=g,a.apply(b,j))}},escapeRegex:function(a){return a.replace($b,"\\$1")}};var A=function(a,b,c){a[b]!==k&&(a[c]=a[b])},ca=/\[.*?\]$/,W=/\(\)$/,Qa=n.util.escapeRegex,va=h("<div>")[0],Wb=va.textContent!==k,Yb=
/<.*?>/g,Oa=n.util.throttle,Sb=[],w=Array.prototype,ac=function(a){var b,c,d=n.settings,e=h.map(d,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=h.inArray(a,e),-1!==b?[d[b]]:null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?c=h(a):a instanceof h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,e);return-1!==b?d[b]:null}).toArray()};s=function(a,b){if(!(this instanceof
s))return new s(a,b);var c=[],d=function(a){(a=ac(a))&&(c=c.concat(a))};if(h.isArray(a))for(var e=0,f=a.length;e<f;e++)d(a[e]);else d(a);this.context=qa(c);b&&h.merge(this,b);this.selector={rows:null,cols:null,opts:null};s.extend(this,this,Sb)};n.Api=s;h.extend(s.prototype,{any:function(){return 0!==this.count()},concat:w.concat,context:[],count:function(){return this.flatten().length},each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=
this.context;return b.length>a?new s(b[a],this[a]):null},filter:function(a){var b=[];if(w.filter)b=w.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new s(this.context,b)},flatten:function(){var a=[];return new s(this.context,a.concat.apply(a,this.toArray()))},join:w.join,indexOf:w.indexOf||function(a,b){for(var c=b||0,d=this.length;c<d;c++)if(this[c]===a)return c;return-1},iterator:function(a,b,c,d){var e=[],f,g,j,h,m,l=this.context,
n,o,u=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);g=0;for(j=l.length;g<j;g++){var r=new s(l[g]);if("table"===b)f=c.call(r,l[g],g),f!==k&&e.push(f);else if("columns"===b||"rows"===b)f=c.call(r,l[g],this[g],g),f!==k&&e.push(f);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){o=this[g];"column-rows"===b&&(n=Ba(l[g],u.opts));h=0;for(m=o.length;h<m;h++)f=o[h],f="cell"===b?c.call(r,l[g],f.row,f.column,g,h):c.call(r,l[g],f,g,h,n),f!==k&&e.push(f)}}return e.length||d?(a=new s(l,a?
e.concat.apply([],e):e),b=a.selector,b.rows=u.rows,b.cols=u.cols,b.opts=u.opts,a):this},lastIndexOf:w.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(w.map)b=w.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new s(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:w.pop,push:w.push,reduce:w.reduce||function(a,b){return ib(this,a,b,0,this.length,
1)},reduceRight:w.reduceRight||function(a,b){return ib(this,a,b,this.length-1,-1,-1)},reverse:w.reverse,selector:null,shift:w.shift,slice:function(){return new s(this.context,this)},sort:w.sort,splice:w.splice,toArray:function(){return w.slice.call(this)},to$:function(){return h(this)},toJQuery:function(){return h(this)},unique:function(){return new s(this.context,qa(this))},unshift:w.unshift});s.extend=function(a,b,c){if(c.length&&b&&(b instanceof s||b.__dt_wrapper)){var d,e,f,g=function(a,b,c){return function(){var d=
b.apply(a,arguments);s.extend(d,d,c.methodExt);return d}};d=0;for(e=c.length;d<e;d++)f=c[d],b[f.name]="function"===typeof f.val?g(a,f.val,f):h.isPlainObject(f.val)?{}:f.val,b[f.name].__dt_wrapper=!0,s.extend(a,b[f.name],f.propExt)}};s.register=o=function(a,b){if(h.isArray(a))for(var c=0,d=a.length;c<d;c++)s.register(a[c],b);else for(var e=a.split("."),f=Sb,g,j,c=0,d=e.length;c<d;c++){g=(j=-1!==e[c].indexOf("()"))?e[c].replace("()",""):e[c];var i;a:{i=0;for(var m=f.length;i<m;i++)if(f[i].name===g){i=
f[i];break a}i=null}i||(i={name:g,val:{},methodExt:[],propExt:[]},f.push(i));c===d-1?i.val=b:f=j?i.methodExt:i.propExt}};s.registerPlural=u=function(a,b,c){s.register(a,c);s.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof s?a.length?h.isArray(a[0])?new s(a.context,a[0]):a[0]:k:a})};o("tables()",function(a){var b;if(a){b=s;var c=this.context;if("number"===typeof a)a=[c[a]];else var d=h.map(c,function(a){return a.nTable}),a=h(d).filter(a).map(function(){var a=h.inArray(this,
d);return c[a]}).toArray();b=new b(a)}else b=this;return b});o("table()",function(a){var a=this.tables(a),b=a.context;return b.length?new s(b[0]):a});u("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});u("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});u("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});u("tables().footer()",
"table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});u("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});o("draw()",function(a){return this.iterator("table",function(b){"page"===a?P(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),T(b,!1===a))})});o("page()",function(a){return a===k?this.page.info().page:this.iterator("table",function(b){Ta(b,a)})});o("page.info()",function(){if(0===
this.context.length)return k;var a=this.context[0],b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,serverSide:"ssp"===y(a)}});o("page.len()",function(a){return a===k?0!==this.context.length?this.context[0]._iDisplayLength:k:this.iterator("table",function(b){Ra(b,a)})});var Tb=function(a,b,c){if(c){var d=new s(a);
d.one("draw",function(){c(d.ajax.json())})}if("ssp"==y(a))T(a,b);else{C(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();sa(a,[],function(c){oa(a);for(var c=ta(a,c),d=0,e=c.length;d<e;d++)O(a,c[d]);T(a,b);C(a,!1)})}};o("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});o("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});o("ajax.reload()",function(a,b){return this.iterator("table",function(c){Tb(c,!1===b,a)})});o("ajax.url()",function(a){var b=
this.context;if(a===k){if(0===b.length)return k;b=b[0];return b.ajax?h.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){h.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});o("ajax.url().load()",function(a,b){return this.iterator("table",function(c){Tb(c,!1===b,a)})});var ab=function(a,b,c,d,e){var f=[],g,j,i,m,l,n;i=typeof b;if(!b||"string"===i||"function"===i||b.length===k)b=[b];i=0;for(m=b.length;i<m;i++){j=b[i]&&b[i].split&&!b[i].match(/[\[\(:]/)?b[i].split(","):
[b[i]];l=0;for(n=j.length;l<n;l++)(g=c("string"===typeof j[l]?h.trim(j[l]):j[l]))&&g.length&&(f=f.concat(g))}a=x.selector[a];if(a.length){i=0;for(m=a.length;i<m;i++)f=a[i](d,e,f)}return qa(f)},bb=function(a){a||(a={});a.filter&&a.search===k&&(a.search=a.filter);return h.extend({search:"none",order:"current",page:"all"},a)},cb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Ba=function(a,b){var c,
d,e,f=[],g=a.aiDisplay;e=a.aiDisplayMaster;var j=b.search;c=b.order;d=b.page;if("ssp"==y(a))return"removed"===j?[]:Y(0,e.length);if("current"==d){c=a._iDisplayStart;for(d=a.fnDisplayEnd();c<d;c++)f.push(g[c])}else if("current"==c||"applied"==c)if("none"==j)f=e.slice();else if("applied"==j)f=g.slice();else{if("removed"==j){var i={};c=0;for(d=g.length;c<d;c++)i[g[c]]=null;f=h.map(e,function(a){return!i.hasOwnProperty(a)?a:null})}}else if("index"==c||"original"==c){c=0;for(d=a.aoData.length;c<d;c++)"none"==
j?f.push(c):(e=h.inArray(c,g),(-1===e&&"removed"==j||0<=e&&"applied"==j)&&f.push(c))}return f};o("rows()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=bb(b),c=this.iterator("table",function(c){var e=b,f;return ab("row",a,function(a){var b=Ob(a),i=c.aoData;if(b!==null&&!e)return[b];f||(f=Ba(c,e));if(b!==null&&h.inArray(b,f)!==-1)return[b];if(a===null||a===k||a==="")return f;if(typeof a==="function")return h.map(f,function(b){var c=i[b];return a(b,c._aData,c.nTr)?b:null});if(a.nodeName){var b=
a._DT_RowIndex,m=a._DT_CellIndex;if(b!==k)return i[b]&&i[b].nTr===a?[b]:[];if(m)return i[m.row]&&i[m.row].nTr===a?[m.row]:[];b=h(a).closest("*[data-dt-row]");return b.length?[b.data("dt-row")]:[]}if(typeof a==="string"&&a.charAt(0)==="#"){b=c.aIds[a.replace(/^#/,"")];if(b!==k)return[b.idx]}b=Rb(ja(c.aoData,f,"nTr"));return h(b).filter(a).map(function(){return this._DT_RowIndex}).toArray()},c,e)},1);c.selector.rows=a;c.selector.opts=b;return c});o("rows().nodes()",function(){return this.iterator("row",
function(a,b){return a.aoData[b].nTr||k},1)});o("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return ja(a.aoData,b,"_aData")},1)});u("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){var d=b.aoData[c];return"search"===a?d._aFilterData:d._aSortData},1)});u("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){da(b,c,a)})});u("rows().indexes()","row().index()",function(){return this.iterator("row",
function(a,b){return b},1)});u("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,d=0,e=c.length;d<e;d++)for(var f=0,g=this[d].length;f<g;f++){var h=c[d].rowIdFn(c[d].aoData[this[d][f]]._aData);b.push((!0===a?"#":"")+h)}return new s(c,b)});u("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,f=e[c],g,h,i,m,l;e.splice(c,1);g=0;for(h=e.length;g<h;g++)if(i=e[g],l=i.anCells,null!==i.nTr&&(i.nTr._DT_RowIndex=g),null!==l){i=0;for(m=
l.length;i<m;i++)l[i]._DT_CellIndex.row=g}pa(b.aiDisplayMaster,c);pa(b.aiDisplay,c);pa(a[d],c,!1);0<b._iRecordsDisplay&&b._iRecordsDisplay--;Sa(b);c=b.rowIdFn(f._aData);c!==k&&delete b.aIds[c]});this.iterator("table",function(a){for(var c=0,d=a.aoData.length;c<d;c++)a.aoData[c].idx=c});return this});o("rows.add()",function(a){var b=this.iterator("table",function(b){var c,f,g,h=[];f=0;for(g=a.length;f<g;f++)c=a[f],c.nodeName&&"TR"===c.nodeName.toUpperCase()?h.push(na(b,c)[0]):h.push(O(b,c));return h},
1),c=this.rows(-1);c.pop();h.merge(c,b);return c});o("row()",function(a,b){return cb(this.rows(a,b))});o("row().data()",function(a){var b=this.context;if(a===k)return b.length&&this.length?b[0].aoData[this[0]]._aData:k;var c=b[0].aoData[this[0]];c._aData=a;h.isArray(a)&&c.nTr.id&&N(b[0].rowId)(a,c.nTr.id);da(b[0],this[0],"data");return this});o("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});o("row.add()",function(a){a instanceof h&&
a.length&&(a=a[0]);var b=this.iterator("table",function(b){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?na(b,a)[0]:O(b,a)});return this.row(b[0])});var db=function(a,b){var c=a.context;if(c.length&&(c=c[0].aoData[b!==k?b:a[0]])&&c._details)c._details.remove(),c._detailsShow=k,c._details=k},Ub=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];if(d._details){(d._detailsShow=b)?d._details.insertAfter(d.nTr):d._details.detach();var e=c[0],f=new s(e),g=e.aoData;f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");
0<D(g,"_details").length&&(f.on("draw.dt.DT_details",function(a,b){e===b&&f.rows({page:"current"}).eq(0).each(function(a){a=g[a];a._detailsShow&&a._details.insertAfter(a.nTr)})}),f.on("column-visibility.dt.DT_details",function(a,b){if(e===b)for(var c,d=V(b),f=0,h=g.length;f<h;f++)c=g[f],c._details&&c._details.children("td[colspan]").attr("colspan",d)}),f.on("destroy.dt.DT_details",function(a,b){if(e===b)for(var c=0,d=g.length;c<d;c++)g[c]._details&&db(f,c)}))}}};o("row().child()",function(a,b){var c=
this.context;if(a===k)return c.length&&this.length?c[0].aoData[this[0]]._details:k;if(!0===a)this.child.show();else if(!1===a)db(this);else if(c.length&&this.length){var d=c[0],c=c[0].aoData[this[0]],e=[],f=function(a,b){if(h.isArray(a)||a instanceof h)for(var c=0,k=a.length;c<k;c++)f(a[c],b);else a.nodeName&&"tr"===a.nodeName.toLowerCase()?e.push(a):(c=h("<tr><td/></tr>").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=V(d),e.push(c[0]))};f(a,b);c._details&&c._details.detach();c._details=h(e);
c._detailsShow&&c._details.insertAfter(c.nTr)}return this});o(["row().child.show()","row().child().show()"],function(){Ub(this,!0);return this});o(["row().child.hide()","row().child().hide()"],function(){Ub(this,!1);return this});o(["row().child.remove()","row().child().remove()"],function(){db(this);return this});o("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var bc=/^([^:]+):(name|visIdx|visible)$/,Vb=function(a,b,
c,d,e){for(var c=[],d=0,f=e.length;d<f;d++)c.push(B(a,e[d],b));return c};o("columns()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=bb(b),c=this.iterator("table",function(c){var e=a,f=b,g=c.aoColumns,j=D(g,"sName"),i=D(g,"nTh");return ab("column",e,function(a){var b=Ob(a);if(a==="")return Y(g.length);if(b!==null)return[b>=0?b:g.length+b];if(typeof a==="function"){var e=Ba(c,f);return h.map(g,function(b,f){return a(f,Vb(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(bc):
"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],10);if(b<0){var n=h.map(g,function(a,b){return a.bVisible?b:null});return[n[n.length+b]]}return[aa(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null});default:return[]}if(a.nodeName&&a._DT_CellIndex)return[a._DT_CellIndex.column];b=h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray();if(b.length||!a.nodeName)return b;b=h(a).closest("*[data-dt-column]");return b.length?[b.data("dt-column")]:[]},c,f)},
1);c.selector.cols=a;c.selector.opts=b;return c});u("columns().header()","column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});u("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});u("columns().data()","column().data()",function(){return this.iterator("column-rows",Vb,1)});u("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},
1)});u("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,f){return ja(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});u("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ja(a.aoData,e,"anCells",b)},1)});u("columns().visible()","column().visible()",function(a,b){var c=this.iterator("column",function(b,c){if(a===k)return b.aoColumns[c].bVisible;var f=b.aoColumns,g=f[c],j=b.aoData,
i,m,l;if(a!==k&&g.bVisible!==a){if(a){var n=h.inArray(!0,D(f,"bVisible"),c+1);i=0;for(m=j.length;i<m;i++)l=j[i].nTr,f=j[i].anCells,l&&l.insertBefore(f[c],f[n]||null)}else h(D(b.aoData,"anCells",c)).detach();g.bVisible=a;fa(b,b.aoHeader);fa(b,b.aoFooter);b.aiDisplay.length||h(b.nTBody).find("td[colspan]").attr("colspan",V(b));xa(b)}});a!==k&&(this.iterator("column",function(c,e){r(c,null,"column-visibility",[c,e,a,b])}),(b===k||b)&&this.columns.adjust());return c});u("columns().indexes()","column().index()",
function(a){return this.iterator("column",function(b,c){return"visible"===a?ba(b,c):c},1)});o("columns.adjust()",function(){return this.iterator("table",function(a){$(a)},1)});o("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return aa(c,b);if("fromData"===a||"toVisible"===a)return ba(c,b)}});o("column()",function(a,b){return cb(this.columns(a,b))});o("cells()",function(a,b,c){h.isPlainObject(a)&&(a.row===k?(c=a,a=null):(c=b,b=null));
h.isPlainObject(b)&&(c=b,b=null);if(null===b||b===k)return this.iterator("table",function(b){var d=a,e=bb(c),f=b.aoData,g=Ba(b,e),j=Rb(ja(f,g,"anCells")),i=h([].concat.apply([],j)),l,m=b.aoColumns.length,n,o,u,s,r,v;return ab("cell",d,function(a){var c=typeof a==="function";if(a===null||a===k||c){n=[];o=0;for(u=g.length;o<u;o++){l=g[o];for(s=0;s<m;s++){r={row:l,column:s};if(c){v=f[l];a(r,B(b,l,s),v.anCells?v.anCells[s]:null)&&n.push(r)}else n.push(r)}}return n}if(h.isPlainObject(a))return a.column!==
k&&a.row!==k&&h.inArray(a.row,g)!==-1?[a]:[];c=i.filter(a).map(function(a,b){return{row:b._DT_CellIndex.row,column:b._DT_CellIndex.column}}).toArray();if(c.length||!a.nodeName)return c;v=h(a).closest("*[data-dt-row]");return v.length?[{row:v.data("dt-row"),column:v.data("dt-column")}]:[]},b,e)});var d=this.columns(b),e=this.rows(a),f,g,j,i,m;this.iterator("table",function(a,b){f=[];g=0;for(j=e[b].length;g<j;g++){i=0;for(m=d[b].length;i<m;i++)f.push({row:e[b][g],column:d[b][i]})}},1);var l=this.cells(f,
c);h.extend(l.selector,{cols:b,rows:a,opts:c});return l});u("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b])&&a.anCells?a.anCells[c]:k},1)});o("cells().data()",function(){return this.iterator("cell",function(a,b,c){return B(a,b,c)},1)});u("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});u("cells().render()","cell().render()",
function(a){return this.iterator("cell",function(b,c,d){return B(b,c,d,a)},1)});u("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:ba(a,c)}},1)});u("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,d){da(b,c,a,d)})});o("cell()",function(a,b,c){return cb(this.cells(a,b,c))});o("cell().data()",function(a){var b=this.context,c=this[0];if(a===k)return b.length&&c.length?B(b[0],
c[0].row,c[0].column):k;kb(b[0],c[0].row,c[0].column,a);da(b[0],c[0].row,"data",c[0].column);return this});o("order()",function(a,b){var c=this.context;if(a===k)return 0!==c.length?c[0].aaSorting:k;"number"===typeof a?a=[[a,b]]:a.length&&!h.isArray(a[0])&&(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=a.slice()})});o("order.listener()",function(a,b,c){return this.iterator("table",function(d){Ma(d,a,b,c)})});o("order.fixed()",function(a){if(!a){var b=
this.context,b=b.length?b[0].aaSortingFixed:k;return h.isArray(b)?{pre:b}:b}return this.iterator("table",function(b){b.aaSortingFixed=h.extend(!0,{},a)})});o(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];h.each(b[d],function(b,c){e.push([c,a])});c.aaSorting=e})});o("search()",function(a,b,c,d){var e=this.context;return a===k?0!==e.length?e[0].oPreviousSearch.sSearch:k:this.iterator("table",function(e){e.oFeatures.bFilter&&ga(e,
h.extend({},e.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});u("columns().search()","column().search()",function(a,b,c,d){return this.iterator("column",function(e,f){var g=e.aoPreSearchCols;if(a===k)return g[f].sSearch;e.oFeatures.bFilter&&(h.extend(g[f],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),ga(e,e.oPreviousSearch,1))})});o("state()",function(){return this.context.length?this.context[0].oSavedState:
null});o("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});o("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});o("state.save()",function(){return this.iterator("table",function(a){xa(a)})});n.versionCheck=n.fnVersionCheck=function(a){for(var b=n.version.split("."),a=a.split("."),c,d,e=0,f=a.length;e<f;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};n.isDataTable=
n.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;if(a instanceof n.Api)return!0;h.each(n.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?h("table",e.nScrollFoot)[0]:null;if(e.nTable===b||f===b||g===b)c=!0});return c};n.tables=n.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(n.settings,function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable});return b?new s(c):c};n.camelToHungarian=J;o("$()",function(a,b){var c=
this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){o(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0]=h.map(a[0].split(/\s/),function(a){return!a.match(/\.dt\b/)?a+".dt":a}).join(" ");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});o("clear()",function(){return this.iterator("table",function(a){oa(a)})});o("settings()",function(){return new s(this.context,this.context)});o("init()",function(){var a=
this.context;return a.length?a[0].oInit:null});o("data()",function(){return this.iterator("table",function(a){return D(a.aoData,"_aData")}).flatten()});o("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),o;b.bDestroying=!0;r(b,"aoDestroyCallback","destroy",[b]);a||(new s(b)).columns().visible(!0);k.off(".DT").find(":not(tbody *)").off(".DT");
h(E).off(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));b.aaSorting=[];b.aaSortingFixed=[];wa(b);h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable),
(o=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%o])}));c=h.inArray(b,n.settings);-1!==c&&n.settings.splice(c,1)})});h.each(["column","row","cell"],function(a,b){o(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,m){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,m)})})});o("i18n()",function(a,b,c){var d=this.context[0],a=S(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:
a._);return a.replace("%d",c)});n.version="1.10.19";n.settings=[];n.models={};n.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};n.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};n.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,
sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};n.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,
bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+
a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},
oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},
n.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};Z(n.defaults);n.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};
Z(n.defaults.column);n.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],
aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",
iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal:
this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};n.ext=x={buttons:{},
classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:n.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:n.version};h.extend(x,{afnFiltering:x.search,aTypes:x.type.detect,ofnSearch:x.type.search,oSort:x.type.order,afnSortData:x.order,aoFeatures:x.feature,oApi:x.internal,oStdClasses:x.classes,oPagination:x.pager});
h.extend(n.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",
sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",
sJUIHeader:"",sJUIFooter:""});var Lb=n.ext.pager;h.extend(Lb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[ia(a,b)]},simple_numbers:function(a,b){return["previous",ia(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ia(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",ia(a,b),"last"]},_numbers:ia,numbers_length:7});h.extend(!0,n.ext.renderer,{pageButton:{_:function(a,b,c,d,e,
f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},m,l,n=0,o=function(b,d){var k,s,u,r,v=function(b){Ta(a,b.data.action,true)};k=0;for(s=d.length;k<s;k++){r=d[k];if(h.isArray(r)){u=h("<"+(r.DT_el||"div")+"/>").appendTo(b);o(u,r)}else{m=null;l="";switch(r){case "ellipsis":b.append('<span class="ellipsis">&#x2026;</span>');break;case "first":m=j.sFirst;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":m=j.sPrevious;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":m=
j.sNext;l=r+(e<f-1?"":" "+g.sPageButtonDisabled);break;case "last":m=j.sLast;l=r+(e<f-1?"":" "+g.sPageButtonDisabled);break;default:m=r+1;l=e===r?g.sPageButtonActive:""}if(m!==null){u=h("<a>",{"class":g.sPageButton+" "+l,"aria-controls":a.sTableId,"aria-label":i[r],"data-dt-idx":n,tabindex:a.iTabIndex,id:c===0&&typeof r==="string"?a.sTableId+"_"+r:null}).html(m).appendTo(b);Wa(u,{action:r},v);n++}}}},s;try{s=h(b).find(H.activeElement).data("dt-idx")}catch(u){}o(h(b).empty(),d);s!==k&&h(b).find("[data-dt-idx="+
s+"]").focus()}}});h.extend(n.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return $a(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&!Zb.test(a))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||M(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return $a(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Qb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Qb(a,c,!0)?"html-num-fmt"+c:null},function(a){return M(a)||
"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(n.ext.type.search,{html:function(a){return M(a)?a:"string"===typeof a?a.replace(Nb," ").replace(Aa,""):""},string:function(a){return M(a)?a:"string"===typeof a?a.replace(Nb," "):a}});var za=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Pb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(x.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return M(a)?
"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return M(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,b){return a<b?1:a>b?-1:0}});Da("");h.extend(!0,n.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:
c.sSortingClass)}})},jqueryui:function(a,b,c,d){h("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]==
"asc"?d.sSortJUIAsc:h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});var eb=function(a){return"string"===typeof a?a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):a};n.render={number:function(a,b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return eb(f);h=h.toFixed(c);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,
a)+f+(e||"")}}},text:function(){return{display:eb,filter:eb}}};h.extend(n.ext.internal,{_fnExternApiFunc:Mb,_fnBuildAjax:sa,_fnAjaxUpdate:mb,_fnAjaxParameters:vb,_fnAjaxUpdateDraw:wb,_fnAjaxDataSrc:ta,_fnAddColumn:Ea,_fnColumnOptions:ka,_fnAdjustColumnSizing:$,_fnVisibleToColumnIndex:aa,_fnColumnIndexToVisible:ba,_fnVisbleColumns:V,_fnGetColumns:ma,_fnColumnTypes:Ga,_fnApplyColumnDefs:jb,_fnHungarianMap:Z,_fnCamelToHungarian:J,_fnLanguageCompat:Ca,_fnBrowserDetect:hb,_fnAddData:O,_fnAddTr:na,_fnNodeToDataIndex:function(a,
b){return b._DT_RowIndex!==k?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:kb,_fnSplitObjNotation:Ja,_fnGetObjectDataFn:S,_fnSetObjectDataFn:N,_fnGetDataMaster:Ka,_fnClearTable:oa,_fnDeleteIndex:pa,_fnInvalidate:da,_fnGetRowElements:Ia,_fnCreateTr:Ha,_fnBuildHead:lb,_fnDrawHead:fa,_fnDraw:P,_fnReDraw:T,_fnAddOptionsHtml:ob,_fnDetectHeader:ea,_fnGetUniqueThs:ra,_fnFeatureHtmlFilter:qb,_fnFilterComplete:ga,_fnFilterCustom:zb,
_fnFilterColumn:yb,_fnFilter:xb,_fnFilterCreateSearch:Pa,_fnEscapeRegex:Qa,_fnFilterData:Ab,_fnFeatureHtmlInfo:tb,_fnUpdateInfo:Db,_fnInfoMacros:Eb,_fnInitialise:ha,_fnInitComplete:ua,_fnLengthChange:Ra,_fnFeatureHtmlLength:pb,_fnFeatureHtmlPaginate:ub,_fnPageChange:Ta,_fnFeatureHtmlProcessing:rb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:sb,_fnScrollDraw:la,_fnApplyToChildren:I,_fnCalculateColumnWidths:Fa,_fnThrottle:Oa,_fnConvertToWidth:Fb,_fnGetWidestNode:Gb,_fnGetMaxLenString:Hb,_fnStringToCss:v,
_fnSortFlatten:X,_fnSort:nb,_fnSortAria:Jb,_fnSortListener:Va,_fnSortAttachListener:Ma,_fnSortingClasses:wa,_fnSortData:Ib,_fnSaveState:xa,_fnLoadState:Kb,_fnSettingsFromNode:ya,_fnLog:K,_fnMap:F,_fnBindAction:Wa,_fnCallbackReg:z,_fnCallbackFire:r,_fnLengthOverflow:Sa,_fnRenderer:Na,_fnDataSource:y,_fnRowAttributes:La,_fnExtend:Xa,_fnCalculateEnd:function(){}});h.fn.dataTable=n;n.$=h;h.fn.dataTableSettings=n.settings;h.fn.dataTableExt=n.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};
h.each(n,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable});

View File

@@ -0,0 +1,581 @@
/*
* DOM.event.move 2.0.0
* @author Stephen Band
* @copyright Stephen Band
* @license http://www.wtfpl.net/txt/copying/ (DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE)
*/
(function(fn) {
if (typeof define === 'function' && define.amd) {
define([], fn);
} else if ((typeof module !== "undefined" && module !== null) && module.exports) {
module.exports = fn;
} else {
fn();
}
})(function(){
var assign = Object.assign || window.jQuery && jQuery.extend;
// Number of pixels a pressed pointer travels before movestart
// event is fired.
var threshold = 8;
// Shim for requestAnimationFrame, falling back to timer. See:
// see http://paulirish.com/2011/requestanimationframe-for-smart-animating/
var requestFrame = (function(){
return (
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(fn, element){
return window.setTimeout(function(){
fn();
}, 25);
}
);
})();
// Shim for customEvent
// see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill
(function () {
if ( typeof window.CustomEvent === "function" ) return false;
function CustomEvent ( event, params ) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent( 'CustomEvent' );
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
return evt;
}
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent;
})();
var ignoreTags = {
textarea: true,
input: true,
select: true,
button: true
};
var mouseevents = {
move: 'mousemove',
cancel: 'mouseup dragstart',
end: 'mouseup'
};
var touchevents = {
move: 'touchmove',
cancel: 'touchend',
end: 'touchend'
};
var rspaces = /\s+/;
// DOM Events
var eventOptions = { bubbles: true, cancelable: true };
var eventsSymbol = typeof Symbol === "function" ? Symbol('events') : {};
function createEvent(type) {
return new CustomEvent(type, eventOptions);
}
function getEvents(node) {
return node[eventsSymbol] || (node[eventsSymbol] = {});
}
function on(node, types, fn, data, selector) {
types = types.split(rspaces);
var events = getEvents(node);
var i = types.length;
var handlers, type;
function handler(e) { fn(e, data); }
while (i--) {
type = types[i];
handlers = events[type] || (events[type] = []);
handlers.push([fn, handler]);
node.addEventListener(type, handler);
}
}
function off(node, types, fn, selector) {
types = types.split(rspaces);
var events = getEvents(node);
var i = types.length;
var type, handlers, k;
if (!events) { return; }
while (i--) {
type = types[i];
handlers = events[type];
if (!handlers) { continue; }
k = handlers.length;
while (k--) {
if (handlers[k][0] === fn) {
node.removeEventListener(type, handlers[k][1]);
handlers.splice(k, 1);
}
}
}
}
function trigger(node, type, properties) {
// Don't cache events. It prevents you from triggering an event of a
// given type from inside the handler of another event of that type.
var event = createEvent(type);
if (properties) { assign(event, properties); }
node.dispatchEvent(event);
}
// Constructors
function Timer(fn){
var callback = fn,
active = false,
running = false;
function trigger(time) {
if (active){
callback();
requestFrame(trigger);
running = true;
active = false;
}
else {
running = false;
}
}
this.kick = function(fn) {
active = true;
if (!running) { trigger(); }
};
this.end = function(fn) {
var cb = callback;
if (!fn) { return; }
// If the timer is not running, simply call the end callback.
if (!running) {
fn();
}
// If the timer is running, and has been kicked lately, then
// queue up the current callback and the end callback, otherwise
// just the end callback.
else {
callback = active ?
function(){ cb(); fn(); } :
fn ;
active = true;
}
};
}
// Functions
function noop() {}
function preventDefault(e) {
e.preventDefault();
}
function isIgnoreTag(e) {
return !!ignoreTags[e.target.tagName.toLowerCase()];
}
function isPrimaryButton(e) {
// Ignore mousedowns on any button other than the left (or primary)
// mouse button, or when a modifier key is pressed.
return (e.which === 1 && !e.ctrlKey && !e.altKey);
}
function identifiedTouch(touchList, id) {
var i, l;
if (touchList.identifiedTouch) {
return touchList.identifiedTouch(id);
}
// touchList.identifiedTouch() does not exist in
// webkit yet… we must do the search ourselves...
i = -1;
l = touchList.length;
while (++i < l) {
if (touchList[i].identifier === id) {
return touchList[i];
}
}
}
function changedTouch(e, data) {
var touch = identifiedTouch(e.changedTouches, data.identifier);
// This isn't the touch you're looking for.
if (!touch) { return; }
// Chrome Android (at least) includes touches that have not
// changed in e.changedTouches. That's a bit annoying. Check
// that this touch has changed.
if (touch.pageX === data.pageX && touch.pageY === data.pageY) { return; }
return touch;
}
// Handlers that decide when the first movestart is triggered
function mousedown(e){
// Ignore non-primary buttons
if (!isPrimaryButton(e)) { return; }
// Ignore form and interactive elements
if (isIgnoreTag(e)) { return; }
on(document, mouseevents.move, mousemove, e);
on(document, mouseevents.cancel, mouseend, e);
}
function mousemove(e, data){
checkThreshold(e, data, e, removeMouse);
}
function mouseend(e, data) {
removeMouse();
}
function removeMouse() {
off(document, mouseevents.move, mousemove);
off(document, mouseevents.cancel, mouseend);
}
function touchstart(e) {
// Don't get in the way of interaction with form elements
if (ignoreTags[e.target.tagName.toLowerCase()]) { return; }
var touch = e.changedTouches[0];
// iOS live updates the touch objects whereas Android gives us copies.
// That means we can't trust the touchstart object to stay the same,
// so we must copy the data. This object acts as a template for
// movestart, move and moveend event objects.
var data = {
target: touch.target,
pageX: touch.pageX,
pageY: touch.pageY,
identifier: touch.identifier,
// The only way to make handlers individually unbindable is by
// making them unique.
touchmove: function(e, data) { touchmove(e, data); },
touchend: function(e, data) { touchend(e, data); }
};
on(document, touchevents.move, data.touchmove, data);
on(document, touchevents.cancel, data.touchend, data);
}
function touchmove(e, data) {
var touch = changedTouch(e, data);
if (!touch) { return; }
checkThreshold(e, data, touch, removeTouch);
}
function touchend(e, data) {
var touch = identifiedTouch(e.changedTouches, data.identifier);
if (!touch) { return; }
removeTouch(data);
}
function removeTouch(data) {
off(document, touchevents.move, data.touchmove);
off(document, touchevents.cancel, data.touchend);
}
function checkThreshold(e, data, touch, fn) {
var distX = touch.pageX - data.pageX;
var distY = touch.pageY - data.pageY;
// Do nothing if the threshold has not been crossed.
if ((distX * distX) + (distY * distY) < (threshold * threshold)) { return; }
triggerStart(e, data, touch, distX, distY, fn);
}
function triggerStart(e, data, touch, distX, distY, fn) {
var touches = e.targetTouches;
var time = e.timeStamp - data.timeStamp;
// Create a movestart object with some special properties that
// are passed only to the movestart handlers.
var template = {
altKey: e.altKey,
ctrlKey: e.ctrlKey,
shiftKey: e.shiftKey,
startX: data.pageX,
startY: data.pageY,
distX: distX,
distY: distY,
deltaX: distX,
deltaY: distY,
pageX: touch.pageX,
pageY: touch.pageY,
velocityX: distX / time,
velocityY: distY / time,
identifier: data.identifier,
targetTouches: touches,
finger: touches ? touches.length : 1,
enableMove: function() {
this.moveEnabled = true;
this.enableMove = noop;
e.preventDefault();
}
};
// Trigger the movestart event.
trigger(data.target, 'movestart', template);
// Unbind handlers that tracked the touch or mouse up till now.
fn(data);
}
// Handlers that control what happens following a movestart
function activeMousemove(e, data) {
var timer = data.timer;
data.touch = e;
data.timeStamp = e.timeStamp;
timer.kick();
}
function activeMouseend(e, data) {
var target = data.target;
var event = data.event;
var timer = data.timer;
removeActiveMouse();
endEvent(target, event, timer, function() {
// Unbind the click suppressor, waiting until after mouseup
// has been handled.
setTimeout(function(){
off(target, 'click', preventDefault);
}, 0);
});
}
function removeActiveMouse() {
off(document, mouseevents.move, activeMousemove);
off(document, mouseevents.end, activeMouseend);
}
function activeTouchmove(e, data) {
var event = data.event;
var timer = data.timer;
var touch = changedTouch(e, event);
if (!touch) { return; }
// Stop the interface from gesturing
e.preventDefault();
event.targetTouches = e.targetTouches;
data.touch = touch;
data.timeStamp = e.timeStamp;
timer.kick();
}
function activeTouchend(e, data) {
var target = data.target;
var event = data.event;
var timer = data.timer;
var touch = identifiedTouch(e.changedTouches, event.identifier);
// This isn't the touch you're looking for.
if (!touch) { return; }
removeActiveTouch(data);
endEvent(target, event, timer);
}
function removeActiveTouch(data) {
off(document, touchevents.move, data.activeTouchmove);
off(document, touchevents.end, data.activeTouchend);
}
// Logic for triggering move and moveend events
function updateEvent(event, touch, timeStamp) {
var time = timeStamp - event.timeStamp;
event.distX = touch.pageX - event.startX;
event.distY = touch.pageY - event.startY;
event.deltaX = touch.pageX - event.pageX;
event.deltaY = touch.pageY - event.pageY;
// Average the velocity of the last few events using a decay
// curve to even out spurious jumps in values.
event.velocityX = 0.3 * event.velocityX + 0.7 * event.deltaX / time;
event.velocityY = 0.3 * event.velocityY + 0.7 * event.deltaY / time;
event.pageX = touch.pageX;
event.pageY = touch.pageY;
}
function endEvent(target, event, timer, fn) {
timer.end(function(){
trigger(target, 'moveend', event);
return fn && fn();
});
}
// Set up the DOM
function movestart(e) {
if (e.defaultPrevented) { return; }
if (!e.moveEnabled) { return; }
var event = {
startX: e.startX,
startY: e.startY,
pageX: e.pageX,
pageY: e.pageY,
distX: e.distX,
distY: e.distY,
deltaX: e.deltaX,
deltaY: e.deltaY,
velocityX: e.velocityX,
velocityY: e.velocityY,
identifier: e.identifier,
targetTouches: e.targetTouches,
finger: e.finger
};
var data = {
target: e.target,
event: event,
timer: new Timer(update),
touch: undefined,
timeStamp: e.timeStamp
};
function update(time) {
updateEvent(event, data.touch, data.timeStamp);
trigger(data.target, 'move', event);
}
if (e.identifier === undefined) {
// We're dealing with a mouse event.
// Stop clicks from propagating during a move
on(e.target, 'click', preventDefault);
on(document, mouseevents.move, activeMousemove, data);
on(document, mouseevents.end, activeMouseend, data);
}
else {
// In order to unbind correct handlers they have to be unique
data.activeTouchmove = function(e, data) { activeTouchmove(e, data); };
data.activeTouchend = function(e, data) { activeTouchend(e, data); };
// We're dealing with a touch.
on(document, touchevents.move, data.activeTouchmove, data);
on(document, touchevents.end, data.activeTouchend, data);
}
}
on(document, 'mousedown', mousedown);
on(document, 'touchstart', touchstart);
on(document, 'movestart', movestart);
// jQuery special events
//
// jQuery event objects are copies of DOM event objects. They need
// a little help copying the move properties across.
if (!window.jQuery) { return; }
var properties = ("startX startY pageX pageY distX distY deltaX deltaY velocityX velocityY").split(' ');
function enableMove1(e) { e.enableMove(); }
function enableMove2(e) { e.enableMove(); }
function enableMove3(e) { e.enableMove(); }
function add(handleObj) {
var handler = handleObj.handler;
handleObj.handler = function(e) {
// Copy move properties across from originalEvent
var i = properties.length;
var property;
while(i--) {
property = properties[i];
e[property] = e.originalEvent[property];
}
handler.apply(this, arguments);
};
}
jQuery.event.special.movestart = {
setup: function() {
// Movestart must be enabled to allow other move events
on(this, 'movestart', enableMove1);
// Do listen to DOM events
return false;
},
teardown: function() {
off(this, 'movestart', enableMove1);
return false;
},
add: add
};
jQuery.event.special.move = {
setup: function() {
on(this, 'movestart', enableMove2);
return false;
},
teardown: function() {
off(this, 'movestart', enableMove2);
return false;
},
add: add
};
jQuery.event.special.moveend = {
setup: function() {
on(this, 'movestart', enableMove3);
return false;
},
teardown: function() {
off(this, 'movestart', enableMove3);
return false;
},
add: add
};
});

View File

@@ -0,0 +1,157 @@
/*
* twentytwenty https://github.com/zurb/twentytwenty
* @author Zurb
* @copyright Zurb
* @license ISC License
*/
(function($){
$.fn.twentytwenty = function(options) {
var options = $.extend({
default_offset_pct: 0.5,
orientation: 'horizontal',
before_label: 'Before',
after_label: 'After',
no_overlay: false,
move_slider_on_hover: false,
move_with_handle_only: true,
click_to_move: false
}, options);
return this.each(function() {
var sliderPct = options.default_offset_pct;
var container = $(this);
var sliderOrientation = options.orientation;
var beforeDirection = (sliderOrientation === 'vertical') ? 'down' : 'left';
var afterDirection = (sliderOrientation === 'vertical') ? 'up' : 'right';
container.wrap("<div class='twentytwenty-wrapper twentytwenty-" + sliderOrientation + "'></div>");
if(!options.no_overlay) {
container.append("<div class='twentytwenty-overlay'></div>");
var overlay = container.find(".twentytwenty-overlay");
overlay.append("<div class='twentytwenty-before-label' data-content='"+options.before_label+"'></div>");
overlay.append("<div class='twentytwenty-after-label' data-content='"+options.after_label+"'></div>");
}
var beforeImg = container.find("img:first");
var afterImg = container.find("img:last");
container.append("<div class='twentytwenty-handle'></div>");
var slider = container.find(".twentytwenty-handle");
slider.append("<span class='twentytwenty-" + beforeDirection + "-arrow'></span>");
slider.append("<span class='twentytwenty-" + afterDirection + "-arrow'></span>");
container.addClass("twentytwenty-container");
beforeImg.addClass("twentytwenty-before");
afterImg.addClass("twentytwenty-after");
var calcOffset = function(dimensionPct) {
var w = beforeImg.width();
var h = beforeImg.height();
return {
w: w+"px",
h: h+"px",
cw: (dimensionPct*w)+"px",
ch: (dimensionPct*h)+"px"
};
};
var adjustContainer = function(offset) {
if (sliderOrientation === 'vertical') {
beforeImg.css("clip", "rect(0,"+offset.w+","+offset.ch+",0)");
afterImg.css("clip", "rect("+offset.ch+","+offset.w+","+offset.h+",0)");
}
else {
beforeImg.css("clip", "rect(0,"+offset.cw+","+offset.h+",0)");
afterImg.css("clip", "rect(0,"+offset.w+","+offset.h+","+offset.cw+")");
}
container.css("height", offset.h);
};
var adjustSlider = function(pct) {
var offset = calcOffset(pct);
slider.css((sliderOrientation==="vertical") ? "top" : "left", (sliderOrientation==="vertical") ? offset.ch : offset.cw);
adjustContainer(offset);
};
// Return the number specified or the min/max number if it outside the range given.
var minMaxNumber = function(num, min, max) {
return Math.max(min, Math.min(max, num));
};
// Calculate the slider percentage based on the position.
var getSliderPercentage = function(positionX, positionY) {
var sliderPercentage = (sliderOrientation === 'vertical') ?
(positionY-offsetY)/imgHeight :
(positionX-offsetX)/imgWidth;
return minMaxNumber(sliderPercentage, 0, 1);
};
$(window).on("resize.twentytwenty", function(e) {
adjustSlider(sliderPct);
});
var offsetX = 0;
var offsetY = 0;
var imgWidth = 0;
var imgHeight = 0;
var onMoveStart = function(e) {
if (((e.distX > e.distY && e.distX < -e.distY) || (e.distX < e.distY && e.distX > -e.distY)) && sliderOrientation !== 'vertical') {
e.preventDefault();
}
else if (((e.distX < e.distY && e.distX < -e.distY) || (e.distX > e.distY && e.distX > -e.distY)) && sliderOrientation === 'vertical') {
e.preventDefault();
}
container.addClass("active");
offsetX = container.offset().left;
offsetY = container.offset().top;
imgWidth = beforeImg.width();
imgHeight = beforeImg.height();
};
var onMove = function(e) {
if (container.hasClass("active")) {
sliderPct = getSliderPercentage(e.pageX, e.pageY);
adjustSlider(sliderPct);
}
};
var onMoveEnd = function() {
container.removeClass("active");
};
var moveTarget = options.move_with_handle_only ? slider : container;
moveTarget.on("movestart",onMoveStart);
moveTarget.on("move",onMove);
moveTarget.on("moveend",onMoveEnd);
if (options.move_slider_on_hover) {
container.on("mouseenter", onMoveStart);
container.on("mousemove", onMove);
container.on("mouseleave", onMoveEnd);
}
slider.on("touchmove", function(e) {
e.preventDefault();
});
container.find("img").on("mousedown", function(event) {
event.preventDefault();
});
if (options.click_to_move) {
container.on('click', function(e) {
offsetX = container.offset().left;
offsetY = container.offset().top;
imgWidth = beforeImg.width();
imgHeight = beforeImg.height();
sliderPct = getSliderPercentage(e.pageX, e.pageY);
adjustSlider(sliderPct);
});
}
$(window).trigger("resize.twentytwenty");
});
};
})(jQuery);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,342 @@
/*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
function jprestaPcGetParameterValue(e) {
let t = "[\\?&]" + e + "=([^&#]*)";
let n = new RegExp(t);
let r = n.exec(window.location.href);
if (r == null) return "";
else return r[1]
}
function jprestaPcSplitUri(uri) {
let splitRegExp = new RegExp('^' + '(?:' + '([^:/?#.]+)' + ':)?' + '(?://' + '(?:([^/?#]*)@)?' + '([\\w\\d\\-\\u0100-\\uffff.%]*)' + '(?:(:[0-9]+))?' + ')?' + '([^?#]+)?' + '(?:(\\?[^#]*))?' + '(?:(#.*))?' + '$');
let split = uri.match(splitRegExp);
for (let i = 1; i < 8; i++) {
if (typeof split[i] === 'undefined') {
split[i] = '';
}
}
return {
'scheme': split[1],
'user_info': split[2],
'domain': split[3],
'port': split[4],
'path': split[5],
'query_data': split[6],
'fragment': split[7]
}
}
function jprestaPcSetCookie(cname, cvalue, ttl_minutes, path) {
let d = new Date();
d.setTime(d.getTime() + (ttl_minutes*60*1000));
let expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=" + path;
}
function jprestaPcGetCookie(cname, defaultValue) {
if (defaultValue === undefined) {
defaultValue = null;
}
let name = cname + "=";
let decodedCookie = decodeURIComponent(document.cookie);
let ca = decodedCookie.split(';');
for(let i = 0; i <ca.length; i++) {
let c = ca[i];
while (c.charAt(0) === ' ') {
c = c.substring(1);
}
if (c.indexOf(name) === 0) {
return c.substring(name.length, c.length);
}
}
return defaultValue;
}
function jprestaGetTTFB() {
let timing = null;
if (typeof window.performance.timing !== 'undefined') {
timing = window.performance.timing;
}
else {
timing = window.performance.getEntriesByType('navigation')[0];
}
return timing.responseStart - timing.requestStart;
}
function jprestaIsBot() {
return /bot|googlebot|crawler|spider|robot|crawling|gtmetrix|chrome-lighthouse/i.test(navigator.userAgent);
}
function jprestaGetCacheType() {
let cache_type = -2;
let timing = null;
if (typeof window.performance.getEntriesByType == 'function') {
timing = window.performance.getEntriesByType('navigation')[0];
}
if (!timing && typeof window.performance.timing !== 'undefined') {
timing = window.performance.timing;
}
if (timing && timing.transferSize === 0) {
cache_type = 2;
}
else if (timing && typeof timing.serverTiming != 'undefined') {
for (let i = 0; i < timing.serverTiming.length; i++) {
if (timing.serverTiming[i].name === 'jpresta_cache') {
cache_type = parseInt(timing.serverTiming[i].description);
break;
}
}
}
return cache_type;
}
/**
* Forward dbgpagecache parameter
*/
function jprestaPcForwardDbgpagecacheParameter() {
try {
if (typeof baseDir === 'undefined') {
baseDir = prestashop.urls.base_url;
}
if (window.location.href.indexOf("dbgpagecache=") > 0) {
$("a:not(.pagecache)").each(function () {
let e = $(this).attr("href");
let t = this.search;
let n = "dbgpagecache=" + jprestaPcGetParameterValue("dbgpagecache");
let r = baseDir.replace("https", "http");
if (typeof e !== "undefined" && e.substr(0, 1) !== "#" && (e.replace("https", "http").substr(0, r.length) === r || e.indexOf('://') === -1) && e.indexOf('javascript:') === -1 && e.indexOf('mailto:') === -1 && e.indexOf('tel:') === -1 && e.indexOf('callto:') === -1) {
if (t.length === 0) this.search = n;
else this.search += "&" + n
}
})
console.log("Page Cache Ultimate - Parameter dbgpagecache has been added to all links");
}
} catch (e) {
console.warn("Page Cache Ultimate - Cannot forward dbgpagecache parameter on all links: " + e.message, e)
}
}
jprestaPcStartsWith = function(str, search) {
return typeof str === 'string' && str.substr(0, search.length) === search;
};
jprestaPcProcessDynamicModules = function(dyndatas) {
for (let key in dyndatas) {
if (key === 'js') {
// Keep spaces arround 'key', some Prestashop removes [key] otherwise (?!)
$('body').append(dyndatas[ key ]);
}
else if (jprestaPcStartsWith(key, 'dyn')) {
// Keep spaces arround 'key', some Prestashop removes [key] otherwise (?!)
try {
$('#'+key).replaceWith(dyndatas[ key ]);
}
catch (error) {
console.error('Page Cache Ultimate - A javasript error occured during the "eval" of the refreshed content ' + key + ': ' + error);
}
}
}
if (typeof pcRunDynamicModulesJs == 'function') {
pcRunDynamicModulesJs();
}
console.timeEnd('Page Cache Ultimate - Dynamic modules have been refreshed in ')
if (typeof prestashop != 'undefined' && typeof prestashop.emit == 'function') {
prestashop.emit('jprestaDynamicContentLoaded');
}
};
/**
* Refresh dynamic modules
*/
function jprestaPcRefreshDynamicModules(cacheSource) {
try {
console.time('Page Cache Ultimate - Dynamic modules have been refreshed in ')
let dynDatas = {};
dynDatas['cache_source'] = cacheSource;
dynDatas['ttfb'] = jprestaGetTTFB();
$('.dynhook').each(function(index, domhook){
dynDatas['hk_' + index] = $(this).attr('id') + '|' + $(this).data('hooktype') + '|' + $(this).data('module') + '|' + $(this).data('hook') + '|' + $(this).data('hookargs');
});
let urlparts = jprestaPcSplitUri(document.URL);
let url = urlparts['scheme'] + '://' + urlparts['domain'] + urlparts['port'] + urlparts['path'] + urlparts['query_data'];
let indexEnd = url.indexOf('?');
if (indexEnd >= 0 && indexEnd < url.length) {
url += '&ajax=1&page_cache_dynamics_mods=1';
}
else {
url += '?ajax=1&page_cache_dynamics_mods=1';
}
$.ajax({url: url, type: 'POST', data: dynDatas, dataType: 'json', cache: false,
success: jprestaPcProcessDynamicModules,
error: function(jqXHR, textStatus, errorThrown) {
let dyndatas;
try {
let indexStart = jqXHR.responseText.indexOf('{');
let responseFixed = jqXHR.responseText.substring(indexStart, jqXHR.responseText.length);
dyndatas = $.parseJSON(responseFixed);
if (dyndatas != null) {
jprestaPcProcessDynamicModules(dyndatas);
return;
}
} catch (err) {
console.error("Page Cache Ultimate - Cannot parse data of error=" + err, err);
}
console.error("Page Cache Ultimate - Cannot display dynamic modules: error=" + textStatus + " exception=" + errorThrown);
console.log("Page Cache Ultimate - Dynamic module URL: " + url);
}});
} catch (e) {
console.error("Page Cache Ultimate - Cannot display dynamic modules: " + e.message, e);
}
}
/**
* Stats TTFB (when using back/forward cache)
*/
function jprestaPcSendStats(cacheSource, ttfb) {
try {
console.time('Page Cache Ultimate - Sending stats in ');
let dynDatas = {};
dynDatas['cache_source'] = cacheSource;
dynDatas['ttfb'] = ttfb;
let urlparts = jprestaPcSplitUri(document.URL);
let url = urlparts['scheme'] + '://' + urlparts['domain'] + urlparts['port'] + urlparts['path'] + urlparts['query_data'];
let indexEnd = url.indexOf('?');
if (indexEnd >= 0 && indexEnd < url.length) {
url += '&ajax=1&page_cache_dynamics_mods=1&stats';
}
else {
url += '?ajax=1&page_cache_dynamics_mods=1&stats';
}
$.ajax({url: url, type: 'POST', data: dynDatas, dataType: 'json', cache: false,
error: function(jqXHR, textStatus, errorThrown) {
console.error("Page Cache Ultimate - Cannot display dynamic modules: error=" + textStatus + " exception=" + errorThrown);
console.log("Page Cache Ultimate - Stats URL: " + url);
},
complete: function() {
console.timeEnd('Page Cache Ultimate - Sending stats in ');
}
});
} catch (e) {
console.error("Page Cache Ultimate - Cannot stats: " + e.message, e);
}
}
function jprestaUpdateCart() {
// Refresh the cart
if (typeof prestashop !== 'undefined' && typeof prestashop.emit == 'function') {
if (typeof jprestaUseCreativeElements == 'undefined' || !jprestaUseCreativeElements) {
// >= PS 1.7
console.log('Page Cache Ultimate - Refreshing the cart (PS >= 1.7)...');
// Need to put it in a setTimeout to let other modules subscribes to the event
setTimeout("prestashop.emit('updateCart', {reason: {linkAction: 'refresh'}, resp: {errors: []}})", 10);
}
else {
// For CreativeElements
console.log('Page Cache Ultimate - Refreshing the cart (CreativeElements)...');
$.ajax({
url: prestashop.urls.pages.cart,
method: 'POST',
dataType: 'json',
data: {
ajax: 1,
action: 'update'
}
}).then(function(resp) {
if (resp.success && resp.cart) {
prestashop.emit('updateCart', {
reason: {
linkAction: 'refresh'
},
resp: resp
});
}
});
}
}
else if(typeof ajaxCart !== 'undefined') {
// < PS 1.7
console.log('Page Cache Ultimate - Refreshing the cart (PS 1.5/1.6)...');
$.ajax({
type: 'POST',
headers: {"cache-control": "no-cache"},
url: baseUri + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType: "json",
data: 'controller=cart&ajax=1&token=' + static_token,
success: function (jsonData) {
ajaxCart.updateCart(jsonData);
}
});
}
}
window.addEventListener('load', function(event) {
if (jprestaIsBot()) {
// For bots just send stats
jprestaPcSendStats(jprestaGetCacheType(), jprestaGetTTFB());
return;
}
if (typeof jprestaUpdateCartDirectly != 'undefined' && jprestaUpdateCartDirectly) {
// Refresh the cart right now instead of waiting after dynamic modules are refreshed
jprestaUpdateCart();
}
// jpresta_cache_source => -1=cannot be cached; 0=no cache; 1=server cache; 2=browser cache, 3=static cache, 4=back/forward cache
let cacheSource = jprestaGetCacheType();
switch (cacheSource) {
case -2:
jprestaPcRefreshDynamicModules(cacheSource);
console.log('Page Cache Ultimate - Cannot determine the cache type :-(');
break;
case -1:
console.log('Page Cache Ultimate - Cannot be cached');
break;
case 0:
jprestaPcRefreshDynamicModules(cacheSource);
console.log('Page Cache Ultimate - No cache was used');
break;
case 1:
jprestaPcRefreshDynamicModules(cacheSource);
console.log('Page Cache Ultimate - Server cache was used');
break;
case 2:
jprestaPcRefreshDynamicModules(cacheSource);
console.log('Page Cache Ultimate - Browser cache was used');
break;
case 3:
jprestaPcRefreshDynamicModules(cacheSource);
console.log('Page Cache Ultimate - Static cache was used');
break;
case 4:
// Handled by 'pageshow' event
break;
}
$('.pctype' + cacheSource).show();
jprestaPcForwardDbgpagecacheParameter();
let ctxUuid = jprestaPcGetCookie('jpresta_cache_context', false);
if (ctxUuid) {
console.log('Page Cache Ultimate - Displaying the page with context \x1B[1;4m' + ctxUuid + '\x1B[m');
}
});
// Refresh the cart when back/forward cache is used
// pageshow is not always executed, only when the back/forward cache is used
window.addEventListener('pageshow', function(event) {
if (event.persisted) {
jprestaPcSendStats(4, 0);
// Refresh the cart
console.log('Page Cache Ultimate - Back/forward cache is used');
jprestaUpdateCart();
}
});
window.addEventListener('resize', function(event) {
document.cookie = "jpresta_cache_context=;path=/;expires=Thu, 01 Jan 1970 00:00:00 GMT";
});

View File

@@ -0,0 +1,208 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
{extends file="helpers/form/form.tpl"}
{block name="input_row"}
{if $input.type == 'alert_info'}
<div class="alert alert-info">{$input.text|escape:'quotes':'UTF-8'}</div>
{elseif $input.type == 'alert_warn'}
<div class="alert alert-warning">{$input.text|escape:'quotes':'UTF-8'}</div>
{elseif $input.type == 'alert_error'}
<div class="alert alert-danger">{$input.text|escape:'quotes':'UTF-8'}</div>
{elseif $input.type == 'logs'}
<a href="#" onclick="$('#{if isset($input.id)}{$input.id|escape:'html':'UTF-8'}{else}{$input.name|escape:'html':'UTF-8'}{/if}').toggle()"><i class="material-icons">bug_report</i><span style="vertical-align: super;">{l s='See logs' mod='pagecache'}</span></a>
<div class="panel" id="{if isset($input.id)}{$input.id|escape:'html':'UTF-8'}{else}{$input.name|escape:'html':'UTF-8'}{/if}" style="display: none">
<div class="pre">
{foreach $input.logs as $log}
<div class="log_{$log->type|escape:'html':'UTF-8'}"><b>{$log->date|escape:'html':'UTF-8'} &gt;</b> {$log->msg|escape:'html':'UTF-8'}</div>
{/foreach}
</div>
</div>
{elseif $input.type == 'converters_report'}
<div class="alert {$input.typeAlert|escape:'html':'UTF-8'}">{$input.text|escape:'quotes':'UTF-8'}
<a class="btntoggle" data-toggle="collapse" href="#collapseConverters" role="button" aria-expanded="false" aria-controls="collapseConverters">
{l s='Details' mod='pagecache'}
</a>
<div class="collapse" id="collapseConverters">
<div class="alert alert-info" style="margin-top: 0.5rem;">
<b>{l s='The following errors or warnings can be ignored.' mod='pagecache'}</b>
{l s='They simply show how the compressor was selected in your store.' mod='pagecache'}
</div>
{foreach $input.values as $key => $value}
{if is_array($value) && $key !== 'firstActiveConverter'}
<div class="reportHead alert alert-{if !$value.disabled}success{else}warning{/if}">{$value.label|escape:'quotes':'UTF-8'}{if !$value.disabled} ({$value.duration_ms|intval}ms){/if}
<a class="btntoggle" data-toggle="collapse" href="#collapse{$value.id|escape:'html':'UTF-8'}" role="button" aria-expanded="false" aria-controls="collapse{$value.id|escape:'html':'UTF-8'}">
{l s='Details' mod='pagecache'}
</a>
</div>
<div class="collapse report" id="collapse{$value.id|escape:'html':'UTF-8'}">
{if isset($value.error) && $value.error}<div class="alert alert-warning">{$value.error|escape:'html':'UTF-8'}</div>{/if}
{$value.log|escape:'quotes':'UTF-8'}
</div>
{/if}
{/foreach}
</div>
</div>
{elseif $input.type == 'check_header_vary'}
<script type="application/javascript">
function jprestaIsCrossDomain(urlToFetch) {
let currentUrl = new URL(window.location.href);
let otherUrl = new URL(urlToFetch);
return currentUrl.host !== otherUrl.host;
}
function jprestaContainsAccept(val) {
if (!val) {
return false;
}
let vals = val.split(',');
for (let i = 0; i < vals.length; i++) {
if(vals[i].trim().toLowerCase() === 'accept') {
return true;
}
}
return false;
}
try {
$.ajax({
url: '{$input.url_to_test|escape:'javascript':'UTF-8'}', cache: false, headers: { 'Accept': 'image/webp,*/*' }, complete: function (jqXHR) {
console.log(jqXHR);
if (jqXHR.status >= 200 && jqXHR.status < 300) {
// Get the raw header string
let allHeaders = jqXHR.getAllResponseHeaders();
// Convert the header string into an array
// of individual headers
let allHeadersArray = allHeaders.trim().split(/[\r\n]+/);
// Create a map of header names to values
let allHeadersMap = [];
allHeadersArray.forEach(function (line) {
let parts = line.split(': ');
let headerName = parts.shift().toLowerCase();
let headerValue = parts.join(': ').toLowerCase();
allHeadersMap[headerName] = headerValue;
});
if (!('vary' in allHeadersMap) && jprestaIsCrossDomain('{$input.url_to_test|escape:'javascript':'UTF-8'}')) {
$('#vary_check_dontknow').show();
}
else if (!('vary' in allHeadersMap) || !jprestaContainsAccept(allHeadersMap['vary'])) {
$('#vary_check_error').show();
}
else {
$('#vary_check_ok').show();
}
}
else {
console.log("Speed pack cannot analyze HTTP headers: status=" + jqXHR.status + " " + jqXHR.statusText);
}
}
});
}
catch (e) {
console.error("Speed pack cannot analyze HTTP headers: " + e.message, e);
}
</script>
<div id="vary_check_error" class="alert alert-warning" style="display: none">
{$input.text_error|escape:'quotes':'UTF-8'}
<pre>
location ~ (.+)\.(png|jpe?g)$ {
add_header Vary Accept;
}
</pre>
</div>
<div id="vary_check_ok" class="alert alert-success" style="display: none">
{$input.text_ok|escape:'quotes':'UTF-8'}
</div>
<div id="vary_check_dontknow" class="alert alert-default" style="display: none">
{$input.text_dontknow|escape:'quotes':'UTF-8'}
</div>
{else}
{$smarty.block.parent}
{/if}
{/block}
{block name="input"}
{if $input.type == 'integer'}
{if isset($input.prefix) || isset($input.suffix)}
<div class="input-group{if isset($input.class)} {$input.class|escape:'html':'UTF-8'}{/if}">
{/if}
{if isset($input.prefix)}
<span class="input-group-addon">{$input.prefix|escape:'html':'UTF-8'}</span>
{/if}
<input type="number"
id="{if isset($input.id)}{$input.id|escape:'html':'UTF-8'}{else}{$input.name|escape:'html':'UTF-8'}{/if}"
name="{$input.name|escape:'html':'UTF-8'}"
class="form-control text-right{if isset($input.class)} {$input.class|escape:'html':'UTF-8'}{/if}"
value="{$fields_value[$input.name]|intval}"
{if isset($input.size)} size="{$input.size|intval}"{/if}
{if isset($input.max)} max="{$input.max|intval}"{/if}
{if isset($input.min)} min="{$input.min|intval}"{/if}
{if isset($input.readonly) && $input.readonly} readonly="readonly"{/if}
{if isset($input.disabled) && $input.disabled} disabled="disabled"{/if}
{if isset($input.required) && $input.required} required="required" {/if}
{if isset($input.placeholder) && $input.placeholder} placeholder="{$input.placeholder|escape:'html':'UTF-8'}"{/if} />
{if isset($input.suffix)}
<span class="input-group-addon">{$input.suffix|escape:'html':'UTF-8'}</span>
{/if}
{if isset($input.maxchar) || isset($input.prefix) || isset($input.suffix)}
</div>
{/if}
{/if}
{if $input.type == 'webp_slider_quality'}
{assign var='value_text' value=$fields_value[$input.name]}
<style type="text/css">
.ui-slider .ui-slider-handle {
height: 1.5rem;
width: 2.5rem;
top: -0.5rem;
text-align: center;
line-height: 1.4rem;
margin-left: -.1rem;
}
</style>
<script type="application/javascript">
$(function() {
let inputField = $("#{if isset($input.id)}{$input.id|escape:'html':'UTF-8'}{else}{$input.name|escape:'html':'UTF-8'}{/if}");
let cursor = $("#cursor{if isset($input.id)}{$input.id|escape:'html':'UTF-8'}{else}{$input.name|escape:'html':'UTF-8'}{/if}");
$( "#slider{if isset($input.id)}{$input.id|escape:'html':'UTF-8'}{else}{$input.name|escape:'html':'UTF-8'}{/if}" ).slider({
{if isset($input.min)}min: {$input.min|intval},{/if}
{if isset($input.max)}max: {$input.max|intval},{/if}
{if isset($input.step)}step: {$input.step|intval},{/if}
animate: "fast",
{if isset($input.disabled) && $input.disabled}disabled: true,{/if}
value: {$value_text|escape:'html':'UTF-8'},
slide: function(event, ui) {
inputField.val(ui.value);
cursor.text(ui.value {if isset($input.unit)} + "{$input.unit|escape:'html':'UTF-8'}"{/if});
},
change: function (event, ui) {
$('#afterSlider').attr('src', '{$input.after.url|escape:'html':'UTF-8'}&quality=' + ui.value);
}
});
// Initialize the slider
$("#beforeAfterSlider").twentytwenty({ before_label: 'JPG', after_label: 'WEBP' });
} );
</script>
<div style="width: {$input.before.width|intval}px;{if isset($input.disabled) && $input.disabled}display:none{/if}" id="beforeAfterSlider" class='twentytwenty-container'>
<img id="beforeSlider" {if isset($input.before.width)}width="{$input.before.width|intval}px"{/if} {if isset($input.before.height)}height="{$input.before.height|intval}px"{/if} src="{$input.before.url|escape:'html':'UTF-8'}">
<img id="afterSlider" {if isset($input.after.width)}width="{$input.before.width|intval}px"{/if} {if isset($input.after.height)}height="{$input.before.height|intval}px"{/if} src="{$input.after.url|escape:'html':'UTF-8'}&quality={$input.after.quality|intval}">
</div>
<input type="hidden"
name="{$input.name|escape:'html':'UTF-8'}"
id="{if isset($input.id)}{$input.id|escape:'html':'UTF-8'}{else}{$input.name|escape:'html':'UTF-8'}{/if}"
value="{$value_text|escape:'html':'UTF-8'}"
/>
<div style="width: {$input.before.width|intval}px; margin: 1rem 0;" id="slider{if isset($input.id)}{$input.id|escape:'html':'UTF-8'}{else}{$input.name|escape:'html':'UTF-8'}{/if}">
<div id="cursor{if isset($input.id)}{$input.id|escape:'html':'UTF-8'}{else}{$input.name|escape:'html':'UTF-8'}{/if}" class="ui-slider-handle">{$value_text|escape:'html':'UTF-8'}{if isset($input.unit)}&nbsp;{$input.unit|escape:'html':'UTF-8'}{/if}</div>
</div>
{else}
{$smarty.block.parent}
{/if}
{/block}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,12 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<ul>
{foreach $urls as $url}
<li style="line-height: 2rem;"><span class="cron_url">{$url|escape:'html':'UTF-8'}</span></li>
{/foreach}
</ul>

View File

@@ -0,0 +1,177 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<div class="row">
<div class="col-md-12">
<div class="panel">
<h3>
{if $avec_bootstrap}<i class="icon-gear"></i>{else}<img width="16" height="16" src="../img/admin/AdminPreferences.gif"/>{/if}&nbsp;{l s='Cache key settings' mod='pagecache'}
</h3>
<form id="pagecache_form_cachekey" action="{$request_uri|escape:'html':'UTF-8'}" method="post">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="cachekey"/>
<fieldset>
<div style="clear: both;">
<div class="row form-group">
<div class="col-lg-12">
<h4>{l s='Devices' mod='pagecache'}</h4>
</div>
<div id="pagecache_depend_on_device_auto">
<label class="control-label col-lg-3">
{l s='Create separate cache for desktop and mobile' mod='pagecache'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="pagecache_depend_on_device_auto"
id="pagecache_depend_on_device_auto_on" value="1"
{if $pagecache_depend_on_device_auto}checked{/if}>
<label for="pagecache_depend_on_device_auto_on"
class="radioCheck">{l s='Yes' mod='pagecache'}</label>
<input type="radio" name="pagecache_depend_on_device_auto"
id="pagecache_depend_on_device_auto_off" value="0"
{if !$pagecache_depend_on_device_auto}checked{/if}>
<label for="pagecache_depend_on_device_auto_off"
class="radioCheck">{l s='No' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='If you know that your mobile version is the same as the desktop version then you can disable this option' mod='pagecache'}
</div>
</div>
</div>
<div id="pagecache_tablet_is_mobile">
<label class="control-label col-lg-3">
{l s='Tablet are considered as mobile' mod='pagecache'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="pagecache_tablet_is_mobile"
id="pagecache_tablet_is_mobile_on" value="1"
{if $pagecache_tablet_is_mobile}checked{/if}>
<label for="pagecache_tablet_is_mobile_on"
class="radioCheck">{l s='Yes' mod='pagecache'}</label>
<input type="radio" name="pagecache_tablet_is_mobile"
id="pagecache_tablet_is_mobile_off" value="0"
{if !$pagecache_tablet_is_mobile}checked{/if}>
<label for="pagecache_tablet_is_mobile_off"
class="radioCheck">{l s='No' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Set to true if your theme display the mobile site for tablet devices' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="row form-group">
<div class="col-lg-12">
<h4>{l s='CSS & JS' mod='pagecache'}</h4>
</div>
<div id="pagecache_depend_on_css_js">
<label class="control-label col-lg-3">
{l s='Insert CSS and JS version in cache key' mod='pagecache'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="pagecache_depend_on_css_js" id="pagecache_depend_on_css_js_on"
value="1" {if $pagecache_depend_on_css_js}checked{/if}>
<label for="pagecache_depend_on_css_js_on"
class="radioCheck">{l s='Yes' mod='pagecache'}</label>
<input type="radio" name="pagecache_depend_on_css_js" id="pagecache_depend_on_css_js_off"
value="0" {if !$pagecache_depend_on_css_js}checked{/if}>
<label for="pagecache_depend_on_css_js_off"
class="radioCheck">{l s='No' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Only enable this option if the styles disappear when the cache is enabled' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="row form-group">
<div class="col-lg-12">
<h4>{l s='Countries' mod='pagecache'}</h4>
</div>
<div class="col-lg-12">
<div class="alert alert-info">{l s='The module automatically detects countries with specific prices rules. Any country with a specific price rule need a specific cache, this is why you cannot uncheck it. When there is no specific price rule you may display specific informations for a country (not detected by the module), this is why you can force the country to have a specific cache.' mod='pagecache'}</div>
</div>
<div id="pagecache_depend_on_css_js">
<label class="control-label col-lg-3">
{l s='Select countries that need a specific cache' mod='pagecache'}
</label>
<div class="col-lg-9">
{if count($pagecache_cache_key_countries) === 0}
<i>{l s='No country are enabled on the shop' mod='pagecache'}</i>
{/if}
{foreach $pagecache_cache_key_countries as $id_country => $country_conf}
<span style="margin-right: 1rem;white-space: nowrap;">
<input type="checkbox"
style="vertical-align: middle; margin: 0 2px;"
id="pagecache_cachekey_countries_{$id_country|escape:'html':'UTF-8'}"
name="pagecache_cachekey_countries[{$id_country|escape:'html':'UTF-8'}]"
{if $country_conf.has_impact}disabled="disabled" {/if}
{if $country_conf.specific_cache}checked="checked" {/if}
value="true">
<label for="pagecache_cachekey_countries_{$id_country|escape:'html':'UTF-8'}">{$country_conf.name|escape:'html':'UTF-8'}</label>
</span>
{/foreach}
</div>
</div>
</div>
<div class="row form-group">
<div class="col-lg-12">
<h4>{l s='User groups' mod='pagecache'}</h4>
</div>
<div class="col-lg-12">
<div class="alert alert-info">{l s='The module automatically detects user groups with specific prices rules. Any user group with a specific price rule need a specific cache, this is why you cannot uncheck it. When there is no specific price rule you may display specific informations for a user group (not detected by the module), this is why you can force the user group to have a specific cache.' mod='pagecache'}</div>
</div>
<div id="pagecache_depend_on_css_js">
<label class="control-label col-lg-3">
{l s='Select user groups that need a specific cache' mod='pagecache'}
</label>
<div class="col-lg-9">
{if count($pagecache_cache_key_usergroups) === 0}
<i>{l s='No user group are enabled on the shop' mod='pagecache'}</i>
{/if}
{foreach $pagecache_cache_key_usergroups as $id_group => $group_conf}
<span style="margin-right: 1rem;white-space: nowrap;">
<input type="checkbox"
style="vertical-align: middle; margin: 0 2px;"
id="pagecache_cachekey_usergroups_{$id_group|escape:'html':'UTF-8'}"
name="pagecache_cachekey_usergroups[{$id_group|escape:'html':'UTF-8'}]"
{if $group_conf.has_impact_as_default}disabled="disabled" {/if}
{if $group_conf.specific_cache}checked="checked" {/if}
value="true">
<label for="pagecache_cachekey_usergroups_{$id_group|escape:'html':'UTF-8'}">{$group_conf.name|escape:'html':'UTF-8'}</label>
</span>
{/foreach}
</div>
</div>
</div>
</div>
<div class="bootstrap">
<button type="submit" value="1" id="submitModuleCacheKey" name="submitModuleCacheKey"
class="btn btn-default pull-right">
<i class="process-icon-save"></i> {l s='Save' mod='pagecache'}
</button>
</div>
</fieldset>
</form>
</div>
</div>
</div>

View File

@@ -0,0 +1,57 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<div class="panel">
<h3>{if $avec_bootstrap}<i class="icon-link"></i>{else}<img width="16" height="16" src="../img/admin/subdomain.gif" alt=""/>{/if}&nbsp;{l s='API (URLs to clear the cache)' mod='pagecache'}</h3>
<form id="pagecache_form_cron" action="{$request_uri|escape:'html':'UTF-8'}" method="post">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="cron"/>
<fieldset>
{if $avec_bootstrap}
<div class="bootstrap"><div class="alert alert-info" style="display: block;">&nbsp;{l s='Here you will find URLs to clear the cache from a script (you can do it manually in the statistics table). Be aware that the cache cleans itself continuously, these URLs are only for users modifying the database not with Prestashop (hooks are not called).' mod='pagecache'}</div></div>
{else}
<div class="hint clear" style="display: block;">&nbsp;{l s='Here you will find URLs to clear the cache from a script (you can do it manually in the statistics table). Be aware that the cache cleans itself continuously, these URLs are only for users modifying the database not with Prestashop (hooks are not called).' mod='pagecache'}</div>
{/if}
<p>{l s='People who want to clear cache can use the following URLs (one per shop, returns 200 if OK, 404 if there is an error): ' mod='pagecache'}</p>
<ul>
{foreach $pagecache_cron_urls as $controller_name => $cron_url}
<li><pre>{$cron_url|escape:'javascript':'UTF-8'}</pre></li>
{/foreach}
</ul>
<p>
{l s='To refresh cache of a specific product add "&product=<product\'s ids separated by commas>", for a category add "&category=<category\'s ids separated by commas>", for home page add "&index", etc.' mod='pagecache'}
{l s='Available controller (type of page) are' mod='pagecache'}
</p>
<ul>
<li>index (no IDs)</li>
<li>category</li>
<li>product</li>
<li>cms</li>
<li>newproducts (no IDs)</li>
<li>bestsales (no IDs)</li>
<li>supplier</li>
<li>manufacturer</li>
<li>contact (no IDs)</li>
<li>pricesdrop (no IDs)</li>
<li>sitemap (no IDs)</li>
</ul>
<p>
{l s='When you refresh the cache of a product, or a category, etc. then the pages that have a link to this product or category will also be refreshed except if you add this parameter in the URL' mod='pagecache'}:
<pre>&delete_linking_pages=0</pre>
</p>
</fieldset>
</form>
<h4>{l s='Purge of the cache' mod='pagecache'}</h4>
<p>{l s='As we explained above the cache cleans itself continously but it can be a good thing to purge the cache once a week with this URL.' mod='pagecache'}</p>
<p>{l s='A purge will delete all obsolete datas from the cache, it will not decrease the hit rate.' mod='pagecache'}</p>
<ul>
{foreach $pagecache_cron_urls as $controller_name => $cron_url}
<li><pre>{$cron_url|escape:'javascript':'UTF-8'}&purge</pre></li>
{/foreach}
</ul>
</div>

View File

@@ -0,0 +1,311 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<script type="application/javascript">
$(document).ready(function () {
$.fn.dataTable.ext.errMode = 'none';
let datasTable = $('#datasTable')
.on('error.dt', function (e, settings, techNote, message) {
console.error('Page Cache - Cannot display cache datas: ', message);
})
.DataTable({
processing: true,
serverSide: true,
searching: true,
ajax: '{$pagecache_datas_url|escape:'javascript':'UTF-8'}',
columns: [
{ orderable: false },
{ },
{ orderable: false, width: '5rem' },
{ orderable: false, width: '3rem' },
{ width: '7rem' },
{ width: '3rem' },
{ width: '3rem' },
],
order: [],
language: {
processing: "{l s='Loading datas...' mod='pagecache'}",
search: "{l s='Search' mod='pagecache'}:",
lengthMenu: "{l s='Showing _MENU_ rows' mod='pagecache'}",
info: "{l s='Showing _START_ to _END_ of _TOTAL_ rows' mod='pagecache'}",
infoEmpty: "{l s='Showing 0 to 0 of 0 row' mod='pagecache'}",
infoFiltered: "{l s='Filtered of _MAX_ rows' mod='pagecache'}",
infoPostFix: "",
loadingRecords: "{l s='Loading datas...' mod='pagecache'}",
zeroRecords: "{l s='No data to display' mod='pagecache'}",
emptyTable: "{l s='No data to display' mod='pagecache'}",
paginate: {
first: "{l s='First' mod='pagecache'}",
previous: "{l s='Previous' mod='pagecache'}",
next: "{l s='Next' mod='pagecache'}",
last: "{l s='Last' mod='pagecache'}"
},
aria: {
sortAscending: ": {l s='Click to sort ascending' mod='pagecache'}",
sortDescending: ": {l s='Click to sort descending' mod='pagecache'}"
}
},
dom: 'Bfrtip',
lengthMenu: [
[ 10, 25, 50, 100 ],
[ '10 {l s='rows' mod='pagecache'}', '25 {l s='rows' mod='pagecache'}', '50 {l s='rows' mod='pagecache'}', '100 {l s='rows' mod='pagecache'}' ]
],
buttons: [
'pageLength'
],
});
let datasContextsTable = $('#datasContextsTable')
.on('error.dt', function (e, settings, techNote, message) {
console.error('Page Cache - Cannot display contexts datas: ', message);
})
.DataTable({
processing: true,
serverSide: true,
searching: false,
ajax: '{$pagecache_datas_url|escape:'javascript':'UTF-8'}&type=contexts',
columns: [
{ orderable: false },
{ orderable: false },
{ },
{ },
{ },
{ orderable: false },
],
order: [],
language: {
processing: "{l s='Loading datas...' mod='pagecache'}",
search: "{l s='Search' mod='pagecache'}:",
lengthMenu: "{l s='Showing _MENU_ rows' mod='pagecache'}",
info: "{l s='Showing _START_ to _END_ of _TOTAL_ rows' mod='pagecache'}",
infoEmpty: "{l s='Showing 0 to 0 of 0 row' mod='pagecache'}",
infoFiltered: "{l s='Filtered of _MAX_ rows' mod='pagecache'}",
infoPostFix: "",
loadingRecords: "{l s='Loading datas...' mod='pagecache'}",
zeroRecords: "{l s='No data to display' mod='pagecache'}",
emptyTable: "{l s='No data to display' mod='pagecache'}",
paginate: {
first: "{l s='First' mod='pagecache'}",
previous: "{l s='Previous' mod='pagecache'}",
next: "{l s='Next' mod='pagecache'}",
last: "{l s='Last' mod='pagecache'}"
},
aria: {
sortAscending: ": {l s='Click to sort ascending' mod='pagecache'}",
sortDescending: ": {l s='Click to sort descending' mod='pagecache'}"
}
},
dom: 'Bfrtip',
lengthMenu: [
[ 10, 25, 50, 100 ],
[ '10 {l s='rows' mod='pagecache'}', '25 {l s='rows' mod='pagecache'}', '50 {l s='rows' mod='pagecache'}', '100 {l s='rows' mod='pagecache'}' ]
],
buttons: [
'pageLength'
],
});
$('#searchObject').on('keyup', function () {
datasTable
.columns(3)
.search(this.value, false, false, false)
.draw();
});
$('#searchContext').on('change', function () {
datasTable
.columns(1)
.search(this.value, false, false, true)
.draw();
});
$('#searchController').on('change', function () {
datasTable
.columns(2)
.search(this.value, false, false, true)
.draw();
});
$('#searchURL').on('change', function () {
datasTable
.columns(0)
.search(this.value, false, true, true)
.draw();
});
$('#refreshDatas').on('click', function () {
datasTable.ajax.reload();
});
$('#clearCacheDatas').on('click', function () {
let parameters = datasTable.ajax.params();
parameters.clear = true;
$.ajax({ url: datasTable.ajax.url(), method: 'post', data: parameters,
success: function(response) {
datasTable.ajax.reload();
},
error: function(result, status, error) {
console.log(result + ' - ' + status + ' - ' + error);
}});
});
});
</script>
<style>
.dataTables_processing {
border: 2px solid orange;
border-radius: 5px;
padding: 0 !important;
line-height: 3rem;
height: auto !important;
z-index: 99;
font-weight: bold;
}
.bootstrap .label-default {
border: 1px solid #999;
background-color: transparent;
padding: 0 2px;
}
#datasTable tr td:nth-child(n+3),#datasTable th,
#datasContextsTable th, #datasContextsTable tr td:nth-child(n+3){
text-align: center;
}
#datasTable tr td:last-child {
text-align: right;
}
#datasTable_filter {
display: none;
}
#datasTable span.label {
cursor: help;
padding: 0px 2px;
margin-right: 1px;
}
{if !$avec_bootstrap}tfoot input,tfoot select { width:95%; }{/if}
</style>
<div class="panel">
<h3>{if $avec_bootstrap}<i class="icon-line-chart"></i>{else}<img width="16" height="16" src="../img/admin/AdminStats.gif" alt=""/>{/if}&nbsp;{l s='Cached pages' mod='pagecache'}</h3>
<div class="alert alert-info">{l s='Here you can browse all cached pages. This can be usefull to debug.' mod='pagecache'}</div>
<fieldset class="cachemanagement">
<table id="datasTable" class="display cell-border compact stripe" style="width:100%">
<colgroup>
<col width="*">
<col width="*">
<col width="0*">
<col width="0*">
<col width="0*">
<col width="0*">
<col width="0*">
</colgroup>
<thead>
<tr>
<th>{l s='URL' mod='pagecache'}</th>
<th>{l s='Context' mod='pagecache'}</th>
<th>{l s='Controller' mod='pagecache'}</th>
<th>{l s='ID' mod='pagecache'}</th>
<th>{l s='Last generation' mod='pagecache'}</th>
<th>{l s='Cleared' mod='pagecache'}</th>
<th>{l s='Hit/Missed' mod='pagecache'}</th>
</tr>
</thead>
<tbody>
<tr><td>-</td><td>-</td><td>--------------</td><td>----</td><td>----/--/-- --:--:--</td><td>-</td><td>- / - (--%)</td></tr>
<tr><td>-</td><td>-</td><td>--------------</td><td>----</td><td>----/--/-- --:--:--</td><td>-</td><td>- / - (--%)</td></tr>
<tr><td>-</td><td>-</td><td>--------------</td><td>----</td><td>----/--/-- --:--:--</td><td>-</td><td>- / - (--%)</td></tr>
</tbody>
<tfoot>
<tr>
<th><input type="text" name="searchURL" id="searchURL" placeholder="{l s='Find in URL (click outside to trigger the search)' mod='pagecache'}" style="padding:4px"></th>
<th>
<select name="searchContext" id="searchContext" style="padding:4px">
<option></option>
{foreach $pagecache_contexts as $context}
<option value="{$context.id|intval}">#{$context.id|intval}</option>
{/foreach}
</select>
</th>
<th>
<select name="searchController" id="searchController" style="padding:4px">
<option></option>
{foreach $managed_controllers as $controller_name => $controller}
<option value="{$controller['id']|intval}">{$controller_name|escape:'html':'UTF-8'}</option>
{/foreach}
</select>
</th>
<th><input type="text" name="searchObject" id="searchObject" placeholder="{l s='Exact ID' mod='pagecache'}" style="text-align: center; padding:4px"></th>
<th></th>
<th></th>
<th></th>
</tr>
</tfoot>
</table>
<div style="margin-top: 5px">
<div class="alert alert-info">
<strong>{l s='Reset cache (with stats)' mod='pagecache'}:</strong> {l s='This will delete all files of the cache and clear all database tables' mod='pagecache'}
<br/>
<strong>{l s='Clear cache (only files)' mod='pagecache'}:</strong> {l s='This will delete all files of the cache (not stats). If you filtered the table above then it will only delete files listed in the table within the limit of 1000 files.' mod='pagecache'}
<br/>
<strong>{l s='Purge cache (with stats)' mod='pagecache'}:</strong> {l s='This will remove from stats deleted cache older than 24H (and so probably not used anymore)' mod='pagecache'}
</div>
<form id="pagecache_form_datas" action="{$request_uri|escape:'html':'UTF-8'}#tabdatas" method="post">
<input type="hidden" name="submitModule" value="true"/>
<button type="submit" value="1" id="submitModuleResetDatas" name="submitModuleResetDatas"
class="btn btn-danger pull-right">
<i class="process-icon-delete"></i> {l s='Reset cache (with stats)' mod='pagecache'}
</button>
<button type="button" id="clearCacheDatas" class="btn btn-warning pull-right">
<i class="process-icon-delete"></i> {l s='Clear cache (only files)' mod='pagecache'}
</button>
<button type="submit" value="1" id="submitModulePurgeDatas" name="submitModulePurgeDatas"
class="btn btn-warning pull-right">
<i class="process-icon-delete"></i> {l s='Purge cache (with stats)' mod='pagecache'}
</button>
<button type="button" id="refreshDatas" class="btn btn-default pull-right">
<i class="process-icon-refresh"></i> {l s='Refresh' mod='pagecache'}
</button>
</form>
</div>
</fieldset>
</div>
<div class="panel">
<h3>{if $avec_bootstrap}<i class="icon-database"></i>{else}<img width="16" height="16" src="../img/admin/AdminStats.gif" alt=""/>{/if}&nbsp;{l s='Contexts' mod='pagecache'}</h3>
<fieldset class="cachemanagement">
<div class="alert alert-info">{l s='Here you can see which contexts are used on your shop, this is useful to know which ones you should warmup with the cache-warmer.' mod='pagecache'}</div>
<table id="datasContextsTable" class="display cell-border compact stripe" style="width:100%">
<thead>
<tr>
<th>{l s='UUID' mod='pagecache'}</th>
<th>{l s='Context' mod='pagecache'}</th>
<th>{l s='Number of visit' mod='pagecache'}</th>
<th>{l s='Hit rate' mod='pagecache'}</th>
<th>{l s='Visit of bots/crawlers' mod='pagecache'}</th>
<th>{l s='Cleared' mod='pagecache'}</th>
</tr>
</thead>
<tbody>
<tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>
</tbody>
</table>
</fieldset>
</div>
<div class="panel">
<h3>{if $avec_bootstrap}<i class="icon-database"></i>{else}<img width="16" height="16" src="../img/admin/AdminStats.gif" alt=""/>{/if}&nbsp;{l s='Database' mod='pagecache'}</h3>
<fieldset class="cachemanagement">
<div class="alert alert-info">{l s='Tables can consumme a lot of space but they are all optimized and stores only necessary informations. This is mainly used by the automatic refresment of the cache.' mod='pagecache'}</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>{l s='Table' mod='pagecache'}</th>
<th>{l s='Row count' mod='pagecache'}</th>
<th>{l s='Size in MB' mod='pagecache'}</th>
</tr>
</thead>
<tbody>
{foreach $pagecache_datas_dbinfos as $row}
<tr>
{foreach $row as $col}
<td>{$col|escape:'html':'UTF-8'}</td>
{/foreach}
</tr>
{/foreach}
</tbody>
</table>
</fieldset>
</div>

View File

@@ -0,0 +1,10 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<div style="position: static;padding: 10px;top: 0;width: 100%;background-color: orange;color: white;text-align: center;">
{l s='WARNING! This is the HTML stored into the cache. All other resources like images, javascript and styles are the "live" ones. Also dynamic modules are displayed with your context.' mod='pagecache'}
</div>

View File

@@ -0,0 +1,47 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
#{$id_context|intval} :
{if isset($flag_lang)}
<span class="label label-default" title="Language"><img src="../img/l/{$flag_lang|intval}.jpg" width="16" height="11"/></span>
{/if}
{if isset($flag_currency)}
<span class="label label-default" title="Currency">{$flag_currency|escape:'html':'UTF-8'}</span>
{/if}
{if isset($flag_country)}
<span class="label label-default" title="Country">{$flag_country|escape:'html':'UTF-8'}</span>
{/if}
{if isset($flag_device)}
{if $isPs17}
<span class="label label-default" title="{$flag_device|escape:'html':'UTF-8'} device"><i class="icon-{$flag_device|escape:'html':'UTF-8'}"></i></span>
{else}
<span class="label label-default" title="{$flag_device|escape:'html':'UTF-8'} device">{$flag_device|escape:'html':'UTF-8'}</span>
{/if}
{/if}
{if isset($flag_group)}
{if $isPs17}
<span class="label label-default" title="User groups"><i class="icon-users"></i> {$flag_group|escape:'html':'UTF-8'}</span>
{else}
<span class="label label-default" title="User groups">Groups: {$flag_group|escape:'html':'UTF-8'}</span>
{/if}
{/if}
{if isset($flag_tax_manager)}
<span class="label label-default specifics">Tax: #{$flag_tax_manager|escape:'html':'UTF-8'}
<div class="pc_specifics"><b>Taxes applied in this cache</b><br/>{$flag_tax_manager_more|escape:'html':'UTF-8'}</div>
</span>
{/if}
{if isset($flag_specifics)}
<span class="label label-default specifics">Specifics: #{$flag_specifics|escape:'html':'UTF-8'}
<div class="pc_specifics"><b>Some specific keys added by some modules</b><br/>{$flag_specifics_more|escape:'html':'UTF-8'}</div>
</span>
{/if}
{if isset($flag_v_css)}
<span class="label label-default" title="JS version to avoid the use of obsolete styles">CSS v{$flag_v_css|escape:'html':'UTF-8'}</span>
{/if}
{if isset($flag_v_js)}
<span class="label label-default" title="JS version to avoid the use of obsolete javascript">JS v{$flag_v_js|escape:'html':'UTF-8'}</span>
{/if}

View File

@@ -0,0 +1,14 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
{if $deleted}
{if $isPs17}
<i class="icon-check"></i>
{else}
X
{/if}
{/if}

View File

@@ -0,0 +1,9 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<span style="color:green">{$count_hit|intval}</span>&nbsp;/&nbsp;<span style="color:red">{$count_missed|intval}</span>
({$count_percent|escape:'html':'UTF-8'}%)

View File

@@ -0,0 +1,9 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<span style="cursor:help" title="Age: {$age|escape:'html':'UTF-8'} - Time to live: {$ttl_msg|escape:'html':'UTF-8'}">{$last_gen|escape:'html':'UTF-8'}</span>
<div style="border-bottom: 2px solid {$color|escape:'html':'UTF-8'};width: {$percent|intval}%;"></div>

View File

@@ -0,0 +1,50 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<a class="cacheurl" href="{$url|escape:'html':'UTF-8'}" title="{$url|escape:'html':'UTF-8'}" target="_blank">{$url|escape:'html':'UTF-8'}</a>
{if isset($url_cached)}
<a class="cacheurl" href="{$url_cached|escape:'html':'UTF-8'}" title="See the cached version" target="_blank"><i class="icon-database"></i></a>
{/if}
{if isset($flag_lang)}
<span class="label label-default" title="Language"><img src="../img/l/{$flag_lang|intval}.jpg" width="16" height="11"/></span>
{/if}
{if isset($flag_currency)}
<span class="label label-default" title="Currency">{$flag_currency|escape:'html':'UTF-8'}</span>
{/if}
{if isset($flag_country)}
<span class="label label-default" title="Country">{$flag_country|escape:'html':'UTF-8'}</span>
{/if}
{if isset($flag_device)}
{if $isPs17}
<span class="label label-default" title="{$flag_device|escape:'html':'UTF-8'} device"><i class="icon-{$flag_device|escape:'html':'UTF-8'}"></i></span>
{else}
<span class="label label-default" title="{$flag_device|escape:'html':'UTF-8'} device">{$flag_device|escape:'html':'UTF-8'}</span>
{/if}
{/if}
{if isset($flag_group)}
{if $isPs17}
<span class="label label-default" title="User groups"><i class="icon-users"></i> {$flag_group|escape:'html':'UTF-8'}</span>
{else}
<span class="label label-default" title="User groups">Groups: {$flag_group|escape:'html':'UTF-8'}</span>
{/if}
{/if}
{if isset($flag_tax_manager)}
<span class="label label-default specifics" title="Taxes applied in this cache">Tax: #{$flag_tax_manager|escape:'html':'UTF-8'}
<div class="pc_specifics">{$flag_tax_manager_more|escape:'html':'UTF-8'}</div>
</span>
{/if}
{if isset($flag_specifics)}
<span class="label label-default specifics" title="Some specific keys added by some modules">Specifics: #{$flag_specifics|escape:'html':'UTF-8'}
<div class="pc_specifics"><b>Some specific keys added by some modules</b><br/>{$flag_specifics_more|escape:'html':'UTF-8'}</div>
</span>
{/if}
{if isset($flag_v_css)}
<span class="label label-default" title="JS version to avoid the use of obsolete styles">CSS v{$flag_v_css|escape:'html':'UTF-8'}</span>
{/if}
{if isset($flag_v_js)}
<span class="label label-default" title="JS version to avoid the use of obsolete javascript">JS v{$flag_v_js|escape:'html':'UTF-8'}</span>
{/if}

View File

@@ -0,0 +1,30 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<table class="table">
<tbody>
{foreach $systemInfos->getAll() as $key => $labelValue}
<tr>
<td style="font-weight: bold">{$labelValue['label']|escape:'html':'UTF-8'}</td>
<td>{$labelValue['value']|escape:'html':'UTF-8'}</td>
</tr>
{/foreach}
</tbody>
</table>
{if $op_cache}
<form id="pagecache_form_resetopcache" action="{$request_uri|escape:'html':'UTF-8'}" method="post">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="diagnostic"/>
<fieldset style="margin: 10px 0">
<div class="bootstrap">
<button type="submit" id="submitModuleResetOpcache" name="submitModuleResetOpcache" class="btn btn-warning">
<i class="process-icon-delete"></i> {l s='Reset OP Cache' mod='pagecache'}
</button>
</div>
</fieldset>
</form>
{/if}

View File

@@ -0,0 +1,171 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<div class="panel">
<h3>{if $avec_bootstrap}<i class="icon-user-md"></i>{else}<img width="16" height="16" src="../img/admin/binoculars.png" alt=""/>{/if}&nbsp;{l s='Configuration' mod='pagecache'} ({$diagnostic_count|escape:'html':'UTF-8'})</h3>
<form id="pagecache_form_diagnostic" action="{$request_uri|escape:'html':'UTF-8'}" method="post">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="diagnostic"/>
<fieldset>
{if $diagnostic_count == 0}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/check.png" alt="ok" width="24" height="24"/> {l s='Everything is good!' mod='pagecache'}
{/if}
{foreach $diagnostic['error'] as $diagMsg}
{if $avec_bootstrap}
<div class="bootstrap"><div class="alert alert-danger" style="display: block;">&nbsp;{$diagMsg['msg']|escape:'html':'UTF-8'}.{if array_key_exists('link', $diagMsg)} <a href="{$diagMsg['link']|escape:'html':'UTF-8'}">{$diagMsg['link_title']|escape:'html':'UTF-8'}.</a>{/if}</div></div>
{else}
<div class="error clear" style="display: block;">&nbsp;{$diagMsg['msg']|escape:'html':'UTF-8'}.{if array_key_exists('link', $diagMsg)} <a href="{$diagMsg['link']|escape:'html':'UTF-8'}">{$diagMsg['link_title']|escape:'html':'UTF-8'}.</a>{/if}</div>
{/if}
{/foreach}
{foreach $diagnostic['warn'] as $diagMsg}
{if $avec_bootstrap}
<div class="bootstrap"><div class="alert alert-warning" style="display: block;">&nbsp;{$diagMsg['msg']|escape:'html':'UTF-8'}.{if array_key_exists('link', $diagMsg)} <a href="{$diagMsg['link']|escape:'html':'UTF-8'}">{$diagMsg['link_title']|escape:'html':'UTF-8'}.</a>{/if}</div></div>
{else}
<div class="warn clear" style="display: block;">&nbsp;{$diagMsg['msg']|escape:'html':'UTF-8'}.{if array_key_exists('link', $diagMsg)} <a href="{$diagMsg['link']|escape:'html':'UTF-8'}">{$diagMsg['link_title']|escape:'html':'UTF-8'}.</a>{/if}</div>
{/if}
{/foreach}
{foreach $diagnostic['info'] as $diagMsg}
{if $avec_bootstrap}
<div class="bootstrap"><div class="alert alert-info" style="display: block;">&nbsp;{$diagMsg['msg']|escape:'html':'UTF-8'}.{if array_key_exists('link', $diagMsg)} <a href="{$diagMsg['link']|escape:'html':'UTF-8'}">{$diagMsg['link_title']|escape:'html':'UTF-8'}.</a>{/if}</div></div>
{else}
<div class="hint clear" style="display: block;">&nbsp;{$diagMsg['msg']|escape:'html':'UTF-8'}.{if array_key_exists('link', $diagMsg)} <a href="{$diagMsg['link']|escape:'html':'UTF-8'}">{$diagMsg['link_title']|escape:'html':'UTF-8'}.</a>{/if}</div>
{/if}
{/foreach}
</fieldset>
</form>
</div>
<div class="panel">
<h3>{if $avec_bootstrap}<i class="icon-desktop"></i>{else}<img width="16" height="16" src="../img/admin/informations.png" alt=""/>{/if}&nbsp;{l s='System informations' mod='pagecache'}</h3>
{include file='./get-content-tab-diagnostic-infos.tpl' systemInfos=$systemInfos}
</div>
<div class="panel">
<h3>{if $avec_bootstrap}<i class="icon-exclamation-triangle"></i>{else}<img width="16" height="16" src="../img/admin/error.png" alt=""/>{/if}&nbsp;{l s='Slower modules' mod='pagecache'}</h3>
{if $avec_bootstrap}
<div class="bootstrap">
<div class="alert alert-info" style="display: block;">
{l s='This table shows you the slower modules that could slow down your shop' mod='pagecache'}
</div>
{if $pagecache_profiling_not_available}
<div class="alert alert-warning" style="display: block;">
&nbsp;{l s='This tools is only available from Prestashop 1.7' mod='pagecache'}
</div>
{else}
{if !$module_enabled}
<div class="alert alert-warning" style="display: block;">
&nbsp;{l s='This tools is not available if the module or if the shop is not enabled' mod='pagecache'}
</div>
{/if}
{if $pagecache_profiling_max_reached}
<div class="alert alert-warning" style="display: block;">
{l s='To preserve performances, the profiling has been suspended because it reaches the maximum number of records' mod='pagecache'}: {$pagecache_profiling_max|escape:'html':'UTF-8'}
</div>
{/if}
{/if}
</div>
{else}
<div class="hint clear">
<div>
{l s='This table shows you the slower modules that could slow down your shop' mod='pagecache'}
</div>
</div>
{if $pagecache_profiling_not_available}
<div class="warn clear" style="display: block;">&nbsp;{l s='This tools is only available from Prestashop 1.7' mod='pagecache'}</div>
{else}
{if !$module_enabled}
<div class="warn clear" style="display: block;">&nbsp;{l s='This tools is not available if the module or if the shop is not enabled' mod='pagecache'}</div>
{/if}
{if $pagecache_profiling_max_reached}
<div class="warn clear" style="display: block;">&nbsp;{l s='To preserve performances, the profiling has been suspended because it reaches the maximum number of records' mod='pagecache'}: {$pagecache_profiling_max|escape:'html':'UTF-8'}</div>
{/if}
{/if}
{/if}
{if $module_enabled && !$pagecache_profiling_not_available}
<form id="pagecache_form_profiling" action="{$request_uri|escape:'html':'UTF-8'}" method="post" class="form-inline">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="diagnostic"/>
<fieldset style="margin: 10px 0">
{if $pagecache_profiling}
<div class="form-group">
<label for="pagecache_profiling_min_ms">{l s='Only record modules that last more than' mod='pagecache'}</label>
<div class="input-group">
<input type="number" min="0" style="text-align:right" class="form-control" id="pagecache_profiling_min_ms" name="pagecache_profiling_min_ms" value="{$pagecache_profiling_min_ms|escape:'html':'UTF-8'}">
<div class="input-group-addon">ms</div>
</div>
</div>
<button type="submit" id="submitModuleProfilingMinMs" name="submitModuleProfilingMinMs" value="1" class="btn btn-default">{l s='Save' mod='pagecache'}</button>
{/if}
</fieldset>
<fieldset style="margin: 10px 0">
<div class="bootstrap">
<button type="submit" value="1" id="submitModuleOnOffProfiling" name="submitModuleOnOffProfiling"
class="btn btn-default">
<i class="process-icon-off"
style="color:{if $pagecache_profiling}red{else}rgb(139, 201, 84){/if}"></i> {if $pagecache_profiling}{l s='Disable profiling' mod='pagecache'}{else}{l s='Enable profiling' mod='pagecache'}{/if}
</button>
{if $pagecache_profiling}
<button type="submit" value="1" id="submitModuleResetProfiling" name="submitModuleResetProfiling"
class="btn btn-default">
<i class="process-icon-delete"
style="color:orange"></i> {l s='Clear profiling datas' mod='pagecache'}
</button>
<button type="button" value="1" id="submitModuleRefreshProfiling" name="submitModuleRefreshProfiling"
class="btn btn-default" onclick="$('#profilingTable').DataTable().ajax.reload();return false;">
<i class="process-icon-refresh"></i> {l s='Refresh' mod='pagecache'}
</button>
{/if}
</div>
</fieldset>
</form>
{if $pagecache_profiling}
<script type="application/javascript">
$(document).ready(function () {
$('#profilingTable').DataTable({
processing: true,
serverSide: true,
searching: false,
ajax: '{$pagecache_profiling_datas_url|escape:'javascript':'UTF-8'}',
language: {
processing: "{l s='Loading datas...' mod='pagecache'}",
search: "{l s='Search...' mod='pagecache'}:",
lengthMenu: "{l s='Showing _MENU_ rows' mod='pagecache'}",
info: "{l s='Showing _START_ to _END_ of _TOTAL_ rows' mod='pagecache'}",
infoEmpty: "{l s='Showing 0 to 0 of 0 row' mod='pagecache'}",
infoFiltered: "{l s='Filtered of _MAX_ rows' mod='pagecache'}",
infoPostFix: "",
loadingRecords: "{l s='Loading datas...' mod='pagecache'}",
zeroRecords: "{l s='No module to display' mod='pagecache'}",
emptyTable: "{l s='No module to display' mod='pagecache'}",
paginate: {
first: "{l s='First' mod='pagecache'}",
previous: "{l s='Previous' mod='pagecache'}",
next: "{l s='Next' mod='pagecache'}",
last: "{l s='Last' mod='pagecache'}"
},
aria: {
sortAscending: ": {l s='Click to sort ascending' mod='pagecache'}",
sortDescending: ": {l s='Click to sort descending' mod='pagecache'}"
}
}
});
});
</script>
<table id="profilingTable" class="display cell-border compact stripe" style="width:100%">
<thead>
<tr>
<th>{l s='Module' mod='pagecache'}</th>
<th>{l s='Code' mod='pagecache'}</th>
<th>{l s='Execution date' mod='pagecache'}</th>
<th>{l s='Duration' mod='pagecache'}</th>
</tr>
</thead>
</table>
{/if}
{/if}
</div>

View File

@@ -0,0 +1,186 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
{if $avec_bootstrap}
{assign var=logo value='logo.png'}
{else}
{assign var=logo value='logo.gif'}
{/if}
<script type="text/javascript">
function addWidget(widgetDisplayName, widgetName, hookName, emptyBox, widgetVersion, widgetAuthor, widgetDescription, widgetId) {
$("#widgetTables").append("<tr>" +
"<td><img width=\"32\" src=\"../modules/"+widgetName+"/logo.png\" title=\""+widgetName+" #"+widgetId+" - "+widgetDescription+"\"/> "+widgetDisplayName+" <small class=\"text-muted\">&nbsp;-&nbsp;v"+widgetVersion+"</small><small class=\"text-muted\">&nbsp;-&nbsp;"+widgetAuthor+"</small></td>" +
"<td style=\"text-align: center\">"+hookName+"</td>" +
"<td style=\"text-align: center\"><input" + (emptyBox ? " checked" : "") + " disabled type=\"checkbox\"/></td>" +
"<td><button type=\"button\" onclick=\"removeWidget(\'"+widgetName+"\', \'"+hookName+"\'); this.closest(\'tr\').remove();\"><i class=\"icon-remove\"></i> {l s='Remove' mod='pagecache'}</button><input type=\"hidden\" name=\"pagecache_dynwidgets[]\" value=\""+widgetName+"|"+hookName+"|"+(emptyBox ? "1" : "0")+"\"/></td></tr>");
}
function removeWidget(widgetName, hookName) {
}
$(function() {
$("#dynhook_filter").on("keyup", function() {
var value = $(this).val().toLowerCase();
$("#dynhooks_table > tbody > tr").filter(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);
});
});
});
</script>
<div class="panel">
<h3>{if $avec_bootstrap}<i class="icon-puzzle-piece"></i>{else}<img width="16" height="16" src="../img/admin/tab-plugins.gif" alt=""/>{/if}&nbsp;{l s='Dynamic modules and widgets' mod='pagecache'}</h3>
<form id="pagecache_form_dynhooks" action="{$request_uri|escape:'html':'UTF-8'}" method="post">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="dynhooks"/>
<fieldset>
<div style="clear: both;">
{if !$pagecache_debug}
{if $avec_bootstrap}
<div class="bootstrap"><div class="alert alert-warning" style="display: block;">&nbsp;{l s='To be able to modify dynamic modules and widgets you must go back in "test mode" in first tab' mod='pagecache'}</div></div>
{else}
<div class="warn clear" style="display: block;">&nbsp;{l s='To be able to modify dynamic modules and widgets you must go back in "test mode" in first tab' mod='pagecache'}</div>
{/if}
{/if}
<p>{l s='You cannot exclude a module from the cache but you can set it as dynamic. A dynamic module will be displayed in "anonymous mode" in the cache, then a background request will refresh it in order to display it with the context of the current visitor.' mod='pagecache'}</p>
{if $avec_bootstrap}
<div class="bootstrap"><div class="alert alert-info" style="display: block;">&nbsp;{l s='Note that dynamic module Ajax call are done all at once (one HTTP request)' mod='pagecache'}</div></div>
{else}
<div class="hint clear" style="display: block;">&nbsp;{l s='Note that dynamic module Ajax call are done all at once (one HTTP request)' mod='pagecache'}</div>
{/if}
<br/><h4 id="tabdynhooksmodules">{l s='Dynamic modules' mod='pagecache'}</h4>
<input type="text" id="dynhook_filter" placeholder="{l s='Filter' mod='pagecache'}" style="margin: 5px 0; width: 200px"/>
<table id="dynhooks_table" class="table table-bordered table-striped">
<thead>
<tr>
<th width="40%">{l s='Module' mod='pagecache'}</th>
<th width="60%">{l s='Hooks' mod='pagecache'}</th>
</tr>
</thead>
<tbody>
{assign var=indexRow value=0}
{foreach $modules_hooks as $module_name => $moduleInfos}
<tr>
<td style="vertical-align: top">
<img width="32" src="../modules/{$module_name|escape:'html':'UTF-8'}/logo.png" title="{$module_name|escape:'html':'UTF-8'} #{$moduleInfos['id_module']|intval} - {$moduleInfos['description']|escape:'html':'UTF-8'}" />
{$moduleInfos['display_name']|escape:'html':'UTF-8'}
{if $moduleInfos['version']}
<small class="text-muted">&nbsp;-&nbsp;v{$moduleInfos['version']|escape:'html':'UTF-8'}</small>
{/if}
{if $moduleInfos['author']}
<small class="text-muted">&nbsp;-&nbsp;{$moduleInfos['author']|escape:'html':'UTF-8'}</small>
{/if}
</td>
<td>
<table class="table">
<colgroup>
<col width="0*">
<col width="*">
<col width="0*">
<col width="50%">
</colgroup>
{foreach $moduleInfos['hooks'] as $hook_name => $hook_infos}
<tr>
<td width="15"><input {if $hook_infos['dyn_is_checked']}checked{/if} {if !$pagecache_debug}disabled{/if} type="checkbox" name="pagecache_hooks[]" id="dyn{$indexRow|escape:'html':'UTF-8'}" value="{$hook_name|escape:'html':'UTF-8'}|{$module_name|escape:'html':'UTF-8'}" onclick="$('.emptyspan{$indexRow|escape:'html':'UTF-8'}').toggle();"/></td>
<td><label for="dyn{$indexRow|escape:'html':'UTF-8'}">{$hook_name|escape:'html':'UTF-8'}</label></td>
<td width="15">
<span {if !$hook_infos['dyn_is_checked']}style="display:none"{/if} class="emptyspan{$indexRow|escape:'html':'UTF-8'}">
<input {if $hook_infos['empty_option_checked']}checked{/if} {if !$pagecache_debug}disabled{/if} type="checkbox" name="pagecache_hooks_empty_{$hook_name|escape:'html':'UTF-8'}_{$module_name|escape:'html':'UTF-8'}" id="emptyoption{$indexRow|escape:'html':'UTF-8'}" value="1"/>
</span>
</td>
<td>
<span {if !$hook_infos['dyn_is_checked']}style="display:none"{/if} class="emptyspan{$indexRow|escape:'html':'UTF-8'}">
<label class="t" for="emptyoption{$indexRow|escape:'html':'UTF-8'}">{l s='Display nothing in cache' mod='pagecache'}</label>
</span>
</td>
</tr>
{assign var=indexRow value=$indexRow+1}
{/foreach}
</table>
</td>
</tr>
{/foreach}
</tbody>
</table>
<h4 id="tabdynhookswidgets" style="margin-top: 20px">{l s='Dynamic widgets' mod='pagecache'}</h4>
<input type="hidden" name="pcdynwidgets" value=""/>
<p>{l s='Widgets are modules that can be displayed anywhere in the theme; they do not need any hook. This feature has been added in Prestashop 1.7. A widget can be displayed with an optional "hookName" that is used to choose a specific template.' mod='pagecache'}</p>
<p>{l s='Here you can specify which widget must be refreshed dynamically (is relative to the current visitor).' mod='pagecache'}</p>
<table style="margin: 15px">
<tr>
<td style="padding-right: 5px"><label for="widgetName" style="float:inherit">{l s='Widget' mod='pagecache'}</label></td>
<td><label for="widgetHookName" style="float:inherit; padding-left: 20px">{l s='Hook name (optional)' mod='pagecache'}</label></td>
</tr>
<tr>
<td style="padding-right: 5px">
<select {if !$pagecache_debug}disabled{/if} name="widgetName" id="widgetName" style="width: 200px">
{foreach $widgets as $widget_name => $widget_infos}
<option value="{$widget_name|escape:'html':'UTF-8'}" data-version="{$widget_infos['version']|escape:'html':'UTF-8'}" data-author="{$widget_infos['author']|escape:'html':'UTF-8'}" data-description="{$widget_infos['description']|escape:'html':'UTF-8'}" data-id="{$widget_infos['id_module']|escape:'html':'UTF-8'}">{$widget_infos['display_name']|escape:'html':'UTF-8'} ({$widget_name|escape:'html':'UTF-8'})</option>
{/foreach}
</select>
</td>
<td style="padding-right: 5px">
<input {if !$pagecache_debug}disabled{/if} id="widgetHookName" name="widgetHookName" style="width: 200px;" value="" type="text"/>
</td>
<td style="padding-right: 5px">
<div class="checkbox"><label for="widgetEmptyBox"><input {if !$pagecache_debug}disabled{/if} id="widgetEmptyBox" name="widgetEmptybox" value="1" type="checkbox"/>{l s='Display nothing in cache' mod='pagecache'}</label></div>
</td>
<td>
<button {if !$pagecache_debug}disabled{/if} type="button" onclick="addWidget($('#widgetName option:selected').text(), $('#widgetName').val(), $('#widgetHookName').val(), $('#widgetEmptyBox').is(':checked'), $('#widgetName option:selected').data('version'), $('#widgetName option:selected').data('author'), $('#widgetName option:selected').data('description'), $('#widgetName option:selected').data('id'))" class="btn btn-default"><i class="icon-plus"></i> {l s='Add' mod='pagecache'}</button>
</td>
</tr>
</table>
<div class="bootstrap">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr><th>{l s='Widget' mod='pagecache'}</th><th style="text-align: center">{l s='Hook name' mod='pagecache'}</th><th style="text-align: center">{l s='Display nothing in cache' mod='pagecache'}</th><th></th></tr>
</thead>
<tbody id="widgetTables">
{foreach $dynamic_widgets as $widgetInfos}
<tr>
<td>
<img width="32" src="../modules/{$widgetInfos['name']|escape:'html':'UTF-8'}/logo.png" title="{$widgetInfos['name']|escape:'html':'UTF-8'} #{$widgetInfos['id_module']|intval} - {$widgetInfos['description']|escape:'html':'UTF-8'}" />
{$widgetInfos['display_name']|escape:'html':'UTF-8'}
{if $widgetInfos['version']}
<small class="text-muted">&nbsp;-&nbsp;v{$widgetInfos['version']|escape:'html':'UTF-8'}</small>
{/if}
{if $widgetInfos['author']}
<small class="text-muted">&nbsp;-&nbsp;{$widgetInfos['author']|escape:'html':'UTF-8'}</small>
{/if}
</td>
<td style="text-align: center">{$widgetInfos['hook']|escape:'html':'UTF-8'}</td>
<td style="text-align: center"><input {if $widgetInfos['empty_box']}checked{/if} disabled type="checkbox"/></td>
<td>{if $pagecache_debug}<button type="button" onclick="removeWidget('{$widgetInfos['name']|escape:'html':'UTF-8'}', '{$widgetInfos['hook']|escape:'html':'UTF-8'}'); this.closest('tr').remove();"><i class="icon-remove"></i> {l s='Remove' mod='pagecache'}</button><input type="hidden" name="pagecache_dynwidgets[]" value="{$widgetInfos['name']|escape:'html':'UTF-8'}|{$widgetInfos['hook']|escape:'html':'UTF-8'}|{$widgetInfos['empty_box']|intval}"/>{/if}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
<h4 id="tabdynhooksjs" style="margin-top: 20px">{l s='Javascript to execute' mod='pagecache'}</h4>
<div id="cfgadvanced">
<p>{l s='Here you can modify javascript code that is executed after dynamic modules and widgets have been displayed on the page.' mod='pagecache'}</p>
<p>{l s='If you meet problems with your theme, ask your theme designer what javascript you should add here.' mod='pagecache'}</p>
<textarea {if !$pagecache_debug}disabled{/if} name="cfgadvancedjs" style="width:95%" rows="20">{$pagecache_cfgadvancedjs|escape:'html':'UTF-8'}</textarea>
</div>
</div>
<br/>
<div class="bootstrap">
<button type="submit" value="1" id="submitModuleDynhooks" name="submitModuleDynhooks" class="btn btn-default pull-right" {if !$pagecache_debug}disabled{/if}>
<i class="process-icon-save"></i> {l s='Save' mod='pagecache'}
</button>
</div>
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,538 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<div class="row" id="dashboard">
{if $latest_version}
<div class="col-md-12">
<div class="panel" style="font-size: 0.9rem;">
<h3 class="panel-heading" style="color: #59c763">{if $avec_bootstrap}<i class="icon-star" style="color: #59c763"></i>{else}<img width="16" height="16" src="../img/admin/asterisk.gif" alt=""/>{/if} {l s='New version %s is now available!' mod='pagecache' sprintf=[$latest_version['version']]}</h3>
<p>{l s='Version %s has been published, check the changelogs to know what is new.' mod='pagecache' sprintf=[$latest_version['version']]}</p>
{if !$latest_version['upgrade_link']}
{if $pagecache_seller == 'addons'}
<p>
{l s='Publishing all versions to Addons is very time consuming so I created a free module to allow you to upgrade to the latest version very easily (one click). Find how it works and download it here:' mod='pagecache'}
<a href="{$jpresta_shop_url|escape:'html':'UTF-8'}{l s='/en/prestashop-modules/20-jpresta-easy-upgrade.html' mod='pagecache'}" target="_blank">{$jpresta_shop_url|escape:'html':'UTF-8'}{l s='/en/prestashop-modules/20-jpresta-easy-upgrade.html' mod='pagecache'}</a>
</p>
{else}
<p>
{l s='To make your life easier I created a free module to allow you to upgrade to the latest version in one click. Find how it works and download it here:' mod='pagecache'}
<a href="{$jpresta_shop_url|escape:'html':'UTF-8'}{l s='/en/prestashop-modules/20-jpresta-easy-upgrade.html' mod='pagecache'}" target="_blank">{$jpresta_shop_url|escape:'html':'UTF-8'}{l s='/en/prestashop-modules/20-jpresta-easy-upgrade.html' mod='pagecache'}</a>
</p>
{/if}
{/if}
<p>{l s='Using the latest version is always recommended because it may fix a bug or make the cache more efficient or even faster!' mod='pagecache'}</p>
{if $latest_version['upgrade_link']}
<a href="{$latest_version['upgrade_link']|escape:'html':'UTF-8'}" class="btn btn-primary">{l s='Upgrade with JPresta Easy Upgrade' mod='pagecache'}...</a>
{else}
<a href="{$jpresta_shop_url|escape:'html':'UTF-8'}{l s='/en/prestashop-modules/20-jpresta-easy-upgrade.html' mod='pagecache'}" target="_blank" class="btn btn-primary">{l s='Download JPresta Easy Upgrade' mod='pagecache'}...</a>
{/if}
{if $latest_version['changelogs']}
<a data-toggle="collapse" href="#changelogs" role="button" aria-expanded="false" aria-controls="changelogs" class="btn btn-default">{l s='See changelogs' mod='pagecache'}</a>
<div id="changelogs" class="collapse changelogs" style="border: 1px solid #ccc; border-radius: 3px; padding: 0.5rem; margin-top: 0.5rem; max-height: 200px; overflow: auto;">
{foreach from=$latest_version['changelogs'] key=versionLogs item=logs}
{$versionLogs|escape:'html':'UTF-8'}
<ul>
{foreach from=$logs item=log}
<li>{$log|escape:'html':'UTF-8'}</li>
{/foreach}
</ul>
{/foreach}
</div>
{/if}
</div>
</div>
{/if}
<div class="{if $pagecache_debug}col-md-12{else}col-md-12 col-lg-6{/if}">
<div class="panel">
<h3 class="panel-heading">{if $avec_bootstrap}<i class="icon-wrench"></i>{else}<img width="16" height="16" src="../img/admin/prefs.gif" alt=""/>{/if} {l s='Installation' mod='pagecache'}</h3>
<form id="pagecache_form_install" action="{$request_uri|escape:'html':'UTF-8'}" method="post">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="install"/>
<input type="hidden" name="pagecache_disable_tokens" value="false" id="pagecache_disable_tokens"/>
<fieldset>
<div style="clear: both;">
{if $pagecache_debug}
<input type="hidden" name="pagecache_install_step" id="pagecache_install_step" value="{$cur_step + 1|escape:'html':'UTF-8'}"/>
<input type="hidden" name="pagecache_disable_loggedin" id="pagecache_disable_loggedin" value="0"/>
<input type="hidden" name="pagecache_seller" id="pagecache_seller" value="{$pagecache_seller|escape:'html':'UTF-8'}"/>
<input type="hidden" name="pagecache_autoconf" id="pagecache_autoconf" value="false"/>
{if $cur_step > $INSTALL_STEP_INSTALL}
<div class="installstep">{l s='Congratulations!' mod='pagecache'} {$module_displayName|escape:'html':'UTF-8'} {l s='is currently installed in' mod='pagecache'} <b>{l s='test mode' mod='pagecache'}</b>{l s=', that means it\'s not yet activated to your visitors.' mod='pagecache'}</div>
{/if}
<div class="installstep">{l s='To complete the installation, please follow these steps:' mod='pagecache'}
{* INSTALL STEP *}
<div class="step {if $cur_step > $INSTALL_STEP_INSTALL}stepok{elseif $cur_step < $INSTALL_STEP_INSTALL}steptodo{/if}">
{if $cur_step > $INSTALL_STEP_INSTALL}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/check.png" alt="ok" width="24" height="24" />
{elseif $cur_step < $INSTALL_STEP_INSTALL}
<span>{$INSTALL_STEP_INSTALL|escape:'html':'UTF-8'}</span>
{else}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/curstep.gif" alt="todo" width="24" height="24" />
{/if}
{l s='Install the module and enable test mode' mod='pagecache'}
{if $cur_step == $INSTALL_STEP_INSTALL}
<div class="stepdesc"><ol><li>{l s='Resolve displayed errors above' mod='pagecache'}</li></ol></div>
{/if}
</div>
{* BUY FROM STEP *}
<div class="step {if $cur_step > $INSTALL_STEP_BUY_FROM}stepok{elseif $cur_step < $INSTALL_STEP_BUY_FROM}steptodo{/if}">
{if $cur_step > $INSTALL_STEP_BUY_FROM}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/check.png" alt="ok" width="24" height="24" />
{elseif $cur_step < $INSTALL_STEP_BUY_FROM}
<span>{$INSTALL_STEP_BUY_FROM|escape:'html':'UTF-8'}</span>
{else}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/curstep.gif" alt="todo" width="24" height="24" />
{/if}
{l s='Tell us where did you buy the module' mod='pagecache'}
{if $cur_step == $INSTALL_STEP_BUY_FROM}
<div class="stepdesc">
<ol>
<li>{l s='In order to display correct links for support just tell us where you bought ' mod='pagecache'}{$module_displayName|escape:'html':'UTF-8'}</li>
</ol>
<a href="#" class="okbtn" onclick="$('#pagecache_seller').val('addons');$('#pagecache_form_install').submit();return false;">{l s='Prestashop Addons' mod='pagecache'}</a>
<a href="#" class="okbtn" onclick="$('#pagecache_seller').val('jpresta');$('#pagecache_form_install').submit();return false;">{l s='JPresta.com' mod='pagecache'}</a>
</div>
{/if}
</div>
{* IN ACTION STEP *}
<div class="step {if $cur_step > $INSTALL_STEP_IN_ACTION}stepok{elseif $cur_step < $INSTALL_STEP_IN_ACTION}steptodo{/if}">
{if $cur_step > $INSTALL_STEP_IN_ACTION}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/check.png" alt="ok" width="24" height="24" />
{elseif $cur_step < $INSTALL_STEP_IN_ACTION}
<span>{$INSTALL_STEP_IN_ACTION|escape:'html':'UTF-8'}</span>
{else}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/curstep.gif" alt="todo" width="24" height="24" />
{/if}
{l s='Check that the module is well installed' mod='pagecache'}
{if $cur_step == $INSTALL_STEP_IN_ACTION}
<div class="stepdesc">
<ol>
<li><a href="{$shop_link_debug|escape:'html':'UTF-8'}" target="_blank">{l s='Click here to browse your site in test mode' mod='pagecache'}</a></li>
<li>{l s='You must see a box displayed in bottom left corner of your store' mod='pagecache'}</li>
<li>{l s='You must be able to play with these buttons' mod='pagecache'} &nbsp;&nbsp;<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/on.png" alt="" width="16" height="16" /><img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/reload.png" alt="" width="16" height="16" /><img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/trash.png" alt="" width="16" height="16" /><img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/close.png" alt="" width="16" height="16" /></li>
</ol>
<a href="#" class="okbtn" onclick="$('#pagecache_form_install').submit();return false;">{l s='OK, I validate this step' mod='pagecache'}</a>
<a href="#" class="kobtn" onclick="$('#helpINSTALL_STEP_IN_ACTION').toggle();return false;">{l s='No, I\'m having trouble' mod='pagecache'}</a>
<div class="stephelp" id="helpINSTALL_STEP_IN_ACTION">
<ol>
<li>{l s='Reset the module and see if it\'s better' mod='pagecache'}</li>
<li>{l s='If, after resetting the module, you are still having trouble,' mod='pagecache'} <a href="{$contact_url|escape:'html':'UTF-8'}" target="_blank">{l s='contact us here' mod='pagecache'}</a></li>
</ol>
</div>
</div>
{/if}
</div>
{* AUTOCONF STEP *}
<div class="step {if $cur_step > $INSTALL_STEP_AUTOCONF}stepok{elseif $cur_step < $INSTALL_STEP_AUTOCONF}steptodo{/if}">
{if $cur_step > $INSTALL_STEP_AUTOCONF}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/check.png" alt="ok" width="24" height="24" />
{elseif $cur_step < $INSTALL_STEP_AUTOCONF}
<span>{$INSTALL_STEP_AUTOCONF|escape:'html':'UTF-8'}</span>
{else}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/curstep.gif" alt="todo" width="24" height="24" />
{/if}
{l s='Auto-configuration of known modules' mod='pagecache'}
{if $cur_step == $INSTALL_STEP_AUTOCONF}
<div class="stepdesc">
<p>
<i>{l s='Contact our server to request the configuration of know modules so it\'s faster and easier for you' mod='pagecache'}</i>
</p>
{if !empty($pagecache_cfgadvancedjs)}
<div class="bootstrap">
<div class="alert alert-info" style="display: block;">&nbsp;{l s='Warning: this will erase the current configuration of Page Cache' mod='pagecache'}</div>
</div>
<button class="okbtn" onclick="if (confirm('{l s='Warning: this will erase the current configuration of Page Cache' js='true' mod='pagecache'}')){ $('#pagecache_autoconf').val('true');$('#pagecache_form_install').submit();$(this).prop('disabled', 'true');};return false;">{l s='Auto-configuration' mod='pagecache'}</button>
{else}
<button class="okbtn" onclick="$('#pagecache_autoconf').val('true');$('#pagecache_form_install').submit();$(this).prop('disabled', 'true');return false;">{l s='Auto-configuration' mod='pagecache'}</button>
{/if}
<a href="#" class="kobtn" onclick="$('#pagecache_autoconf').val('false');$('#pagecache_form_install').submit();return false;">{l s='Continue manually' mod='pagecache'}</a>
</div>
{/if}
</div>
{* CART STEP *}
<div class="step {if $cur_step > $INSTALL_STEP_CART}stepok{elseif $cur_step < $INSTALL_STEP_CART}steptodo{/if}">
{if $cur_step > $INSTALL_STEP_CART}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/check.png" alt="ok" width="24" height="24" />
{elseif $cur_step < $INSTALL_STEP_CART}
<span>{$INSTALL_STEP_CART|escape:'html':'UTF-8'}</span>
{else}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/curstep.gif" alt="todo" width="24" height="24" />
{/if}
{l s='Check that the cart is working good' mod='pagecache'}
{if $cur_step == $INSTALL_STEP_CART}
<div class="stepdesc">
<ol>
<li><a href="{$shop_link_debug|escape:'html':'UTF-8'}" target="_blank">{l s='Click here to browse your site in test mode' mod='pagecache'}</a></li>
<li>{l s='Check that you can add products into the cart as usual' mod='pagecache'}</li>
<li>{l s='Once you have a product in your cart, display an other page and see if cart still contains the products you added' mod='pagecache'}</li>
</ol>
<a href="#" class="okbtn" onclick="$('#pagecache_form_install').submit();return false;">{l s='OK, I validate this step' mod='pagecache'}</a>
<a href="#" class="kobtn" onclick="$('#helpINSTALL_STEP_CART').toggle();return false;">{l s='No, I\'m having trouble' mod='pagecache'}</a>
<div class="stephelp" id="helpINSTALL_STEP_CART">
<ol>
<li>{l s='When you display an other page, check that you have the parameter dbgpagecache=1 in the URL. If not, just add it.' mod='pagecache'}</li>
<li>{l s='When refreshing the cart, PageCache may remove some "mouse over" behaviours. To set them back you can execute some javascript after all dynamics modules have been displayed.' mod='pagecache'} <a href="#tabdynhooksjs" onclick="displayTab('dynhooks');return true;">{l s='Go in "Dynamic modules" tab in Javascript form.' mod='pagecache'}</a></li>
<li>{l s='If you cannot make it work,' mod='pagecache'} <a href="{$contact_url|escape:'html':'UTF-8'}" target="_blank">{l s='contact us here' mod='pagecache'}</a></li>
</ol>
</div>
</div>
{/if}
</div>
{* LOGGED_IN STEP *}
<div class="step {if $cur_step > $INSTALL_STEP_LOGGED_IN}stepok{elseif $cur_step < $INSTALL_STEP_LOGGED_IN}steptodo{/if}">
{if $cur_step > $INSTALL_STEP_LOGGED_IN}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/check.png" alt="ok" width="24" height="24" />
{elseif $cur_step < $INSTALL_STEP_LOGGED_IN}
<span>{$INSTALL_STEP_LOGGED_IN|escape:'html':'UTF-8'}</span>
{else}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/curstep.gif" alt="todo" width="24" height="24" />
{/if}
{l s='Check that logged in users are recognized' mod='pagecache'}
{if $cur_step == $INSTALL_STEP_LOGGED_IN}
<div class="stepdesc">
<ol>
{if $pagecache_skiplogged}
{if $avec_bootstrap}
<div class="bootstrap">
<div class="alert alert-info" style="display: block;">&nbsp;{l s='Cache is disabled for logged in users so this step should be OK now, but you should check this out anyway ;-)' mod='pagecache'}
<br/>{l s='If you want you can' mod='pagecache'} <a href="#" class="browsebtn" onclick="$('#pagecache_disable_loggedin').val(-1);$('#pagecache_form_install').submit();return false;">{l s='reactivate cache for logged in users' mod='pagecache'}</a>
</div>
</div>
{else}
<div class="hint clear" style="display: block;">&nbsp;{l s='Cache is disabled for logged in users so this step should be OK now, but you should check this out anyway ;-)' mod='pagecache'}
<br/>{l s='If you want you can' mod='pagecache'} <a href="#" class="browsebtn" onclick="$('#pagecache_disable_loggedin').val(-1);$('#pagecache_form_install').submit();return false;">{l s='reactivate cache for logged in users' mod='pagecache'}</a>
</div>
{/if}
{/if}
<li><a href="{$shop_link_debug|escape:'html':'UTF-8'}" target="_blank">{l s='Click here to browse your site in test mode' mod='pagecache'}</a></li>
<li>{l s='You must see the "sign in" link when you are not logged in' mod='pagecache'}</li>
<li>{l s='You must see the the user name when you are logged in' mod='pagecache'}</li>
<li>{l s='Of course it depends on your theme so just check that being logged in or not has the same behaviour with PageCache' mod='pagecache'}</li>
</ol>
<a href="#" class="okbtn" onclick="$('#pagecache_form_install').submit();return false;">{l s='OK, I validate this step' mod='pagecache'}</a>
<a href="#" class="kobtn" onclick="$('#helpINSTALL_STEP_LOGGED_IN').toggle();return false;">{l s='No, I\'m having trouble' mod='pagecache'}</a>
<div class="stephelp" id="helpINSTALL_STEP_LOGGED_IN">
{if !$pagecache_skiplogged}
<ol>
<li>{l s='Make sure that module displaying user informations or sign in links are set as "dynamic".' mod='pagecache'}</li>
<li>{l s='Your theme may be uncompatible with this feature, specially if these informations are "hard coded" in theme without using a module. In this case just disable PageCache for logged in users.' mod='pagecache'}</li>
</ol>
<a href="#" class="browsebtn" onclick="$('#pagecache_disable_loggedin').val(1);$('#pagecache_form_install').submit();return false;">{l s='Disable cache for logged in users' mod='pagecache'}</a>
{else}
<ol>
<li>{l s='Still having problem? Then ' mod='pagecache'} <a href="{$contact_url|escape:'html':'UTF-8'}" target="_blank">{l s='contact us here' mod='pagecache'}</a></li>
</ol>
{/if}
</div>
</div>
{/if}
</div>
{* EU_COOKIE STEP *}
<div class="step {if $cur_step > $INSTALL_STEP_EU_COOKIE}stepok{elseif $cur_step < $INSTALL_STEP_EU_COOKIE}steptodo{/if}">
{if $cur_step > $INSTALL_STEP_EU_COOKIE}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/check.png" alt="ok" width="24" height="24" />
{elseif $cur_step < $INSTALL_STEP_EU_COOKIE}
<span>{$INSTALL_STEP_EU_COOKIE|escape:'html':'UTF-8'}</span>
{else}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/curstep.gif" alt="todo" width="24" height="24" />
{/if}
{l s='Check your european law module if any' mod='pagecache'}
{if $cur_step == $INSTALL_STEP_EU_COOKIE}
<div class="stepdesc">
<ol>
<li><a href="{$shop_link_debug|escape:'html':'UTF-8'}" target="_blank">{l s='Click here to browse your site in test mode' mod='pagecache'}</a></li>
<li>{l s='Remove your cookies, reset the cache, then display a page' mod='pagecache'}</li>
<li>{l s='You should see the cookie law message; click to hide it' mod='pagecache'}</li>
<li>{l s='Reload the page, you should not see the message again' mod='pagecache'}</li>
</ol>
<a href="#" class="okbtn" onclick="$('#pagecache_form_install').submit();return false;">{l s='OK, I validate this step' mod='pagecache'}</a>
<a href="#" class="kobtn" onclick="$('#helpINSTALL_STEP_EU_COOKIE').toggle();return false;">{l s='No, I\'m having trouble' mod='pagecache'}</a>
<div class="stephelp" id="helpINSTALL_STEP_EU_COOKIE">
<ol>
<li>{l s='Make sure you have the latest version of the module' mod='pagecache'}</li>
<li>{l s='Still having problem? Then ' mod='pagecache'} <a href="{$contact_url|escape:'html':'UTF-8'}" target="_blank">{l s='contact us here' mod='pagecache'}</a></li>
</ol>
</div>
</div>
{/if}
</div>
{* VALIDATE STEP *}
<div class="step {if $cur_step > $INSTALL_STEP_VALIDATE}stepok{elseif $cur_step < $INSTALL_STEP_VALIDATE}steptodo{/if}">
{if $cur_step > $INSTALL_STEP_VALIDATE}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/check.png" alt="ok" width="24" height="24" />
{elseif $cur_step < $INSTALL_STEP_VALIDATE}
<span>{$INSTALL_STEP_VALIDATE|escape:'html':'UTF-8'}</span>
{else}
<img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/curstep.gif" alt="todo" width="24" height="24" />
{/if}
{l s='Push in production mode' mod='pagecache'}
{if $cur_step == $INSTALL_STEP_VALIDATE}
<div class="stepdesc">
<ol>
<li><a href="{$shop_link_debug|escape:'html':'UTF-8'}" target="_blank">{l s='Click here to browse your site in test mode' mod='pagecache'}</a></li>
<li>{l s='You can do more tests and once your are ready...' mod='pagecache'}</li>
</ol>
<a href="#" class="okbtn" onclick="$('#pagecache_form_install').submit();return false;">{l s='Enable PageCache for my customers!' mod='pagecache'}</a>
<a href="#" class="kobtn" onclick="$('#helpINSTALL_STEP_VALIDATE').toggle();return false;">{l s='No, I\'m having trouble' mod='pagecache'}</a>
<div class="stephelp" id="helpINSTALL_STEP_VALIDATE">
<ol>
<li>{l s='Make sure that the problem you have does not occur if you disable PageCache module' mod='pagecache'}</li>
<li>{l s='If your problem is only occuring with PageCache enabled, then' mod='pagecache'} <a href="{$contact_url|escape:'html':'UTF-8'}" target="_blank">{l s='contact us here' mod='pagecache'}</a></li>
</ol>
</div>
</div>
{/if}
</div>
<div class="bootstrap actions">
<button type="submit" value="1" onclick="$('#pagecache_install_step').val({$INSTALL_STEP_BUY_FROM|escape:'html':'UTF-8'}); return true;" id="submitModuleRestartInstall" name="submitModuleRestartInstall" class="btn btn-default">
<i class="process-icon-cancel" style="color:red"></i> {l s='Restart from first step' mod='pagecache'}
</button>
{if $cur_step !== $INSTALL_STEP_VALIDATE}
<button type="submit" value="1" onclick="$('#pagecache_install_step').val({$INSTALL_STEP_VALIDATE|escape:'html':'UTF-8'}); return true;" id="submitModuleGoToProd" name="submitModuleGoToProd" class="btn btn-default">
<i class="process-icon-next" style="color: #59C763"></i> {l s='Validate all steps' mod='pagecache'}
</button>
{/if}
</div>
</div>
{else}
<input type="hidden" name="pagecache_install_step" id="pagecache_install_step" value="{$INSTALL_STEP_BACK_TO_TEST|escape:'html':'UTF-8'}"/>
<div class="installstep"><img src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/check.png" alt="ok" width="20" height="20" /> {l s='Congratulations!' mod='pagecache'} {$module_displayName|escape:'html':'UTF-8'} {l s='is currently installed in' mod='pagecache'} <b>{l s='production mode' mod='pagecache'}</b>{if $pagecache_skiplogged}{l s=' for not logged in users' mod='pagecache'}{/if}{l s=', that means your site is now faster than ever!' mod='pagecache'}
</div>
<div class="installstep">{l s='If you are having trouble, ' mod='pagecache'}<a href="#" class="browsebtn" onclick="$('#pagecache_form_install').submit();return false;">{l s='go back to test mode' mod='pagecache'}</a></div>
{/if}
<button type="submit" value="1" id="submitModuleClearCache" name="submitModuleClearCache" class="btn btn-default" style="display:none">
<i class="process-icon-delete" style="color:orange"></i> {l s='Clear cache' mod='pagecache'}
</button>
<ul style="display:none">
<li id="desc-module-clearcache-li">
<a id="desc-module-clearcache" class="toolbar_btn" href="#" onclick="$('#submitModuleClearCache').click(); return false;" style="color:white; background-color: #FFA500FF">
<i class="process-icon-delete"></i>
<div>{l s='Clear cache' mod='pagecache'}</div>
</a>
</li>
</ul>
</div>
</fieldset>
</form>
</div>
{if !$pagecache_debug}
<div class="panel">
<h3 class="panel-heading">{if $avec_bootstrap}<i class="icon-dashboard"></i>{else}<img width="16" height="16" src="../img/admin/stats.gif" alt=""/>{/if} {l s='Cache performance' mod='pagecache'}</h3>
<label for="hitrate">{l s='Hit rate' mod='pagecache'}</label>
<div id="hitrate" class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="{$performances.percent_hit|intval}" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: {$performances.percent_hit|intval}%;">
{$performances.percent_hit|escape:'html':'UTF-8'}%
</div>
</div>
<p>{l s='This represents the rate of visitors getting the cached page, which mean the fast way. Higher is better! Don\'t worry, it is normal to get a low rate at the beginning.' mod='pagecache'}</p>
<p>{l s='You can improve this rate by using JPresta Cache Warmer' mod='pagecache'}.</p>
{if $performances.count_total > 0}
<div id="used_cache_chart" class='chart with-transitions' style="height: 400px">
<svg></svg>
</div>
<p>{l s='These metrics are based on %d visits since %s' sprintf=[$performances.count_total|intval,$performances.start_date|date_format:"%Y-%m-%d %H:%M:%S"] mod='pagecache'}</p>
<p>{l s='These metrics are flushed when you go in the statistics tab and click on' mod='pagecache'} "{l s='Reset cache (with stats)' mod='pagecache'}".</p>
{/if}
</div>
{/if}
</div>
{if !$pagecache_debug}
<div class="col-md-12 col-lg-6">
<div class="panel">
<h3 class="panel-heading">{if $avec_bootstrap}<i class="icon-dashboard"></i>{else}<img width="16" height="16" src="../img/admin/stats.gif" alt=""/>{/if} {l s='TTFB' mod='pagecache'}</h3>
<p>{l s='The TTFB is the real one computed by the browser of your visitors' mod='pagecache'}</p>
{if $pagecache_statsttfb}
<select id="perf_controller" name="perf_controller">
<option value="all">{l s='All pages' mod='pagecache'}</option>
{foreach $managed_controllers as $controller_name => $controller}
<option value="{$controller_name|escape:'javascript':'UTF-8'}">{$controller['title']|escape:'html':'UTF-8'}</option>
{/foreach}
</select>
<div id="ttfb_chart" class='chart with-transitions' style="height: 400px">
<svg></svg>
</div>
<p id="perf_infos"></p>
<p>{l s='You may see holes in lines or dates without data, this happens when no visits was recorded on that date for that type of page and that type of cache' mod='pagecache'}.</p>
{else}
<div class="alert alert-info">{l s='Statistics about TTFB have been disabled in "Advanced mode" > "Options"' mod='pagecache'}</div>
{/if}
</div>
</div>
{/if}
</div>
<script type="application/javascript">
var chart_ttfb = null;
$(document).ready(function () {
let used_cache_datas = [
{
"label": "{l s='Cache not available' mod='pagecache'}",
"value": {$performances.percent_missed|escape:'javascript':'UTF-8'}
},
{
"label": "{l s='Server cache' mod='pagecache'}",
"value": {$performances.percent_hit_server|escape:'javascript':'UTF-8'}
},
{
"label": "{l s='Static cache' mod='pagecache'}",
"value": {$performances.percent_hit_static|escape:'javascript':'UTF-8'}
},
{
"label": "{l s='Browser cache' mod='pagecache'}",
"value": {$performances.percent_hit_browser|escape:'javascript':'UTF-8'}
},
{
"label": "{l s='Back/forward cache' mod='pagecache'}",
"value": {$performances.percent_hit_bfcache|escape:'javascript':'UTF-8'}
},
];
//Donut chart example
if (typeof nv !== 'undefined') {
nv.addGraph(function () {
let chart_visits = nv.models.pieChart()
.x(function (d) {
return d.label
})
.y(function (d) {
return d.value
})
.color(['#ce720b', '#007e00', '#00bd00', '#00da00', '#00ff00'])
.donut(true) //Turn on Donut mode. Makes pie chart look tasty!
.donutRatio(0.25) //Configure how big you want the donut hole size to be.
.tooltipContent(function (key, y, e, graph) {
return '<b>' + y + ' %' + '</b>';
});
d3.select("#used_cache_chart svg")
.datum(used_cache_datas)
.transition().duration(500)
.call(chart_visits);
//Update the chart when window resizes.
nv.utils.windowResize(function () {
chart_visits.update()
});
return chart_visits;
});
let initGraph = function () {
d3.json('{$pagecache_datas_url|escape:'javascript':'UTF-8'}&type=ttfb&controller_name=' + $('#perf_controller').val() + '&_=' + Date.now(), function (datasInfos) {
nv.addGraph(function () {
let data = datasInfos['datas'];
if (datasInfos['total_count'] > 0) {
let msg = "{l s='These metrics are based on _TTFB_VISIT_ visits since _TTFB_START_' mod='pagecache'}.";
$('#perf_infos').html(msg.replace('_TTFB_START_', datasInfos['start_date']).replace('_TTFB_VISIT_', datasInfos['total_count']));
} else {
$('#perf_infos').html('');
}
chart_ttfb = nv.models.lineChart()
.margin({
left: 80,
bottom: 80,
right: 5
}) //Adjust chart margins to give the x-axis some breathing room.
.useInteractiveGuideline(true) //We want nice looking tooltips and a guideline!
.transitionDuration(350) //how fast do you want the lines to transition?
.showLegend(true) //Show the legend, allowing users to turn on/off line series.
.showYAxis(true) //Show the y-axis
.showXAxis(true) //Show the x-axis
.noData("{l s='No metric available yet, reload the page once your shop get some visitors' mod='pagecache'}");
;
let maxTtfb = 0;
$.each(data, function (i, rowType) {
$.each(rowType['values'], function (j, value) {
maxTtfb = Math.max(maxTtfb, value['y']);
});
});
// X axis
let midnight = new Date();
midnight.setHours(0);
midnight.setMinutes(0);
midnight.setSeconds(0);
midnight.setMilliseconds(0);
let startDate = new Date(midnight.getTime());
startDate.setDate(midnight.getDate() - 14);
let endDate = new Date(midnight.getTime());
endDate.setDate(midnight.getDate() + 1);
chart_ttfb.forceX([startDate.getTime() / 1000, endDate.getTime() / 1000]);
let tickValues = [];
for (let i = 0; i < 15; i++) {
tickValues[i] = (startDate.getTime() / 1000 + 86400 * i);
}
chart_ttfb.xAxis.axisLabel('Day').rotateLabels(-45).showMaxMin(false).tickValues(tickValues).tickFormat(function (d) {
let date = new Date(d * 1000);
return d3.time.format('%m-%d')(date);
});
// Y axis
chart_ttfb.forceY([0, Math.ceil(maxTtfb / 100) * 100]);
chart_ttfb.yAxis.axisLabel('TTFB (ms)');
d3.select('#ttfb_chart svg') //Select the <svg> element you want to render the chart in.
.datum(data) //Populate the <svg> element with chart data...
.call(chart_ttfb); //Finally, render the chart!
// Update the chart when window resizes.
nv.utils.windowResize(function () {
chart_ttfb.update()
});
return chart_ttfb;
});
});
}
let redrawGraph = function () {
console.log('Refresh chart for controller: ' + $('#perf_controller').val());
d3.json('{$pagecache_datas_url|escape:'javascript':'UTF-8'}&type=ttfb&controller_name=' + $('#perf_controller').val() + '&_=' + Date.now(), function (datasInfos) {
let data = datasInfos['datas'];
if (datasInfos['total_count'] > 0) {
let msg = "{l s='These metrics are based on _TTFB_VISIT_ visits since _TTFB_START_' mod='pagecache'}";
$('#perf_infos').html(msg.replace('_TTFB_START_', datasInfos['start_date']).replace('_TTFB_VISIT_', datasInfos['total_count']));
} else {
$('#perf_infos').html('');
}
let maxTtfb = 0;
$.each(data, function (i, rowType) {
$.each(rowType['values'], function (j, value) {
maxTtfb = Math.max(maxTtfb, value['y']);
});
});
chart_ttfb.forceY([0, Math.ceil(maxTtfb / 100) * 100]);
d3.select('#ttfb_chart svg > *').remove();
d3.select('#ttfb_chart svg').datum(data).transition().duration(500).call(chart_ttfb);
});
};
$('#perf_controller').change(function () {
redrawGraph();
});
initGraph();
}
});
</script>

View File

@@ -0,0 +1,13 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<div class="panel">
<h3>{if $avec_bootstrap}<i class="icon-fire"></i>{else}<img width="16" height="16" src="../img/admin/quick.gif" alt=""/>{/if}&nbsp;{l s='JPresta Cache Warmer' mod='pagecache'}</h3>
<p>{l s="JPresta Cache Warmer is a service that creates bots to browse your site in order to generate the cache, so when human visitors display your shop they get the cached pages, which are faster." mod='pagecache'}</p>
<p>{l s="To use the JPresta Cache Warmer service, you must sign in or create your account on jpresta.com, copy your JPresta Account Key and attach it to this Prestashop instance." mod='pagecache'}</p>
<a href="#tablicense" class="btn btn-primary" onclick="displayTab('license');"><i class="icon-sign-in"></i>&nbsp;{l s='Attach my JPresta Account Key' mod='pagecache'}</a>
</div>

View File

@@ -0,0 +1,13 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
{if !$maybe_a_clone}
<iframe loading="lazy" src="{$jpresta_api_url_cw|escape:'html':'UTF-8'}?page=report&nogutter{if $is_multistores}&multistores{/if}&ps_token={$jpresta_ps_token|escape:'url':'UTF-8'}&jpresta_account_key={$jpresta_account_key|escape:'url':'UTF-8'}&shop_url={$pagecache_cron_base|escape:'url':'UTF-8'}&shop_url_cw={$pagecache_cw_url|escape:'url':'UTF-8'}&shop_name={$shop_name|escape:'url':'UTF-8'}&ps_version={$prestashop_version|escape:'url':'UTF-8'}&module_name={$module_name|escape:'url':'UTF-8'}&module_version={$module_version|escape:'url':'UTF-8'}"
style="width: 100%; height: 1500px; border: none"></iframe>
{else}
{include file='./get-content-tab-license.tpl'}
{/if}

View File

@@ -0,0 +1,310 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<style>
.show-on-auto {
display: none;
}
.hide-on-auto {
display: block;
}
.cw_create_auto .show-on-auto {
display: block;
}
.cw_create_auto .hide-on-auto {
display: none;
}
</style>
<script type="application/javascript">
function jprestaUpdateCount() {
let pages_count = 0;
$('[name="warmup_controllers[]"]:checked').each(function () {
pages_count += $(this).data('page-count');
});
let contexts_count = $('#contexts tbody tr').length - 1;
$('#pages_count').html(pages_count);
$('#contexts_count').html(contexts_count);
$('#total_pages_count').html(pages_count * contexts_count);
$('#total_pages_count').removeClass('cachewarmer_count_warn').removeClass('cachewarmer_count_danger');
if (pages_count * contexts_count > 100000) {
if (pages_count * contexts_count > 200000) {
$('#total_pages_count').addClass('cachewarmer_count_danger');
}
else {
$('#total_pages_count').addClass('cachewarmer_count_warn');
}
}
}
function jprestaDeleteContexts(elt) {
$(elt).parents('tr').remove();
jprestaUpdateCount();
}
function jprestaAddContexts() {
let newIndex = 0;
$('#contexts tbody tr').each(function() {
if ($(this).data('context-index')) {
newIndex = Math.max(newIndex, $(this).data('context-index'));
}
});
newIndex++;
let html = $('#contexts tbody tr:first-child').clone().html();
$('<tr data-context-index="' + newIndex + '">' + html.replaceAll(' disabled="disabled"', '').replaceAll('XXX', newIndex) + '</tr>').appendTo('#contexts tbody');
jprestaUpdateCount();
}
$(function() {
jprestaUpdateCount();
$('[name=pagecache_cw_create_auto]').on('change', function() {
if ($('#pagecache_cw_create_auto_on').is(':checked')) {
$('#panelCw').addClass('cw_create_auto');
}
else {
$('#panelCw').removeClass('cw_create_auto');
}
});
});
</script>
<div id="panelCw" class="panel{if $pagecache_cw_contexts->contexts_auto|default:false} cw_create_auto{/if}" style="margin-bottom: 10px">
<h3><a href="{$pagecache_cw_url|escape:'html':'UTF-8'}" target="_blank">{if $avec_bootstrap}<i class="icon-gear"></i>{else}<img width="16" height="16" src="../img/admin/AdminPreferences.gif" alt=""/>{/if}</a>
&nbsp;{l s='Cache Warmer settings' mod='pagecache'}
</h3>
{if count($pagecache_cw_contexts->specifics) > 0}
<form id="pagecache_form_cachewarmer" action="{$request_uri|escape:'html':'UTF-8'}#tabcachewarmer-settings" method="post">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="cachewarmer-settings"/>
<input type="hidden" name="cachewarmer_id_shop" value="{$pagecache_cw_contexts->id_shop|intval}"/>
<fieldset>
<div class="bootstrap">
<div class="row">
<div class="col-md-12">
<div class="bootstrap">
<div class="alert alert-info" style="display: block;">&nbsp;<b>{l s='These settings will be used by the cache warmer service if you subscribed to it. See below for more informations.' mod='pagecache'}</b>
</div>
</div>
<p>{l s='The cache warmer browses your site in different contexts so all visitors will get a page on which the cache is available.' mod='pagecache'}</p>
<p>{l s='The more you have contexts, the more the warm-up will be long and the cache will consumme resources (database and hard disk).' mod='pagecache'}</p>
<p>{l s='The purpose of these settings is to select which contexts you want to warm-up.' mod='pagecache'}</p>
</div>
</div>
<div class="row" style="margin-top: 1rem">
<div class="col-md-12">
<h4>{l s='Pages to warmup' mod='pagecache'}</h4>
{foreach $managed_controllers as $controller_name => $controller}
{if $controller['warmer']}
<span style="margin-right: 1rem;white-space: nowrap;">
<input type="checkbox"
onchange="jprestaUpdateCount()"
style="vertical-align: middle; margin: 0 2px;"
id="warmup_page_{$controller_name|escape:'html':'UTF-8'}"
name="warmup_controllers[]"
{if isset($pagecache_cw_contexts->controllers[$controller_name]) && $pagecache_cw_contexts->controllers[$controller_name]['checked']}checked="checked" {/if}
{if isset($pagecache_cw_contexts->controllers[$controller_name]) && $pagecache_cw_contexts->controllers[$controller_name]['disabled']}disabled="disabled" {/if}
value="{$controller_name|escape:'html':'UTF-8'}"
data-page-count="{if isset($pagecache_cw_contexts->controllers[$controller_name])}{$pagecache_cw_contexts->controllers[$controller_name]['count']|intval}{else}0{/if}"
>
<label for="warmup_page_{$controller_name|escape:'html':'UTF-8'}" {if isset($pagecache_cw_contexts->controllers[$controller_name]) && $pagecache_cw_contexts->controllers[$controller_name]['count'] != null}title="About {$pagecache_cw_contexts->controllers[$controller_name]['count']|intval} page(s)"{/if}>{$controller['title']|escape:'html':'UTF-8'}</label>
</span>
{/if}
{/foreach}
<div style="margin-top: 1rem;font-weight: bold; font-size: 0.9rem; text-transform: uppercase;">{l s='Options' mod='pagecache'}:</div>
<div class="row" style="margin-top: 0.4rem;">
<div class="col-md-3">
<label
for="pagecache_cw_filter_products_cats_ids">{l s='Only warmup products of these categories' mod='pagecache'}</label>
</div>
<div class="col-md-9">
<input type="text"
name="pagecache_cw_filter_products_cats_ids"
id="pagecache_cw_filter_products_cats_ids"
value="{$pagecache_cw_contexts->filter_products_cats_ids|default:''|escape:'html':'UTF-8'}"
>
<div>{l s='Comma separated list of categories\' IDs. Leave empty to warmup all products.' mod='pagecache'}</div>
</div>
</div>
</div>
</div>
<div class="row" style="margin-top: 1rem">
<div class="col-md-12">
<h4>{l s='Contexts to warmup' mod='pagecache'}</h4>
<div class="alert alert-info">
<p>
{l s='We recommend you to let the module generates contexts to warmup. They are generated depending on the statistics of your shop to generate the cache of the most viewed pages in priority. Creating contexts manually can be less efficient but you can do it if you need.' mod='pagecache'}
</p>
</div>
<div class="row" style="margin-bottom: 1rem">
<div class="col-md-12">
<div class="form-group">
<label class="control-label col-lg-3" for="">{l s='How to create contexts to warmup?' mod='pagecache'}</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-xxl">
<input type="radio" name="pagecache_cw_create_auto" id="pagecache_cw_create_auto_on" value="1" {if $pagecache_cw_contexts->contexts_auto|default:0}checked{/if}>
<label for="pagecache_cw_create_auto_on" class="radioCheck">{l s='Automatically' mod='pagecache'}</label>
<input type="radio" name="pagecache_cw_create_auto" id="pagecache_cw_create_auto_off" value="0" {if !$pagecache_cw_contexts->contexts_auto|default:0}checked{/if}>
<label for="pagecache_cw_create_auto_off" class="radioCheck">{l s='Manually' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
<p class="help-block">
{l s='We highly recommend to create contexts automatically' mod='pagecache'}
</p>
</div>
</div>
</div>
</div>
<div class="hide-on-auto">
<div class="alert alert-info">
<p>
{l s='Please, create all contexts that you want to warmup' mod='pagecache'}
</p>
<hr>
<p><strong>{if $avec_bootstrap}<i class="icon-flag"></i>{else}<img width="16" height="16" src="../img/admin/world.gif" alt=""/>{/if}&nbsp;{l s='Languages' mod='pagecache'}</strong>&nbsp;:&nbsp;
{l s='Available languages are the ones enabled for this shop' mod='pagecache'}
</p>
<p><strong>{if $avec_bootstrap}<i class="icon-money"></i>{else}<img width="16" height="16" src="../img/admin/money.gif" alt=""/>{/if}&nbsp;{l s='Currencies' mod='pagecache'}</strong>&nbsp;:&nbsp;
{l s='Available currencies are the ones enabled for this shop' mod='pagecache'}
</p>
<p><strong>{if $avec_bootstrap}<i class="icon-desktop"></i>{else}<img width="16" height="16" src="../img/admin/metatags.gif" alt=""/>{/if}&nbsp;{l s='Devices' mod='pagecache'}</strong>&nbsp;:&nbsp;
{l s="You can only select 'mobile' if you enabled the option 'Create separate cache for desktop and mobile' in advanced mode, in menu Cache Key > Devices" mod='pagecache'}
</p>
<p><strong>{if $avec_bootstrap}<i class="icon-map-marker"></i>{else}<img width="16" height="16" src="../img/admin/world.gif" alt=""/>{/if}&nbsp;{l s='Countries' mod='pagecache'}</strong>&nbsp;:&nbsp;
{l s='Available countries are the ones you selected in advanced mode, in menu Cache Key > Countries' mod='pagecache'}
</p>
<p><strong>{if $avec_bootstrap}<i class="icon-users"></i>{else}<img width="16" height="16" src="../img/admin/group.gif" alt=""/>{/if}&nbsp;{l s='User groups combinations' mod='pagecache'}</strong>&nbsp;:&nbsp;
{l s="Available user groups are the ones currently used by the cache. To add a user group or a user group combination you just need to connect to the shop with a corresponding customer account when the cache is enabled. If you still don't find it, that means this user group or user group combination does not need a specific cache. More informations in advanced mode, in menu Cache Key > User groups" mod='pagecache'}
</p>
<p><strong>{if $avec_bootstrap}<i class="icon-cogs"></i>{else}<img width="16" height="16" src="../img/admin/cogs.gif" alt=""/>{/if}&nbsp;{l s='Specifics' mod='pagecache'}</strong>&nbsp;:&nbsp;
{l s='Specifics are mostly used for RGPD law; it creates different cache for visitor accepting cookies or not. The list is based on current cache statistics.' mod='pagecache'}
</p>
</div>
<table id="contexts" class="table table-striped table-hover">
<thead>
<tr>
<th><a onclick="jprestaAddContexts(); return false;" class="btn btn-xs btn-primary" href="#"><i class="icon-plus"></i></a></th>
<th>{if $avec_bootstrap}<i class="icon-flag"></i>{else}<img width="16" height="16" src="../img/admin/world.gif" alt=""/>{/if}&nbsp;{l s='Languages' mod='pagecache'}</th>
<th>{if $avec_bootstrap}<i class="icon-money"></i>{else}<img width="16" height="16" src="../img/admin/money.gif" alt=""/>{/if}&nbsp;{l s='Currencies' mod='pagecache'}</th>
<th>{if $avec_bootstrap}<i class="icon-desktop"></i>{else}<img width="16" height="16" src="../img/admin/metatags.gif" alt=""/>{/if}&nbsp;{l s='Devices' mod='pagecache'}</th>
<th>{if $avec_bootstrap}<i class="icon-flag"></i>{else}<img width="16" height="16" src="../img/admin/world.gif" alt=""/>{/if}&nbsp;{l s='Countries' mod='pagecache'}</th>
<th>{if $avec_bootstrap}<i class="icon-users"></i>{else}<img width="16" height="16" src="../img/admin/group.gif" alt=""/>{/if}&nbsp;{l s='User groups' mod='pagecache'}</th>
<th>{if $avec_bootstrap}<i class="icon-cogs"></i>{else}<img width="16" height="16" src="../img/admin/cogs.gif" alt=""/>{/if}&nbsp;{l s='Specifics' mod='pagecache'}</th>
</tr>
</thead>
<tbody>
<tr style="display:none">
<td><a onclick="jprestaDeleteContexts(this); return false;" class="btn btn-xs btn-primary deletecontext" href="#"><i class="icon-trash"></i></a></td>
<td>
<select name="contexts[XXX][language]" disabled="disabled">
{foreach $pagecache_cw_contexts->languages as $context}
<option value="{$context['value']|escape:'html':'UTF-8'}">{$context['label']|escape:'html':'UTF-8'}{if isset($context['count'])} ({$context['count']|intval}){/if}</option>
{/foreach}
</select>
</td>
<td>
<select name="contexts[XXX][currency]" disabled="disabled">
{foreach $pagecache_cw_contexts->currencies as $context}
<option value="{$context['value']|escape:'html':'UTF-8'}">{$context['label']|escape:'html':'UTF-8'}{if isset($context['count'])} ({$context['count']|intval}){/if}</option>
{/foreach}
</select>
</td>
<td>
<select name="contexts[XXX][device]" disabled="disabled">
{foreach $pagecache_cw_contexts->devices as $context}
<option value="{$context['value']|escape:'html':'UTF-8'}">{$context['label']|escape:'html':'UTF-8'}{if isset($context['count'])} ({$context['count']|intval}){/if}</option>
{/foreach}
</select>
</td>
<td>
<select name="contexts[XXX][country]" disabled="disabled">
{foreach $pagecache_cw_contexts->countries as $context}
<option value="{$context['value']|escape:'html':'UTF-8'}">{$context['label']|escape:'html':'UTF-8'}{if isset($context['count'])} ({$context['count']|intval}){/if}</option>
{/foreach}
</select>
</td>
<td>
<select name="contexts[XXX][group]" disabled="disabled">
{foreach $pagecache_cw_contexts->groups as $context}
<option value="{$context['value']|escape:'html':'UTF-8'}">{$context['label']|escape:'html':'UTF-8'}{if isset($context['count'])} ({$context['count']|intval}){/if}</option>
{/foreach}
</select>
</td>
<td>
<select name="contexts[XXX][specifics]" disabled="disabled">
{foreach $pagecache_cw_contexts->specifics as $context}
<option value="{$context['value']|escape:'html':'UTF-8'}">{$context['label']|escape:'html':'UTF-8'}{if isset($context['count'])} ({$context['count']|intval}){/if}</option>
{/foreach}
</select>
</td>
</tr>
{foreach $pagecache_cw_contexts->contexts as $index => $context}
<tr data-context-index="{$index|intval}">
<input type="hidden" name="contexts[{$index|intval}][language]" value="{$context['language']|default:''|escape:'html':'UTF-8'}">
<input type="hidden" name="contexts[{$index|intval}][currency]" value="{$context['currency']|default:''|escape:'html':'UTF-8'}">
<input type="hidden" name="contexts[{$index|intval}][device]" value="{$context['device']|default:''|escape:'html':'UTF-8'}">
<input type="hidden" name="contexts[{$index|intval}][country]" value="{$context['country']|default:''|escape:'html':'UTF-8'}">
<input type="hidden" name="contexts[{$index|intval}][group]" value="{$context['group']|default:''|escape:'html':'UTF-8'}">
<input type="hidden" name="contexts[{$index|intval}][specifics]" value="{$context['specifics']|default:''|escape:'html':'UTF-8'}">
<td><a onclick="jprestaDeleteContexts(this); return false;" class="btn btn-xs btn-primary" href="#"><i class="icon-trash"></i></a></td>
<td>{$pagecache_cw_contexts->languages[$context['language']]['label']|default:''|escape:'html':'UTF-8'}</td>
<td>{$pagecache_cw_contexts->currencies[$context['currency']]['label']|default:''|escape:'html':'UTF-8'}</td>
<td>{$pagecache_cw_contexts->devices[$context['device']]['label']|default:''|escape:'html':'UTF-8'}</td>
<td>{$pagecache_cw_contexts->countries[$context['country']]['label']|default:''|escape:'html':'UTF-8'}</td>
<td>{$pagecache_cw_contexts->groups[$context['group']]['label']|default:''|escape:'html':'UTF-8'}</td>
<td>{$pagecache_cw_contexts->specifics[$context['specifics']]['label']|default:''|escape:'html':'UTF-8'}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<div class="row" style="margin-top: 1rem">
<div class="col-md-12">
<h4>{l s='Total pages to warmup' mod='pagecache'}</h4>
<div class="show-on-auto">
<div class="bootstrap">
<div class="alert alert-info" style="display: block;">&nbsp;{l s='When contexts are automatically created the number of pages to warm up will be adapted to your subscription plan' mod='pagecache'}
</div>
</div>
</div>
<div class="hide-on-auto">
<div class="bootstrap">
<div class="alert alert-info" style="display: block;">&nbsp;{l s='Try to have less than 100000 pages to warmup or it will be too long to be processed by the cache-warmer in a single day' mod='pagecache'}
</div>
</div>
<table class="table" style="width: initial">
<tbody>
<tr>
<td>{l s='Estimated number of pages per context' mod='pagecache'}</td>
<td id="pages_count" class="cachewarmer_count"></td>
</tr>
<tr>
<td>{l s='Number of context' mod='pagecache'}</td>
<td id="contexts_count" class="cachewarmer_count"></td>
</tr>
<tr>
<td>{l s='Total pages to warmup' mod='pagecache'}</td>
<td id="total_pages_count" class="cachewarmer_count"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<button type="submit" value="1" id="submitModuleCacheWarmerSettings" name="submitModuleCacheWarmerSettings"
class="btn btn-default pull-right">
<i class="process-icon-save"></i> {l s='Save' mod='pagecache'}
</button>
</div>
</fieldset>
</form>
{else}
<div class="alert alert-warning">
{l s='Before setting the pages that you want to warmup, you, or your visitors, need to browse your shop a little bit. Why? So the module know the different contexts that can be used on your shop. So, you just have to browse different pages of your store and reload this page.' mod='pagecache'}
</div>
{/if}
</div>

View File

@@ -0,0 +1,13 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
{if !$maybe_a_clone}
<iframe loading="lazy" src="{$jpresta_api_url_cw|escape:'html':'UTF-8'}?page=status&nogutter{if $is_multistores}&multistores{/if}&ps_token={$jpresta_ps_token|escape:'url':'UTF-8'}&jpresta_account_key={$jpresta_account_key|escape:'url':'UTF-8'}&shop_url={$pagecache_cron_base|escape:'url':'UTF-8'}&shop_url_cw={$pagecache_cw_url|escape:'url':'UTF-8'}&shop_name={$shop_name|escape:'url':'UTF-8'}&ps_version={$prestashop_version|escape:'url':'UTF-8'}&module_name={$module_name|escape:'url':'UTF-8'}&module_version={$module_version|escape:'url':'UTF-8'}"
style="width: 100%; height: 1500px; border: none"></iframe>
{else}
{include file='./get-content-tab-license.tpl'}
{/if}

View File

@@ -0,0 +1,17 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
{if !isset($jpresta_account_key) || !$jpresta_account_key}
{include file='./get-content-tab-jpresta-account-key.tpl'}
{/if}
{if !$maybe_a_clone}
<iframe id="jprestaCacheWamer"
src="{$jpresta_api_url_cw|escape:'html':'UTF-8'}?nogutter{if $is_multistores}&multistores{/if}&ps_token={$jpresta_ps_token|escape:'url':'UTF-8'}&jpresta_account_key={$jpresta_account_key|escape:'url':'UTF-8'}&shop_url={$pagecache_cron_base|escape:'url':'UTF-8'}&shop_url_cw={$pagecache_cw_url|escape:'url':'UTF-8'}&shop_name={$shop_name|escape:'url':'UTF-8'}&ps_version={$prestashop_version|escape:'url':'UTF-8'}&module_name={$module_name|escape:'url':'UTF-8'}&module_version={$module_version|escape:'url':'UTF-8'}"
style="width: 100%; height: 1500px; border: none"></iframe>
{else}
{include file='./get-content-tab-license.tpl'}
{/if}

View File

@@ -0,0 +1,113 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
{if !$jpresta_account_key}
<script type="application/javascript">
function refreshSubmitModuleJakStatus() {
if ($('#jprestaAccountKey').val().length >= 20 && $('input[name=prestashopType]:checked').length > 0) {
$('#submitModuleJak').removeAttr('disabled');
$('#cannotValidate').hide();
}
else {
$('#submitModuleJak').attr('disabled', '1');
$('#cannotValidate').show();
}
}
$(document).ready(function() {
refreshSubmitModuleJakStatus();
$('input').on('keyup keypress blur change', refreshSubmitModuleJakStatus);
});
</script>
<style type="text/css">
button:disabled {
cursor: not-allowed;
pointer-events: all !important;
}
</style>
{/if}
<div class="row">
<div class="col-md-12">
<div class="panel">
<h3 class="panel-heading"><img height="20" src="../modules/{$module_name|escape:'html':'UTF-8'}/views/img/logo-jpresta.png" alt=""/>&nbsp;{l s='JPresta account' mod='pagecache'}</h3>
{if $pagecache_clone_detected}
<div class="alert alert-danger">
<strong>{l s='This Prestashop instance seems to be a clone of an other Prestahop.' mod='pagecache'}</strong>
<p>
{l s='Clones are allowed but can messes up your JPresta-Cache-Warmer subscription so please, just tell us if it is a clone or not.' mod='pagecache'}
</p>
<p>
{l s='This message can be displayed if you modified your database connexion or the URL of your shop. If so then just click on "No, it is the same Prestashop".' mod='pagecache'}
</p>
<form id="confirmClone" method="post" action="{$request_uri|escape:'html':'UTF-8'}" class="form-inline">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="license"/>
<div style="text-align: left; margin: 10px 0 0 0;">
<button type="submit" id="submitModuleConfirmClone" name="submitModuleConfirmClone" class="btn btn-secondary">{l s='Yes, it is a clone' mod='pagecache'}</button>
<button type="submit" id="submitModuleNotAClone" name="submitModuleNotAClone" class="btn btn-secondary">{l s='No, it is the same Prestashop' mod='pagecache'}</button>
</div>
</form>
</div>
{/if}
{if !$jpresta_account_key}
<p>{l s="To use the JPresta Cache Warmer service, you must create an account on jpresta.com and attach your JPresta Account Key to this Prestashop instance." mod='pagecache'}</p>
<form method="post" action="{$request_uri|escape:'html':'UTF-8'}" class="form-inline">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="license"/>
<div style="margin: 10px 0">
{l s='This Prestashop instance is: ' mod='pagecache'}
<label class="radio-inline" style="margin-left: 10px">
<input type="radio" name="prestashopType" id="prestashopType1" value="prod"> {l s='a live site with real customers' mod='pagecache'}
</label>
<label class="radio-inline" style="margin-left: 10px">
<input type="radio" name="prestashopType" id="prestashopType2" value="test"> {l s='for test only' mod='pagecache'}
</label>
</div>
<div class="form-group">
<input type="text" style="width:20rem" class="form-control" id="jprestaAccountKey" name="jprestaAccountKey" placeholder="{l s='Example: JPRESTA-AB12YZ89XX00' mod='pagecache'}">
</div>
<button type="submit" id="submitModuleJak" name="submitModuleJak" class="btn btn-primary"><i class="icon-sign-in"></i>&nbsp;{l s='Attach my JPresta Account Key' mod='pagecache'}</button>
<div class="alert alert-warning" style="margin-top: 10px" id="cannotValidate">
{l s='In order to validate, select the type of Prestashop instance and fill in the JPresta Account Key' mod='pagecache'}
</div>
</form>
{else}
<p>
<input type="text" style="width:20rem;display: inline-block" class="form-control" name="jprestaAccountKey" readonly disabled value="{$jpresta_account_key|escape:'url':'UTF-8'}">
<i class="icon-check" style="font-size: 1.5rem; margin: 0 6px; color: green;"></i>
<a href="#" onclick="$('#confirmDetach').toggle()">{l s='detach' mod='pagecache'}</a>
</p>
<p>{l s="Congratulation, the module is attached to your JPresta Account." mod='pagecache'}</p>
<form id="confirmDetach" style="display: none" method="post" action="{$request_uri|escape:'html':'UTF-8'}" class="form-inline">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="license"/>
{l s="If you detach your JPresta Account your Cache Warmer subscription (if any) will be suspended" mod='pagecache'}
<div style="text-align: center; margin: 10px 0 0 0;">
<button type="submit" id="submitModuleJakDetach" name="submitModuleJakDetach" class="btn btn-danger"><i class="icon-sign-out"></i>&nbsp;{l s='I confirm, detach my JPresta Account' mod='pagecache'}</button>
</div>
</form>
{/if}
{if $advanced_mode}
<div style="border-top: 1px dotted #dbe6e9; margin-top: 1rem; padding-top: 0.5rem;">
<strong>{l s='Advanced mode' mod='pagecache'}:</strong>
{l s='In case of troubles with license key, if you cloned your shop for exemple, you can recompute the ID of this Prestashop instance by clicking on the following button:' mod='pagecache'}
<form method="post" action="{$request_uri|escape:'html':'UTF-8'}" class="form-inline">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="license"/>
<button type="submit" id="submitModuleJakReset" name="submitModuleJakReset" class="btn btn-sm btn-danger">{l s='Recompute the ID of this Prestashop instance' mod='pagecache'}</button>
</form>
</div>
{/if}
</div>
</div>
</div>
{if $jpresta_ps_token && $jpresta_account_key && !$maybe_a_clone}
<iframe loading="lazy" src="{$jpresta_api_url_licenses|escape:'html':'UTF-8'}?nogutter&ps_token={$jpresta_ps_token|escape:'url':'UTF-8'}&jpresta_account_key={$jpresta_account_key|escape:'url':'UTF-8'}&shop_url={$pagecache_cron_base|escape:'url':'UTF-8'}&shop_url_cw={$pagecache_cw_url|escape:'url':'UTF-8'}&shop_name={$shop_name|escape:'url':'UTF-8'}&ps_version={$prestashop_version|escape:'url':'UTF-8'}&module_name={$module_name|escape:'url':'UTF-8'}&module_version={$module_version|escape:'url':'UTF-8'}"
style="width: 100%; height: 1500px; border: none"></iframe>
{/if}

View File

@@ -0,0 +1,392 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<div class="panel">
<h3>{if $avec_bootstrap}<i class="icon-gear"></i>{else}<img width="16" height="16" src="../img/admin/AdminPreferences.gif" alt=""/>{/if}&nbsp;{l s='Options' mod='pagecache'}</h3>
<form id="pagecache_form_options" action="{$request_uri|escape:'html':'UTF-8'}" method="post">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="options"/>
<fieldset>
<div style="clear: both;">
<div class="form-group">
<div id="pagecache_skiplogged">
<label class="control-label col-lg-3">
{l s='Cache for logged in users' mod='pagecache'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="pagecache_skiplogged" id="pagecache_skiplogged_on" value="0" {if !$pagecache_skiplogged}checked{/if}>
<label for="pagecache_skiplogged_on" class="radioCheck">{l s='Yes' mod='pagecache'}</label>
<input type="radio" name="pagecache_skiplogged" id="pagecache_skiplogged_off" value="1" {if $pagecache_skiplogged}checked{/if}>
<label for="pagecache_skiplogged_off" class="radioCheck">{l s='No' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Enable cache for visitors that are logged in (recommended)' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_cache_customizable">
<label class="control-label col-lg-3">
{l s='Cache customizable products' mod='pagecache'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="pagecache_cache_customizable" id="pagecache_cache_customizable_on" value="1" {if $pagecache_cache_customizable}checked{/if}>
<label for="pagecache_cache_customizable_on" class="radioCheck">{l s='Yes' mod='pagecache'}</label>
<input type="radio" name="pagecache_cache_customizable" id="pagecache_cache_customizable_off" value="0" {if !$pagecache_cache_customizable}checked{/if}>
<label for="pagecache_cache_customizable_off" class="radioCheck">{l s='No' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Here you can force the customizable products to be cached but make sure that customizations of visitors are not stored into the cache.' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_normalize_urls">
<label class="control-label col-lg-3">
{l s='Normalize URLs' mod='pagecache'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="pagecache_normalize_urls" id="pagecache_normalize_urls_on" value="1" {if $pagecache_normalize_urls}checked{/if}>
<label for="pagecache_normalize_urls_on" class="radioCheck">{l s='Yes' mod='pagecache'}</label>
<input type="radio" name="pagecache_normalize_urls" id="pagecache_normalize_urls_off" value="0" {if !$pagecache_normalize_urls}checked{/if}>
<label for="pagecache_normalize_urls_off" class="radioCheck">{l s='No' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Avoid same page linked with different URLs to use different cache. Should only be disabled when you have a lot of links in a page (> 500).' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_logout_nocache">
<label class="control-label col-lg-3">
{l s='Force no cache at logout' mod='pagecache'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="pagecache_logout_nocache" id="pagecache_logout_nocache_on" value="1" {if $pagecache_logout_nocache}checked{/if}>
<label for="pagecache_logout_nocache_on" class="radioCheck">{l s='Yes' mod='pagecache'}</label>
<input type="radio" name="pagecache_logout_nocache" id="pagecache_logout_nocache_off" value="0" {if !$pagecache_logout_nocache}checked{/if}>
<label for="pagecache_logout_nocache_off" class="radioCheck">{l s='No' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Add a "nocache" parameter in the URL after logout to avoid the browser cache to be used.' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_logs_debug">
<label class="control-label col-lg-3">
{l s='Enable logs' mod='pagecache'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="pagecache_logs" id="pagecache_logs_debug_2" value="2" {if $pagecache_logs > 0}checked{/if}>
<label for="pagecache_logs_debug_2" class="radioCheck">{l s='Yes' mod='pagecache'}</label>
{*<input type="radio" name="pagecache_logs" id="pagecache_logs_debug_1" value="1" {if $pagecache_logs == 1}checked{/if}>
<label for="pagecache_logs_debug_1" class="radioCheck">{l s='Info' mod='pagecache'}</label>*}
<input type="radio" name="pagecache_logs" id="pagecache_logs_debug_0" value="0" {if $pagecache_logs == 0}checked{/if}>
<label for="pagecache_logs_debug_0" class="radioCheck">{l s='No' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Logs informations into the Prestashop logger. You should only enable it to debug or understand how the cache works.' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_logs_debug">
<label class="control-label col-lg-3">
{l s='Ignored URL parameters' mod='pagecache'}
</label>
<div class="col-lg-9">
<input type="text" name="pagecache_ignored_params" id="pagecache_ignored_params" value="{$pagecache_ignored_params|escape:'html':'UTF-8'}" size="100">
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='URL parameters are used to identify a unique page content. Some URL parameters do not affect page content like tracking parameters for analytics (utm_source, utm_campaign, etc.) so we can ignore them. You can set a comma separated list of these parameters here.' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_always_infosbox">
<label class="control-label col-lg-3">
{l s='Always display infos box' mod='pagecache'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="pagecache_always_infosbox" id="pagecache_always_infosbox_on" value="1" {if $pagecache_always_infosbox}checked{/if}>
<label for="pagecache_always_infosbox_on" class="radioCheck">{l s='Yes' mod='pagecache'}</label>
<input type="radio" name="pagecache_always_infosbox" id="pagecache_always_infosbox_off" value="0" {if !$pagecache_always_infosbox}checked{/if}>
<label for="pagecache_always_infosbox_off" class="radioCheck">{l s='No' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Only used for demo' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_exec_header_hook">
<label class="control-label col-lg-3">
{l s='Executes "header" hook in dynamic modules request' mod='pagecache'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="pagecache_exec_header_hook" id="pagecache_exec_header_hook_on" value="1" {if $pagecache_exec_header_hook}checked{/if}>
<label for="pagecache_exec_header_hook_on" class="radioCheck">{l s='Yes' mod='pagecache'}</label>
<input type="radio" name="pagecache_exec_header_hook" id="pagecache_exec_header_hook_off" value="0" {if !$pagecache_exec_header_hook}checked{/if}>
<label for="pagecache_exec_header_hook_off" class="radioCheck">{l s='No' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='If checked, the header hook will be executed so javascript variables added in this hook by other modules will be refreshed' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_use_dispatcher_hook">
<label class="control-label col-lg-3">
{l s='Check cache in "dispatcher" hook' mod='pagecache'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="pagecache_use_dispatcher_hook" id="pagecache_use_dispatcher_hook_on" value="1" {if $pagecache_use_dispatcher_hook}checked{/if}>
<label for="pagecache_use_dispatcher_hook_on" class="radioCheck">{l s='Yes' mod='pagecache'}</label>
<input type="radio" name="pagecache_use_dispatcher_hook" id="pagecache_use_dispatcher_hook_off" value="0" {if !$pagecache_use_dispatcher_hook}checked{/if}>
<label for="pagecache_use_dispatcher_hook_off" class="radioCheck">{l s='No' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='If checked, the cache will be checked in dispatcher hook (not dispatcherBefore) which is slower but compatible with some modules like securitypro' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_product_refreshEveryX">
<label class="control-label col-lg-3">
{l s='Refresh product page every X sales' mod='pagecache'}
</label>
<div class="col-lg-9">
{l s='Every' mod='pagecache'}
<select style="display: inline-block; width: fit-content;" name="pagecache_product_refreshEveryX" class="form-control">
<option value="1" {if $pagecache_product_refreshEveryX == 1} selected{/if}>1</option>
<option value="5" {if $pagecache_product_refreshEveryX == 5} selected{/if}>5</option>
<option value="10" {if $pagecache_product_refreshEveryX == 10} selected{/if}>10</option>
<option value="50" {if $pagecache_product_refreshEveryX == 50} selected{/if}>50</option>
<option value="100" {if $pagecache_product_refreshEveryX == 100} selected{/if}>100</option>
</select>
{l s='sales' mod='pagecache'}
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='When stock is not displayed on product page then you can set how often the cache of the product page should be refreshed when the quantity is greater than the quantity that displays a "last items..."' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_instockisadd">
<label class="control-label col-lg-3">
{l s='Back in stock refreshes like new product' mod='pagecache'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="pagecache_instockisadd" id="pagecache_instockisadd_on" value="1" {if $pagecache_instockisadd}checked{/if}>
<label for="pagecache_instockisadd_on" class="radioCheck">{l s='Yes' mod='pagecache'}</label>
<input type="radio" name="pagecache_instockisadd" id="pagecache_instockisadd_off" value="0" {if !$pagecache_instockisadd}checked{/if}>
<label for="pagecache_instockisadd_off" class="radioCheck">{l s='No' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='When a product is back in stock the cache will be refreshed like if the product was a new one' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_max_exec_time">
<label class="control-label col-lg-3">
{l s='Max execution time in seconds' mod='pagecache'}
</label>
<div class="col-lg-9">
<input type="number" name="pagecache_max_exec_time" id="pagecache_max_exec_time" value="{$pagecache_max_exec_time|escape:'html':'UTF-8'}" max="480" min="1">
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Used by the cache warmer to split the list of URLs to browse if it takes much time to generate. Must be between 1s and 480s, we recommend 30s.' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_maxrows">
<label class="control-label col-lg-3">
{l s='Max pages in cache' mod='pagecache'}
</label>
<div class="col-lg-9">
<input type="number" name="pagecache_maxrows" id="pagecache_maxrows" value="{$pagecache_maxrows|escape:'html':'UTF-8'}" min="0">
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Let this value to 0 until you have a really good reason to limit the number of rows into the cache' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_ignore_before_pattern">
<label class="control-label col-lg-3">
{l s='Ignore backlinks before this string' mod='pagecache'}
</label>
<div class="col-lg-9">
<input type="text" name="pagecache_ignore_before_pattern" id="pagecache_ignore_before_pattern" value="{$pagecache_ignore_before_pattern|escape:'html':'UTF-8'}">
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Usefull to ignore links of a mega menu (for exemple) that are not necessary for automatic refreshment. This will decrease the size of the backlinks table (jm_pagecache_bl). Exemple: </header>.' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_ignore_after_pattern">
<label class="control-label col-lg-3">
{l s='Ignore backlinks after this string' mod='pagecache'}
</label>
<div class="col-lg-9">
<input type="text" name="pagecache_ignore_after_pattern" id="pagecache_ignore_after_pattern" value="{$pagecache_ignore_after_pattern|escape:'html':'UTF-8'}">
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Usefull to ignore links of a side mobile menu (for exemple) that are not necessary for automatic refreshment. This will decrease the size of the backlinks table (jm_pagecache_bl). Exemple: </footer>.' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_ignore_url_regex">
<label class="control-label col-lg-3">
{l s='Ignore URLs matching this regex' mod='pagecache'}
</label>
<div class="col-lg-9">
<input type="text" name="pagecache_ignore_url_regex" id="pagecache_ignore_url_regex" value="{$pagecache_ignore_url_regex|escape:'html':'UTF-8'}">
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='You can avoid some pages to be cached. Setup a regular expression that will match URLs that must not be cached. Read https://www.php.net/manual/en/reference.pcre.pattern.syntax.php for more informations. Use https://regex101.com/ to test your regular expression.' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_currencies_to_cache">
<label class="control-label col-lg-3">
{l s='Currencies to cache' mod='pagecache'}
</label>
<div class="col-lg-9">
{if count($pagecache_currencies_to_cache) === 0}
<i>{l s='No currency are enabled on the shop' mod='pagecache'}</i>
{/if}
{foreach $pagecache_currencies_to_cache as $cur_iso_code => $cur_state}
<span style="margin-right: 1rem;white-space: nowrap;">
<input type="checkbox"
style="vertical-align: middle; margin: 0 2px;"
id="pagecache_currencies_to_cache_{$cur_iso_code|escape:'html':'UTF-8'}"
name="pagecache_currencies_to_cache[]"
{if $cur_state}checked="checked" {/if}
value="{$cur_iso_code|escape:'html':'UTF-8'}">
<label for="pagecache_currencies_to_cache_{$cur_iso_code|escape:'html':'UTF-8'}">{$cur_iso_code|escape:'html':'UTF-8'}</label>
</span>
{/foreach}
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Here you can avoid some currencies to be cached, usefull when the rate changes everyday.' mod='pagecache'}
</div>
</div>
</div>
</div>
<div class="form-group">
<div id="pagecache_statsttfb">
<label class="control-label col-lg-3">
{l s='Enable statistics on TTFB' mod='pagecache'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="pagecache_statsttfb" id="pagecache_statsttfb_on" value="1" {if $pagecache_statsttfb}checked{/if}>
<label for="pagecache_statsttfb_on" class="radioCheck">{l s='Yes' mod='pagecache'}</label>
<input type="radio" name="pagecache_statsttfb" id="pagecache_statsttfb_off" value="0" {if !$pagecache_statsttfb}checked{/if}>
<label for="pagecache_statsttfb_off" class="radioCheck">{l s='No' mod='pagecache'}</label>
<a class="slide-button btn"></a>
</span>
</div>
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{l s='Store statistics on TTFB, recommended if you subscribed to the cache-warmer but you should disable it if you have a large amount of visitors every day' mod='pagecache'}
</div>
</div>
</div>
</div>
</div>
<div class="bootstrap">
<button type="submit" value="1" id="submitModuleOptions" name="submitModuleOptions" class="btn btn-default pull-right">
<i class="process-icon-save"></i> {l s='Save' mod='pagecache'}
</button>
</div>
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,68 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<div class="panel">
<h3>{if $avec_bootstrap}<i class="icon-sitemap"></i>{else}<img width="16" height="16" src="../img/admin/multishop_config.png" alt=""/>{/if}&nbsp;{l s='Multistore' mod='pagecache'}</h3>
<form id="pagecache_form_shopsinfos" action="{$request_uri|escape:'html':'UTF-8'}" method="post" onsubmit='return confirm("{l s='WARNING! This will replace the configuration of selected shops, are you sure?' mod='pagecache'}");'>
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="shopsinfos"/>
<fieldset>
{if $avec_bootstrap}
<div class="bootstrap"><div class="alert alert-info" style="display: block;">&nbsp;{l s='It is usually a pain to configure all shops so here you can copy the configuration of the current shop to other shops.' mod='pagecache'}</div></div>
{else}
<div class="hint clear" style="display: block;">&nbsp;{l s='It is usually a pain to configure all shops so here you can copy the configuration of the current shop to other shops.' mod='pagecache'}</div>
{/if}
<table id="shopsinfosTable" class="table table-bordered table-striped">
<colgroup>
<col width="0*">
<col width="0*">
<col width="*">
<col width="0*">
<col width="0*">
<col width="0*">
</colgroup>
<thead>
<tr>
<th></th>
<th style="text-align: center">{l s='ID' d='Admin.Global'}</th>
<th>{l s='Name' d='Admin.Global'}</th>
<th style="text-align: center">{l s='Theme' mod='pagecache'}</th>
<th style="text-align: center">{l s='Status' d='Admin.Global'}</th>
<th style="text-align: center">{l s='Settings' d='Admin.Global'}</th>
</tr>
</thead>
<tbody>
{foreach $pagecache_shopsinfos as $shopinfos}
<tr>
<td style="text-align: center">{if !$shopinfos['is_current']}<input type="checkbox" name="id_shops[]" value="{$shopinfos['id_shop']|intval}">{else}({l s='Current shop' mod='pagecache'}){/if}</td>
<td style="text-align: center">{$shopinfos['id_shop']|intval}</td>
<td>{$shopinfos['name']|escape:'html':'UTF-8'}</td>
<td style="text-align: center">{$shopinfos['theme_name']|escape:'html':'UTF-8'}</td>
<td style="text-align: center">
{if $shopinfos['module_enabled']}
<i class="material-icons" style="color: green">check</i>
{else}
<i class="material-icons" style="color: red">clear</i>
{/if}
</td>
<td style="text-align: center">
{if $shopinfos['module_install_step'] == 9}
<i class="material-icons" style="color: green">check</i>
{else}
{$shopinfos['module_install_step']|intval} / 9
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
<button type="submit" id="submitModuleShopsinfos" name="submitModuleShopsinfos" class="btn btn-primary pull-right">
<i class="process-icon-duplicate"></i> {l s='Copy configuration to selected shops' mod='pagecache'}
</button>
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,155 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<script type="text/javascript">
var slidersServer = [];
var slidersBrowser = [];
function onSliderChange(value, controller) {
switch (value) {
case 0:
text = "{l s='Disabled' mod='pagecache'}";
break;
case 1:
text = "{l s='1 day' mod='pagecache'}";
break;
case 10:
text = "{l s='To infinity...' mod='pagecache'}";
break;
case 8:
value = 14;
text = value + " {l s='days' mod='pagecache'}";
break;
case 9:
value = 30;
text = value + " {l s='days' mod='pagecache'}";
break;
default:
text = value + " {l s='days' mod='pagecache'}";
break;
}
$("#pc"+controller+"SliderVal").text(text);
if (value === 0) {
// ULTIMATE
if (slidersBrowser[controller]) { slidersBrowser[controller].setValue(0); onBrowserSliderChange(0, controller+"2"); slidersBrowser[controller].disable(); }
// ULTIMATE£
$("#pc"+controller).parent().find(".slider-handle").css("background-color", "gray").css("background-image", "none");
}
else {
// ULTIMATE
if (slidersBrowser[controller]) slidersBrowser[controller].enable();
// ULTIMATE£
$("#pc"+controller).parent().find(".slider-handle").css("background-image", "linear-gradient(to bottom,#149bdf 0,#0480be 100%);");
}
}
function onBrowserSliderChange(value, controller) {
switch (value) {
case 0:
text = "{l s='Disabled' mod='pagecache'}";
break;
default:
text = value + " {l s='minutes' mod='pagecache'}";
break;
}
$("#pc"+controller+"SliderVal").text(text);
if (value === 0) {
$("#pc"+controller).parent().find(".slider-handle").css("background-color", "gray").css("background-image", "none");
}
else {
$("#pc"+controller).parent().find(".slider-handle").css("background-image", "linear-gradient(to bottom,#149bdf 0,#0480be 100%);");
}
}
$( document ).ready(function() {
{*ULTIMATE*}
slidersBrowser["static"] = new Slider('#pcstatic2');
slidersBrowser["static"].setValue({$pagecache_static_expires|intval|default:'0'});
onBrowserSliderChange({$pagecache_static_expires|intval|default:'0'}, "static2");
$("#pcstatic2").on("change", function(slideEvt) { onBrowserSliderChange(slideEvt.value.newValue, "static2"); });
{*ULTIMATE£*}
{foreach $managed_controllers as $controller_name => $controller}
slidersServer["{$controller_name|escape:'javascript':'UTF-8'}"] = new Slider('#pc{$controller_name|escape:'javascript':'UTF-8'}');
slidersServer["{$controller_name|escape:'javascript':'UTF-8'}"].setValue({$controller['timeout']|default:'0'});
{*ULTIMATE*}
slidersBrowser["{$controller_name|escape:'javascript':'UTF-8'}"] = new Slider('#pc{$controller_name|escape:'javascript':'UTF-8'}2');
slidersBrowser["{$controller_name|escape:'javascript':'UTF-8'}"].setValue({$controller['expires']|default:'0'});
{*ULTIMATE£*}
onSliderChange({$controller['timeout']|escape:'html':'UTF-8'|default:'0'}, "{$controller_name|escape:'javascript':'UTF-8'}");
{*ULTIMATE*}
onBrowserSliderChange({$controller['expires']|escape:'html':'UTF-8'|default:'0'}, "{$controller_name|escape:'javascript':'UTF-8'}2");
{*ULTIMATE£*}
$("#pc{$controller_name|escape:'javascript':'UTF-8'}").on("change", function(slideEvt) { onSliderChange(slideEvt.value.newValue, "{$controller_name|escape:'javascript':'UTF-8'}"); });
{*ULTIMATE*}
$("#pc{$controller_name|escape:'javascript':'UTF-8'}2").on("change", function(slideEvt) { onBrowserSliderChange(slideEvt.value.newValue, "{$controller_name|escape:'javascript':'UTF-8'}2"); });
{*ULTIMATE£*}
{/foreach}
});
</script>
<div class="panel">
<h3>{if $avec_bootstrap}<i class="icon-time"></i>{else}<img width="16" height="16" src="../img/admin/time.gif" alt=""/>{/if}&nbsp;{l s='Pages & timeouts' mod='pagecache'}</h3>
<form id="pagecache_form_timeouts" action="{$request_uri|escape:'html':'UTF-8'}" method="post">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="timeouts"/>
<fieldset>
<div style="clear: both;">
{if $avec_bootstrap}
<div class="bootstrap"><div class="alert alert-info" style="display: block;">
<dl>
<dt>{l s='Server cache maximum duration' mod='pagecache'}</dt>
<dd>{l s='Server cache is automatically refreshed when you modify prices, descriptions, stocks, etc. (not when you do modifications in theme, modules, CSS, etc.) so here you set the maximum age of the cache if there is no modification.' mod='pagecache'}</dd>
<dt>{l s='Browser cache duration' mod='pagecache'}</dt>
<dd>{l s='Browser cache cannot be refreshed (except if the visitor refreshes the page in the browser) so here you set the maximum age of the cache whatever modifications are done in back office. This is why it is limited to 60 minutes.' mod='pagecache'}</dd>
</dl>
</div></div>
{else}
<div class="hint clear" style="display: block;">
<dl>
<dt>{l s='Server cache maximum duration' mod='pagecache'}</dt>
<dd>{l s='Server cache is automatically refreshed when you modify prices, descriptions, stocks, etc. (not when you do modifications in theme, modules, CSS, etc.) so here you set the maximum age of the cache if there is no modification.' mod='pagecache'}</dd>
<dt>{l s='Browser cache duration' mod='pagecache'}</dt>
<dd>{l s='Browser cache cannot be refreshed (except if the visitor refreshes the page in the browser) so here you set the maximum age of the cache whatever modifications are done in back office. This is why it is limited to 60 minutes.' mod='pagecache'}</dd>
</dl>
</div>
{/if}
{*ULTIMATE*}
<h4>{l s='When using Prestashop Static cache' mod='pagecache'}</h4>
<div>
{l s='When the static cache is used it is not possible to know what kind of page is requested and so the browser cache duration must be the same for all cached pages' mod='pagecache'}:
</div>
<table>
<tr class="first">
<td>{l s='Browser cache duration for static files' mod='pagecache'}</td>
<td><input id="pcstatic2" name="pagecache_static_expires" style="padding: 0 10px;" type="text" data-slider-ticks="[0, 15, 30, 45, 60]" data-slider-value="{$pagecache_static_expires|escape:'html':'UTF-8'}" data-slider-tooltip="hide" data-slider-ticks-snap-bounds="3" data-slider-handle="square"/>&nbsp;<span id="pcstatic2SliderVal" style="font-weight:bold"></span></td>
</tr>
</table>
<h4 style="margin-top: 2rem">{l s='By Pages' mod='pagecache'}</h4>
{*ULTIMATE£*}
<table>
{foreach $managed_controllers as $controller_name => $controller}
<tr class="first">
<td class="label">{$controller['title']|escape:'html':'UTF-8'}</td>
<td>{l s='Server cache maximum duration' mod='pagecache'}:</td>
<td class="slider"><input id="pc{$controller_name|escape:'html':'UTF-8'}" name="pagecache_{$controller_name|escape:'html':'UTF-8'}_timeout" style="padding: 0 10px;" type="text" data-slider-ticks="[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]" data-slider-value="{$controller['timeout']|escape:'html':'UTF-8'}" data-slider-tooltip="hide" data-slider-handle="square"/>&nbsp;<span id="pc{$controller_name|escape:'html':'UTF-8'}SliderVal" style="font-weight:bold"></span></td>
</tr>
{*ULTIMATE*}
<tr>
<td></td>
<td>{l s='Browser cache duration' mod='pagecache'}:</td>
<td class="slider"><input id="pc{$controller_name|escape:'html':'UTF-8'}2" name="pagecache_{$controller_name|escape:'html':'UTF-8'}_expires" style="padding: 0 10px;" type="text" data-slider-ticks="[0, 15, 30, 45, 60]" data-slider-value="{$controller['expires']|escape:'html':'UTF-8'}" data-slider-tooltip="hide" data-slider-ticks-snap-bounds="3" data-slider-handle="square"/>&nbsp;<span id="pc{$controller_name|escape:'html':'UTF-8'}2SliderVal" style="font-weight:bold"></span></td>
</tr>
{*ULTIMATE£*}
{/foreach}
</table>
</div>
<div class="bootstrap">
<button type="submit" value="1" id="submitModuleTimeouts" name="submitModuleTimeouts" class="btn btn-default pull-right">
<i class="process-icon-save"></i> {l s='Save' mod='pagecache'}
</button>
</div>
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,144 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<script type="application/javascript">
$(function () {
$("input[name=pagecache_typecache]").click(function(){
$('.pagecache_typecache_conf').hide();
$('#pagecache_typecache_conf_'+$(this).val()).show();
$('#pagecache_typecache_conf_'+$(this).val()+' input').first().focus();
checkMemcacheConf();
checkMemcachedConf();
});
});
function checkMemcacheConf() {
$('#memcache_test').prop('disabled', !$('#memcache_host').val() || !$('#memcache_port').val());
$('#testMemcacheResult').html('').hide();
}
function testMemcache() {
$('#memcache_test').prop('disabled', true);
$('#testMemcacheResult').html('{l s='Checking connection...' mod='pagecache'}').show();
$.ajax({ url: '{$pagecache_typecache_memcache_testurl|escape:'javascript':'UTF-8'}', cache: true, data: { host:$('#memcache_host').val(), port:$('#memcache_port').val() },
success: function(response) {
let result = JSON.parse(response);
if (result.status === 1) {
$('#testMemcacheResult').html('<div class="alert alert-success" role="alert"><strong>'+result.host+':'+result.port+'</strong> '+result.comments+'</div>');
}
else {
$('#testMemcacheResult').html('<div class="alert alert-danger" role="alert"><strong>'+result.host+':'+result.port+'</strong> '+result.comments+'</div>');
}
},
error: function(result, status, error) {
$('#testMemcacheResult').html(result + ' - ' + status + ' - ' + error);
}});
$('#memcache_test').prop('disabled', false);
}
function checkMemcachedConf() {
$('#memcached_test').prop('disabled', !$('#memcached_host').val() || !$('#memcached_port').val());
$('#testMemcachedResult').html('').hide();
}
function testMemcached() {
$('#memcached_test').prop('disabled', true);
$('#testMemcachedResult').html('{l s='Checking connection...' mod='pagecache'}').show();
$.ajax({ url: '{$pagecache_typecache_memcached_testurl|escape:'javascript':'UTF-8'}', cache: true, data: { host:$('#memcached_host').val(), port:$('#memcached_port').val() },
success: function(response) {
let result = JSON.parse(response);
if (result.status === 1) {
$('#testMemcachedResult').html('<div class="alert alert-success" role="alert"><strong>'+result.host+':'+result.port+'</strong> '+result.comments+'</div>');
}
else {
$('#testMemcachedResult').html('<div class="alert alert-danger" role="alert"><strong>'+result.host+':'+result.port+'</strong> '+result.comments+'</div>');
}
},
error: function(result, status, error) {
$('#testMemcachedResult').html(result + ' - ' + status + ' - ' + error);
}});
$('#memcached_test').prop('disabled', false);
}
</script>
<div class="panel">
<h3>{if $avec_bootstrap}<i class="icon-gear"></i>{else}<img width="16" height="16" src="../img/admin/AdminPreferences.gif" alt=""/>{/if}&nbsp;{l s='Caching system' mod='pagecache'}</h3>
{if count($pagecache_shopsinfos) > 1}
<div class="alert alert-info">
{l s='Be aware that the caching system is the same for all shops' mod='pagecache'}
</div>
{/if}
<form id="pagecache_form_typecache" action="{$request_uri|escape:'html':'UTF-8'}" method="post">
<input type="hidden" name="submitModule" value="true"/>
<input type="hidden" name="pctab" value="typecache"/>
<fieldset>
<div style="clear: both;">
<div class="margin-form">
<h4>{l s='Recommended ones' mod='pagecache'}</h4>
<div class="radio">
<label>
<input type="radio" {if !$pagecache_typecache_static}disabled="true"{/if} name="pagecache_typecache" value="static" {if $pagecache_typecache === 'static'}checked{/if}>{l s='Prestashop Static!' mod='pagecache'}
</label>
<p class="help-block">{l s='Fastest cache, consummes a lot of files on the disk but they are compressed' mod='pagecache'}</p>
</div>
<div class="radio">
<label>
<input type="radio" name="pagecache_typecache" value="std" {if $pagecache_typecache === 'std'}checked{/if}>{l s='Standard file system' mod='pagecache'}
</label>
<p class="help-block">{l s='Fast but is consumming a lot of files on the disk' mod='pagecache'}</p>
</div>
<div class="radio">
<label>
<input type="radio" {if !$pagecache_typecache_stdzip}disabled="true"{/if} name="pagecache_typecache" value="stdzip" {if $pagecache_typecache === 'stdzip'}checked{/if}>{l s='Zipped Standard file system' mod='pagecache'}
</label>
<p class="help-block">{l s='Same as "Standard file system" but files are compressed with ZIP to consumme less disk space, but of course it is a bit slower.' mod='pagecache'}</p>
</div>
<h4>{l s='Not recommended ones' mod='pagecache'}</h4>
<p>{l s='When using a Memcache server, make sure it is correctly configured and sized or the hit rate could be limited' mod='pagecache'}</p>
<div class="radio">
<label>
<input type="radio" id="pagecache_typecache_memcache" {if !$pagecache_typecache_memcache}disabled="true" {/if}name="pagecache_typecache" value="memcache" {if $pagecache_typecache === 'memcache'}checked{/if}>{l s='PHP Memcache' mod='pagecache'}
</label>
<p class="help-block">{if !$pagecache_typecache_memcache}{if $avec_bootstrap}<i class="icon-exclamation-circle"></i>{else}<img width="16" height="16" src="../img/admin/warning.gif" alt=""/>{/if}&nbsp;{l s='You must install PHP memcache extension in order to use this cache; ask to your hosting provider for more informations.' mod='pagecache'}{else}{l s='Please, provide the hostname and port of the memcache server to use. If you don\'t know what it is then choose an other caching system. Be aware that if your memcache server is down this will slow down your shop.' mod='pagecache'}{/if}</p>
<div id="pagecache_typecache_conf_memcache" class="form-inline pagecache_typecache_conf" {if $pagecache_typecache !== 'memcache'}style="display:none"{/if}>
<div class="form-group">
<label for="memcache_host">{l s='Server IP/Hostname' mod='pagecache'}</label>
<input type="text" onchange="checkMemcacheConf()" onkeyup="checkMemcacheConf()" class="form-control" id="memcache_host" name="pagecache_typecache_memcache_host" value="{$pagecache_typecache_memcache_host|escape:'html':'UTF-8'}">
</div>
<div class="form-group">
<label for="memcache_port">{l s='Server port' mod='pagecache'}</label>
<input type="number" onchange="checkMemcacheConf()" onkeyup="checkMemcacheConf()" class="form-control" id="memcache_port" name="pagecache_typecache_memcache_port" value="{$pagecache_typecache_memcache_port|escape:'html':'UTF-8'}">
</div>
<button type="button" onclick="testMemcache(); return false;" id="memcache_test" class="btn btn-default">Test</button>
<div id="testMemcacheResult" style="padding: 20px; display:none;"></div>
</div>
</div>
<div class="radio">
<label>
<input type="radio" id="pagecache_typecache_memcached" {if !$pagecache_typecache_memcached}disabled="true" {/if}name="pagecache_typecache" value="memcached" {if $pagecache_typecache === 'memcached'}checked{/if}>{l s='PHP Memcached' mod='pagecache'}
</label>
<p class="help-block">{if !$pagecache_typecache_memcached}{if $avec_bootstrap}<i class="icon-exclamation-circle"></i>{else}<img width="16" height="16" src="../img/admin/warning.gif" alt=""/>{/if}&nbsp;{l s='You must install PHP memcached extension in order to use this cache; ask to your hosting provider for more informations.' mod='pagecache'}{else}{l s='Please, provide the hostname and port of the memcache server to use. If you don\'t know what it is then choose an other caching system. Be aware that if your memcache server is down this will slow down your shop.' mod='pagecache'}{/if}</p>
<div id="pagecache_typecache_conf_memcached" class="form-inline pagecache_typecache_conf" {if $pagecache_typecache !== 'memcached'}style="display:none"{/if}>
<div class="form-group">
<label for="memcached_host">{l s='Server IP/Hostname' mod='pagecache'}</label>
<input type="text" onchange="checkMemcachedConf()" onkeyup="checkMemcachedConf()" class="form-control" id="memcached_host" name="pagecache_typecache_memcached_host" value="{$pagecache_typecache_memcached_host|escape:'html':'UTF-8'}">
</div>
<div class="form-group">
<label for="memcached_port">{l s='Server port' mod='pagecache'}</label>
<input type="number" onchange="checkMemcachedConf()" onkeyup="checkMemcachedConf()" class="form-control" id="memcached_port" name="pagecache_typecache_memcached_port" value="{$pagecache_typecache_memcached_port|escape:'html':'UTF-8'}">
</div>
<button type="button" onclick="testMemcached(); return false;" id="memcached_test" class="btn btn-default">Test</button>
<div id="testMemcachedResult" style="padding: 20px; display:none;"></div>
</div>
</div>
</div>
</div>
<div class="bootstrap">
<button type="submit" value="1" id="submitModuleTypeCache" name="submitModuleTypeCache" class="btn btn-default pull-right">
<i class="process-icon-save"></i> {l s='Save' mod='pagecache'}
</button>
</div>
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,414 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<style>
#pagecachecfg .dynhooks label{ line-height:18px;}
#pagecachecfg .tag{ background-color:#eee;border:1px solid #CCCED7;border-radius:4px;display:inline-block;margin:2px;padding:3px;}
#linkadvanced{ font-weight:700;display:block;margin:15px 5px;}
#pagecachecfg input[disabled]{ opacity:0.5;filter:alpha(opacity=50);}
#pagecachecfg .bootstrap .nav-tabs{ margin-left:0;}
#pagecachecfg .bootstrap .label{ color:black;}
#pagecachecfg .bootstrap .nav-tabs li a{ font-size:1.2em;white-space: nowrap;}
#pagecachecfg .bootstrap .nav-tabs li.active a, #pagecachecfg .bootstrap .nav-tabs li.active a:visited,.bootstrap .nav-tabs li.active a:hover, #pagecachecfg .bootstrap .nav-tabs li.active a:focus{ background-color:#ebedf4;}
#pagecachecfg .nobootstrap fieldset{ border:1px solid #ddd;margin:0;}
#pagecachecfg .installstep{ font-size:0.9rem;margin:5px 0 20px;}
#pagecachecfg a.browsebtn{ display:inline-block;color:#FFF;background-color:#F0AD4E;border:1px solid #EEA236;border-radius:3px;text-decoration:none;padding:2px;}
#pagecachecfg a.browsebtn:hover{ background-color:#F5C177}
#pagecachecfg .okbtn{ display:inline-block;color:#FFF;background-color:#59C763;border:1px solid #4EA948;border-radius:3px;text-decoration:none;margin:3px;padding:2px;}
#pagecachecfg .okbtn:hover{ background-color:#7DD385}
#pagecachecfg a.kobtn{ display:inline-block;color:#DA0000;border-radius:3px;margin:3px;padding:2px;}
#pagecachecfg a.kobtn:hover{ color:#ED8080}
#pagecachecfg div.step{ margin:5px 0 5px 20px;}
#pagecachecfg .step span{ border-radius:.8em;color:#FFF;display:inline-block;font-weight:700;line-height:1.6em;margin-right:15px;text-align:center;width:1.6em;}
#pagecachecfg .step img{ margin-right:15px;}
#pagecachecfg .steptodo span{ background:#CCC;}
#pagecachecfg .stepok span{ background:#5EA226;color:#FFF;}
#pagecachecfg .stepok{ color:#5EA226;}
#pagecachecfg .stepdesc{ border-left:2px solid #CCCED7;margin-left:44px;padding:10px 0 10px 24px;}
#pagecachecfg .stepdesc img{ margin:2px;}
#pagecachecfg .stepdesc ol,.stephelp ol{ margin:0;padding:0 0 0 24px;}
#pagecachecfg .stephelp { display:none;border: 1px solid rgb(229, 229, 29);background-color: lightyellow;border-radius: 8px;padding: 10px;margin: 10px 0;}
#pagecachecfg .morehook { display: none}
#pagecachecfg .actions { margin: 15px 0 0 15px;}
#pagecachecfg .btn { margin-right: 5px}
#pagecachecfg.ps15 .row { background: initial;}
#pagecachecfg.ps15 ul.nav-tabs li{ display: inline-block; padding: 5px; margin: 0 5px 0 0; border-radius: 5px 5px 0 0; background-color: #EBEDF4; border: 1px solid #CCCED7; border-bottom: none;}
#pagecachecfg.ps15 ul.nav-tabs li.active{ background-color: #49B2FF; color:white}
#pagecachecfg.ps15 ul.nav-tabs li a, #pagecachecfg.ps15 a.okbtn, #pagecachecfg.ps15 a.browsebtn { text-decoration: none;}
#pagecachecfg.ps15 .bootstrap .nav-tabs li.active a { background-color: #49B2FF; color:white;text-decoration: none;}
#pagecachecfg.ps15 a { text-decoration: underline;}
#pagecachecfg.ps15 ol { list-style-type: decimal;}
#pagecachecfg.ps15 .col-sm-2 { width: 15%; float: left;}
#pagecachecfg.ps15 .col-sm-10 { width: 85%; float: right;}
#pagecachecfg.ps15 li { margin: 10px;}
#pagecachecfg.ps15 .hint { display: block; margin-bottom: 5px;}
#pagecachecfg.ps15 .jprestamenu { display: inline-block; vertical-align: top; width: 20%; padding: 0 16px 5px 5px; margin-right: 10px; border: 1px solid #ccc;}
#pagecachecfg.ps15 .jprestacontent { display: inline-block; vertical-align: top; width: 70%;}
#pagecachecfg.ps15 .panel {
border: 1px solid lightgrey;
border-radius: 3px;
padding: 3px;
margin: 0 0 12px 0;
}
#pagecachecfg.ps15 .jprestamenu .panel { border: none;}
#pagecachecfg.ps15 .panel h3 {
border-bottom: 1px solid lightgrey;
margin-top: 1px;
}
#pagecachecfg.ps15 fieldset {
background-color: transparent;
border: none;
}
#pagecachecfg #timeouts .slider-horizontal { margin: 5px 10px;}
#pagecachecfg #timeouts table td { padding: 3px;text-align:right}
#pagecachecfg #timeouts table td.slider { text-align:left}
#pagecachecfg #timeouts table td.label { padding-right: 5px; font-weight: bold;}
#pagecachecfg #timeouts table .first td { padding-top: 20px;}
#profilingTable td:nth-child(4) { text-align: right}
#profilingTable td:nth-child(3) { text-align: center}
#pagecachecfg .dataTables_length { display:none}
#pagecachecfg.ps15 ul { display: block;list-style-type: disc;padding-left: 2rem;}
#pagecachecfg.ps15 pre {
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 3px;
color: #333;
display: block;
font-size: 11px;
line-height: 1.42857;
padding: 8px;
word-break: break-all;
word-wrap: break-word;
}
#toolbar-nav i.process-icon-delete:before {
color: orange;
}
.bootstrap .nav-pills>li.error>a, .bootstrap .nav-pills>li.error>a:hover, .bootstrap .nav-pills>li.error>a:focus {
color: #fff;
background-color: #f44336;
}
#pagecachecfg ul.nav ul.nav {
margin-left: 30px;
padding-left: 5px;
border-left: 1px solid #25b9d7;
}
#pagecachecfg .option-off {
font-style: italic;
}
#pagecachecfg .pc_specifics {
position: absolute;
border: 1px solid gray;
background-color: white;
padding: 3px;
z-index: 99;
text-align: left;
display: none;
unicode-bidi: embed;
font-family: monospace;
white-space: pre;
border-radius: 3px;
margin-left: 100px;
}
#pagecachecfg .specifics:hover .pc_specifics {
display: block;
}
#lioptions a, #licachekey a {
color: orange
}
#pagecachecfg .bootstrap h4 {
font-weight: bold;
}
#pagecachecfg label.form-check-label {
margin-right: 1rem;
}
#pagecachecfg .table th, #pagecachecfg #datasTable th {
font-weight: bold !important;
font-size: 0.8rem;
border-bottom: 2px solid #a0d0eb !important;
vertical-align: baseline;
}
#pagecachecfg #datasTable th {
vertical-align: middle;
}
#pagecachecfg .btn-xs i.material-icons {
font-size: 1.3rem;
}
#pagecachecfg .btn.btn-xs {
line-height: 0;
}
#pagecachecfg .cachewarmer_count {
font-size: 1rem;
font-weight: bold;
text-align: right;
}
#pagecachecfg #total_pages_count.cachewarmer_count {
color: green;
}
#pagecachecfg #total_pages_count.cachewarmer_count_warn {
color: orange;
}
#pagecachecfg #total_pages_count.cachewarmer_count_danger {
color: red;
}
.help a {
color: #59c763;
font-weight: bold;
}
#pagecachecfg .bootstrap input[type=number] {
background: #f5f8f9 none;
border: 1px solid #c7d6db;
line-height: 27px;
text-align: right;
border-radius: 3px;
}
#pagecachecfg .bootstrap input:focus[type=number] {
background-color: #fefbe2;
border: 1px solid #66afe9 !important;
box-shadow: none;
outline: 0;
}
#pagecachecfg .chart {
border: 1px solid #bbcdd2;
margin: 0.5rem 0;
border-radius: 4px;
}
</style>
<script type="text/javascript">
let currentTab = null;
let is_cachewarmer_valid = false;
$( document ).ready(function() {
switch (window.location.hash) {
case "#tabinstall": displayTab("install"); break;
case "#tablicense": displayTab("license"); break;
case "#tabdynhooks": displayTab("dynhooks"); break;
case "#tabdynhooksjs": displayTab("dynhooks"); break;
case "#taboptions": displayTab("options"); break;
case "#tabcachekey": displayTab("cachekey"); break;
case "#tabdatas": displayTab("datas"); break;
case "#tabcachewarmer": displayTab("cachewarmer"); break;
case "#tabcachewarmer-settings": displayTab("cachewarmer-settings"); break;
case "#tabcachewarmer-status": displayTab("cachewarmer-status"); break;
case "#tabcachewarmer-report": displayTab("cachewarmer-report"); break;
case "#tabtypecache": displayTab("typecache"); break;
case "#tabdiagnostic": displayTab("diagnostic"); break;
case "#tabtimeouts": displayTab("timeouts"); break;
case "#tabcron": displayTab("cron"); break;
case "#tabshopsinfos": displayTab("shopsinfos"); break;
case "#tabcachemanagement": displayTab("cachemanagement"); break;
}
$('#desc-module-clearcache-li').prependTo('.btn-toolbar ul.nav');
$('#btn-pagecache-faq-li').prependTo('.btn-toolbar ul.nav');
// Bug in PS1.7.8.5
$('.btn-toolbar ul.nav #dingedi-mdtr-app').remove();
// JPresta-Cache-Warmer tabs
window.addEventListener(
"message",
(event) => {
if ((event.origin === "http://localhost" || event.origin === "https://cachewarmer.jpresta.com")
&& typeof event.data === 'object'
&& typeof event.data.name === 'string'
&& event.data.name === 'jpresta-cache-warmer-subscription'
) {
console.log('JPresta-Cache-Warmer subscription informations received.');
let subscriptionInfos = event.data;
if (subscriptionInfos.is_valid) {
is_cachewarmer_valid = true;
if (subscriptionInfos.page_status === 'show') {
$('#licachewarmer-status').show().removeClass('option-off');
}
else if (subscriptionInfos.page_status === 'show_disabled') {
$('#licachewarmer-status').show().addClass('option-off');
}
else {
$('#licachewarmer-status').hide();
}
if (subscriptionInfos.page_report === 'show') {
$('#licachewarmer-report').show().removeClass('option-off');
}
else if (subscriptionInfos.page_report === 'show_disabled') {
$('#licachewarmer-report').show().addClass('option-off');
}
else {
$('#licachewarmer-report').hide();
}
$('#cw-submenu').show();
if (currentTab === 'cachewarmer') {
// This will update the active menu
displayTab('cachewarmer');
}
}
}
},
false
);
// If the cache-warmer frame is ready before us we retreive the information again.
try {
document.getElementById("jprestaCacheWamer").contentWindow.postMessage('jpresta-admin-ready', '*');
}
catch (e) {
console.log('Cannot send message "jpresta-admin-ready" to iframe #jprestaCacheWamer', e);
}
});
function displayTab(tab) {
$(".pctab").hide();
$("#"+tab).show();
$(".nav-pills .active").removeClass("active");
if (!is_cachewarmer_valid || tab !== 'cachewarmer') {
$("#li" + tab).addClass("active");
}
else {
$("#licachewarmer-dashboard").addClass("active");
}
currentTab = tab;
if (tab === 'install' && typeof nv !== 'undefined' && typeof nv.graphs[0] !== 'undefined') {
nv.graphs[0].update();
}
}
</script>
<div id="pagecachecfg" {if !$avec_bootstrap}class="ps15"{/if}>
{foreach $msg_success as $msg}
<div class="bootstrap">
<div class="module_confirmation conf confirm alert alert-success">{if $avec_bootstrap}<button type="button" class="close" data-dismiss="alert">&times;</button>{/if}{$msg|escape:'html':'UTF-8'}</div>
</div>
{/foreach}
{foreach $msg_infos as $msg}
<div class="bootstrap">
<div class="alert alert-info">{if $avec_bootstrap}<button type="button" class="close" data-dismiss="alert">&times;</button>{/if}{$msg|escape:'html':'UTF-8'}</div>
</div>
{/foreach}
{foreach $msg_warnings as $msg}
<div class="bootstrap">
<div class="module_warning alert alert-warning">{if $avec_bootstrap}<button type="button" class="close" data-dismiss="alert">&times;</button>{/if}{$msg|escape:'html':'UTF-8'}</div>
</div>
{/foreach}
{foreach $msg_errors as $msg}
<div class="bootstrap">
<div class="module_error alert alert-danger">{if $avec_bootstrap}<button type="button" class="close" data-dismiss="alert">&times;</button>{/if}{$msg|escape:'html':'UTF-8'}</div>
</div>
{/foreach}
{if !$module_enabled}
<div class="alert alert-warning" style="display: block;">
&nbsp;{l s='The module is currently disabled' mod='pagecache'}
</div>
{/if}
<div class="bootstrap">
<div class="row">
<div class="col-md-4 col-lg-3 col-xl-2 jprestamenu">
<div class="panel">
<h3 title="Prestashop {$prestashop_version|escape:'html':'UTF-8'}"><img src="../modules/{$module_name|escape:'html':'UTF-8'}/logo.png" width="20" height="20"/> {$module_displayName|escape:'html':'UTF-8'} v{$module_version|escape:'html':'UTF-8'}</h3>
<ul class="nav nav-pills nav-stacked">
<li id="liinstall" role="presentation" {if $pctab eq 'install'}class="active"{/if}><a href="#tabinstall" onclick="displayTab('install');return true;">{if $avec_bootstrap}<i class="icon-dashboard"></i>{else}<img width="16" height="16" src="../img/admin/prefs.gif" alt=""/>{/if}&nbsp;{l s='Dashboard' mod='pagecache'}</a></li>
<li id="lilicense" role="presentation" class="{if $pctab eq 'license'}active{/if}{if $pagecache_clone_detected} error{/if}"><a href="#tablicense" onclick="displayTab('license');return true;">{if $avec_bootstrap}<i class="icon-key"></i>{else}<img width="16" height="16" src="../img/admin/htaccess.gif" alt=""/>{/if}&nbsp;{l s='License' mod='pagecache'}</a></li>
<li id="licachewarmer" role="presentation" {if $pctab eq 'cachewarmer'}class="active"{/if}><a href="#tabcachewarmer" onclick="displayTab('cachewarmer');return true;">{if $avec_bootstrap}<i class="icon-fire"></i>{else}<img width="16" height="16" src="../img/admin/quick.gif" alt=""/>{/if}&nbsp;{l s='JPresta Cache Warmer' mod='pagecache'}</a>
<ul id="cw-submenu" style="display: none" class="nav nav-pills nav-stacked">
<li id="licachewarmer-dashboard" {if $pctab eq 'cachewarmer'}class="active"{/if}><a href="#tabcachewarmer" onclick="displayTab('cachewarmer');return true;">{l s='Dashboard and options' mod='pagecache'}</a></li>
<li id="licachewarmer-settings" {if $pctab eq 'cachewarmer-settings'}class="active"{/if}><a href="#tabcachewarmer-settings" onclick="displayTab('cachewarmer-settings');return true;">{l s='Pages to warmup' mod='pagecache'}</a></li>
<li id="licachewarmer-status" {if $pctab eq 'cachewarmer-status'}class="active"{/if}><a href="#tabcachewarmer-status" onclick="displayTab('cachewarmer-status');return true;">{l s='Status of your shop' mod='pagecache'}</a></li>
<li id="licachewarmer-report" {if $pctab eq 'cachewarmer-report'}class="active"{/if}><a href="#tabcachewarmer-report" onclick="displayTab('cachewarmer-report');return true;">{l s='Monthly reports' mod='pagecache'}</a></li>
</ul>
</li>
<li id="lidynhooks" role="presentation" {if $pctab eq 'dynhooks'}class="active"{/if}><a href="#tabdynhooks" onclick="displayTab('dynhooks');return true;">{if $avec_bootstrap}<i class="icon-puzzle-piece"></i>{else}<img width="16" height="16" src="../img/admin/tab-plugins.gif" alt=""/>{/if}&nbsp;{l s='Dynamic modules and widgets' mod='pagecache'}</a></li>
{*ULTIMATE*}
<li id="litypecache" role="presentation" {if $pctab eq 'typecache'}class="active"{/if}><a href="#tabtypecache" onclick="displayTab('typecache');return true;">{if $avec_bootstrap}<i class="icon-gear"></i>{else}<img width="16" height="16" src="../img/admin/AdminPreferences.gif" alt=""/>{/if}&nbsp;{l s='Caching system' mod='pagecache'}</a></li>
{*ULTIMATE£*}
<li id="litimeouts" role="presentation" {if $pctab eq 'timeouts'}class="active"{/if}><a href="#tabtimeouts" onclick="displayTab('timeouts');return true;">{if $avec_bootstrap}<i class="icon-time"></i>{else}<img width="16" height="16" src="../img/admin/time.gif" alt=""/>{/if}&nbsp;{l s='Pages & timeouts' mod='pagecache'}</a></li>
<li id="lidatas" role="presentation" {if $pctab eq 'datas'}class="active"{/if}><a href="#tabdatas" onclick="displayTab('datas');return true;">{if $avec_bootstrap}<i class="icon-line-chart"></i>{else}<img width="16" height="16" src="../img/admin/AdminStats.gif" alt=""/>{/if}&nbsp;{l s='Statistics' mod='pagecache'}</a></li>
{*ULTIMATE*}
<li id="lidiagnostic" role="presentation" {if $pctab eq 'diagnostic'}class="active"{/if}><a href="#tabdiagnostic" onclick="displayTab('diagnostic');return true;">{if $avec_bootstrap}<i class="icon-user-md"></i>{else}<img width="16" height="16" src="../img/admin/binoculars.png" alt=""/>{/if}&nbsp;{l s='Diagnostic & performances' mod='pagecache'} <span class="badge">{$diagnostic_count|escape:'html':'UTF-8'}</span></a></li>
<li id="licron" role="presentation" {if $pctab eq 'cron'}class="active"{/if}><a href="#tabcron" onclick="displayTab('cron');return true;">{if $avec_bootstrap}<i class="icon-link"></i>{else}<img width="16" height="16" src="../img/admin/subdomain.gif" alt=""/>{/if}&nbsp;{l s='API (URLs to clear the cache)' mod='pagecache'}</a></li>
{*ULTIMATE£*}
{if $advanced_mode}
<li id="lioptions" role="presentation" {if $pctab eq 'options'}class="active"{/if}><a href="#taboptions" onclick="displayTab('options');return true;">{if $avec_bootstrap}<i class="icon-gear"></i>{else}<img width="16" height="16" src="../img/admin/AdminPreferences.gif" alt=""/>{/if}&nbsp;{l s='Options' mod='pagecache'}</a></li>
<li id="licachekey" role="presentation" {if $pctab eq 'cachekey'}class="active"{/if}><a href="#tabcachekey" onclick="displayTab('cachekey');return true;">{if $avec_bootstrap}<i class="icon-gear"></i>{else}<img width="16" height="16" src="../img/admin/AdminPreferences.gif" alt=""/>{/if}&nbsp;{l s='Cache key' mod='pagecache'}</a></li>
{/if}
{if count($pagecache_shopsinfos) > 1}
<li id="lishopsinfos" role="presentation" {if $pctab eq 'shopsinfos'}class="active"{/if}><a href="#tabshopsinfos" onclick="displayTab('shopsinfos');return true;">{if $avec_bootstrap}<i class="icon-sitemap"></i>{else}<img width="16" height="16" src="../img/admin/multishop_config.png" alt=""/>{/if}&nbsp;{l s='Multistore' mod='pagecache'}</a></li>
{/if}
<li id="lifaq" class="help"><a href="https://jpresta.com/{$jpresta_language_isocode|default:'en'|escape:'javascript':'UTF-8'}/faq?from=jprestaspeedpack" target="_blank">{if $avec_bootstrap}<i class="icon-question-sign"></i>{else}<img width="16" height="16" src="../img/admin/help.png" alt=""/>{/if}&nbsp;{l s='FAQ' mod='pagecache'}</a></li>
</ul>
<ul style="display:none">
<li id="btn-pagecache-faq-li">
<a id="pagecache-faq" class="toolbar_btn" href="https://jpresta.com/{$jpresta_language_isocode|default:'en'|escape:'javascript':'UTF-8'}/faq?from=jprestaspeedpack" target="_blank" style="color:white; background-color: #33bd25">
<i class="process-icon-help"></i>
<div>{l s='FAQ' mod='pagecache'}</div>
</a>
</li>
</ul>
</div>
{if !$advanced_mode}
<div style="text-align: center"><a href="{$advanced_mode_url|escape:'html':'UTF-8'}">{l s='Advanced mode' mod='pagecache'}</a></div>
{/if}
</div>
<div class="col-md-8 col-lg-9 col-xl-10 jprestacontent">
<div id="install" class="pctab" {if $pctab neq 'install'}style="display:none"{/if}>
{include file='./get-content-tab-install.tpl'}
</div>
<div id="dynhooks" class="pctab" {if $pctab neq 'dynhooks'}style="display:none"{/if}>
{include file='./get-content-tab-dynhooks.tpl'}
</div>
<div id="timeouts" class="pctab" {if $pctab neq 'timeouts'}style="display:none"{/if}>
{include file='./get-content-tab-timeouts.tpl'}
</div>
<div id="datas" class="pctab" {if $pctab neq 'datas'}style="display:none"{/if}>
{include file='./get-content-tab-datas.tpl'}
</div>
<div id="cron" class="pctab" {if $pctab neq 'cron'}style="display:none"{/if}>
{include file='./get-content-tab-cron.tpl'}
</div>
{if $advanced_mode}
<div id="options" class="pctab" {if $pctab neq 'options'}style="display:none"{/if}>
{include file='./get-content-tab-options.tpl'}
</div>
<div id="cachekey" class="pctab" {if $pctab neq 'cachekey'}style="display:none"{/if}>
{include file='./get-content-tab-cachekey.tpl'}
</div>
{/if}
{*ULTIMATE*}
<div id="typecache" class="pctab" {if $pctab neq 'typecache'}style="display:none"{/if}>
{include file='./get-content-tab-typecache.tpl'}
</div>
<div id="diagnostic" class="pctab" {if $pctab neq 'diagnostic'}style="display:none"{/if}>
{include file='./get-content-tab-diagnostic.tpl'}
</div>
{*ULTIMATE£*}
<div id="license" class="pctab" {if $pctab neq 'license'}style="display:none"{/if}>
{include file='./get-content-tab-license.tpl'}
</div>
<div id="cachewarmer" class="pctab" {if $pctab neq 'cachewarmer'}style="display:none"{/if}>
{include file='./get-content-tab-jpresta.tpl'}
</div>
<div id="cachewarmer-settings" class="pctab" {if $pctab neq 'cachewarmer-settings'}style="display:none"{/if}>
{include file='./get-content-tab-jpresta-settings.tpl'}
</div>
<div id="cachewarmer-status" class="pctab" {if $pctab neq 'cachewarmer-status'}style="display:none"{/if}>
{include file='./get-content-tab-jpresta-status.tpl'}
</div>
<div id="cachewarmer-report" class="pctab" {if $pctab neq 'cachewarmer-report'}style="display:none"{/if}>
{include file='./get-content-tab-jpresta-report.tpl'}
</div>
{if count($pagecache_shopsinfos) > 1}
<div id="shopsinfos" class="pctab" {if $pctab neq 'shopsinfos'}style="display:none"{/if}>
{include file='./get-content-tab-shopsinfos.tpl'}
</div>
{/if}
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,10 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<div class="alert alert-warning">
<div class="alert-text">{l s='Clone detected, please check the configuration of Page Cache Ultimate (or JPresta Speed Pack) to avoid any license conflict' mod='pagecache'}</div>
</div>

View File

@@ -0,0 +1,10 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<div class="alert alert-warning">
<div class="alert-text">{l s='You must finish the upgrade of "%module_name%" (%module_current_version% => %module_new_version%), go in modules list and click on button "Upgrade" next to "%module_name%". This is important to do it now!' sprintf=['%module_name%' => $jpresta_module_name, '%module_new_version%' => $jpresta_module_new_version, '%module_current_version%' => $jpresta_module_current_version] d='pagecache'}</div>
</div>

View File

@@ -0,0 +1,10 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<div class="alert alert-warning">
{l s='Please, select a shop to configure (you cannot configure a group of shops).' mod='pagecache'}
</div>

View File

@@ -0,0 +1,24 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<script type="text/javascript">
$( document ).ready(function() {
$('#btn-webp-faq-li').prependTo('.btn-toolbar ul.nav');
});
</script>
<div style="font-size: 1rem; border: 1px solid #3ed2f0; padding: 0.5rem; background-color: #f4f9fb;">
<i class="material-icons mi-help" style="vertical-align: bottom;">help</i>
{l s='If some images are not compressed in WEBP, %start_link%consult our FAQ%end_link% which lists the known problems with their solutions' sprintf=['%start_link%' => $faq_url_start, '%end_link%' => '</a>'] d='pagecache'}
</div>
<ul style="display:none">
<li id="btn-webp-faq-li">
<a id="webp-faq" class="toolbar_btn" href="{$faq_url|escape:'html':'UTF-8'}" target="_blank" style="color:white; background-color: #33bd25">
<i class="process-icon-help"></i>
<div>{l s='FAQ Webp' mod='pagecache'}</div>
</a>
</li>
</ul>

View File

@@ -0,0 +1,8 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
{$result|escape:'htmlall':'UTF-8'}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,8 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
{$template|escape:'htmlall':'UTF-8'}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,37 @@
{*
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*}
<script type="text/javascript">
function addNoCacheParam() {
let links = document.querySelectorAll("a");
for (let i = 0, len = links.length; i < len; i++) {
let e = links[i].href;
if (e.indexOf(document.location.href + '#') >= 0) {
// Some browsers add the full URL of the current document in front of internal anchor links so we remove it
e = e.replace(document.location.href, '');
}
let n = "_pcnocache=" + (new Date().getTime());
let r = (typeof baseDir !== 'undefined' ? baseDir : prestashop.urls.base_url).replace("https", "http");
if (typeof e != "undefined" && e != "" && e.substr(0, 1) != "#" && (e.replace("https", "http").substr(0, r.length) == r || e.indexOf('://') == -1) && e.indexOf('javascript:') == -1) {
if (e.indexOf('?') >= 0) {
n = '&' + n;
}
else {
n = '?' + n;
}
let anchorIdx = e.indexOf('#');
if (anchorIdx >= 0) {
links[i].href = e.substring(0, anchorIdx) + n + e.substring(anchorIdx);
}
else {
links[i].href += n;
}
}
}
}
setTimeout('addNoCacheParam();', 200);
</script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;