Merge branch 'develop' into main
This commit is contained in:
commit
3a0c7f6b87
32 files changed
+136
-2274
No files matched your search
@@ -9,3 +9,7 @@ www/geolocationTable.js
|
|||||||
www/stations.xml
|
www/stations.xml
|
||||||
|
|
||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
|
|
||||||
|
www/index.html
|
||||||
|
|
||||||
|
www/favicon.ico
|
||||||
+4
-4
@@ -371,18 +371,18 @@ $(document).ready(function() {
|
|||||||
// hide child rows
|
// hide child rows
|
||||||
$('#eventstable > tbody > tr.tablesorter-childRow td').hide();
|
$('#eventstable > tbody > tr.tablesorter-childRow td').hide();
|
||||||
// update map after filtering
|
// update map after filtering
|
||||||
$('#eventstable').bind('filterEnd', function(){
|
$('#eventstable').on('filterEnd', function(){
|
||||||
toggleFilteredMarkers();
|
toggleFilteredMarkers();
|
||||||
});
|
});
|
||||||
// highlight first event
|
// highlight first event
|
||||||
$('#eventstable').bind('sortEnd', function(){
|
$('#eventstable').on('sortEnd', function(){
|
||||||
highlightFirstEvent();
|
highlightFirstEvent();
|
||||||
});
|
});
|
||||||
$('#eventstable').bind('pagerComplete', function(){
|
$('#eventstable').on('pagerComplete', function(){
|
||||||
highlightFirstEvent();
|
highlightFirstEvent();
|
||||||
});
|
});
|
||||||
// show / hide event info
|
// show / hide event info
|
||||||
$('#eventstable').delegate('.toggle', 'click' , function(){
|
$('#eventstable').on('click', '.toggle', function(){
|
||||||
// load event details
|
// load event details
|
||||||
var eventid = $(this).attr('eventid');
|
var eventid = $(this).attr('eventid');
|
||||||
( eventDetails[eventid] ) ? null : ajaxLoadEventInfo(eventid);
|
( eventDetails[eventid] ) ? null : ajaxLoadEventInfo(eventid);
|
||||||
|
|||||||
+4
-4
@@ -371,18 +371,18 @@ $(document).ready(function() {
|
|||||||
// hide child rows
|
// hide child rows
|
||||||
$('#eventstable > tbody > tr.tablesorter-childRow td').hide();
|
$('#eventstable > tbody > tr.tablesorter-childRow td').hide();
|
||||||
// update map after filtering
|
// update map after filtering
|
||||||
$('#eventstable').bind('filterEnd', function(){
|
$('#eventstable').on('filterEnd', function(){
|
||||||
toggleFilteredMarkers();
|
toggleFilteredMarkers();
|
||||||
});
|
});
|
||||||
// highlight first event
|
// highlight first event
|
||||||
$('#eventstable').bind('sortEnd', function(){
|
$('#eventstable').on('sortEnd', function(){
|
||||||
highlightFirstEvent();
|
highlightFirstEvent();
|
||||||
});
|
});
|
||||||
$('#eventstable').bind('pagerComplete', function(){
|
$('#eventstable').on('pagerComplete', function(){
|
||||||
highlightFirstEvent();
|
highlightFirstEvent();
|
||||||
});
|
});
|
||||||
// show / hide event info
|
// show / hide event info
|
||||||
$('#eventstable').delegate('.toggle', 'click' , function(){
|
$('#eventstable').on('click', '.toggle', function(){
|
||||||
// load event details
|
// load event details
|
||||||
var eventid = $(this).attr('eventid');
|
var eventid = $(this).attr('eventid');
|
||||||
( eventDetails[eventid] ) ? null : ajaxLoadEventInfo(eventid);
|
( eventDetails[eventid] ) ? null : ajaxLoadEventInfo(eventid);
|
||||||
|
|||||||
Vendored
+34
-29
@@ -4,45 +4,50 @@
|
|||||||
|
|
||||||
L.TileLayer.Grayscale = L.TileLayer.extend({
|
L.TileLayer.Grayscale = L.TileLayer.extend({
|
||||||
options: {
|
options: {
|
||||||
enableCanvas: true
|
quotaRed: 21,
|
||||||
|
quotaGreen: 71,
|
||||||
|
quotaBlue: 8,
|
||||||
|
quotaDividerTune: 0,
|
||||||
|
quotaDivider: function() {
|
||||||
|
return this.quotaRed + this.quotaGreen + this.quotaBlue + this.quotaDividerTune;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function (url, options) {
|
initialize: function (url, options) {
|
||||||
var canvasEl = document.createElement('canvas');
|
options = options || {}
|
||||||
if( !(canvasEl.getContext && canvasEl.getContext('2d')) ) {
|
options.crossOrigin = true;
|
||||||
options.enableCanvas = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
L.TileLayer.prototype.initialize.call(this, url, options);
|
L.TileLayer.prototype.initialize.call(this, url, options);
|
||||||
|
|
||||||
|
this.on('tileload', function(e) {
|
||||||
|
this._makeGrayscale(e.tile);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
_loadTile: function (tile, tilePoint) {
|
_createTile: function () {
|
||||||
tile.setAttribute('crossorigin', 'anonymous');
|
var tile = L.TileLayer.prototype._createTile.call(this);
|
||||||
L.TileLayer.prototype._loadTile.call(this, tile, tilePoint);
|
tile.crossOrigin = "Anonymous";
|
||||||
|
return tile;
|
||||||
},
|
},
|
||||||
|
|
||||||
_tileOnLoad: function () {
|
_makeGrayscale: function (img) {
|
||||||
if (this._layer.options.enableCanvas && !this.canvasContext) {
|
if (img.getAttribute('data-grayscaled'))
|
||||||
var canvas = document.createElement("canvas");
|
return;
|
||||||
canvas.width = canvas.height = this._layer.options.tileSize;
|
|
||||||
this.canvasContext = canvas.getContext("2d");
|
|
||||||
}
|
|
||||||
var ctx = this.canvasContext;
|
|
||||||
|
|
||||||
if (ctx) {
|
img.crossOrigin = '';
|
||||||
this.onload = null; // to prevent an infinite loop
|
var canvas = document.createElement("canvas");
|
||||||
ctx.drawImage(this, 0, 0);
|
canvas.width = img.width;
|
||||||
var imgd = ctx.getImageData(0, 0, this._layer.options.tileSize, this._layer.options.tileSize);
|
canvas.height = img.height;
|
||||||
var pix = imgd.data;
|
var ctx = canvas.getContext("2d");
|
||||||
for (var i = 0, n = pix.length; i < n; i += 4) {
|
ctx.drawImage(img, 0, 0);
|
||||||
pix[i] = pix[i + 1] = pix[i + 2] = (3 * pix[i] + 4 * pix[i + 1] + pix[i + 2]) / 8;
|
|
||||||
}
|
|
||||||
ctx.putImageData(imgd, 0, 0);
|
|
||||||
this.removeAttribute("crossorigin");
|
|
||||||
this.src = ctx.canvas.toDataURL();
|
|
||||||
}
|
|
||||||
|
|
||||||
L.TileLayer.prototype._tileOnLoad.call(this);
|
var imgd = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
||||||
|
var pix = imgd.data;
|
||||||
|
for (var i = 0, n = pix.length; i < n; i += 4) {
|
||||||
|
pix[i] = pix[i + 1] = pix[i + 2] = (this.options.quotaRed * pix[i] + this.options.quotaGreen * pix[i + 1] + this.options.quotaBlue * pix[i + 2]) / this.options.quotaDivider();
|
||||||
|
}
|
||||||
|
ctx.putImageData(imgd, 0, 0);
|
||||||
|
img.setAttribute('data-grayscaled', true);
|
||||||
|
img.src = canvas.toDataURL();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Vendored
-207
@@ -1,207 +0,0 @@
|
|||||||
div.leaflet-div-icon {
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 2px 2px 0px 2px;
|
|
||||||
font-size: small;
|
|
||||||
margin: 0px auto;
|
|
||||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
width: auto;
|
|
||||||
background: '#fff';
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
|
|
||||||
background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
|
|
||||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
|
|
||||||
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
|
|
||||||
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
|
|
||||||
background-image: linear-gradient(top, #ffffff, #e6e6e6);
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
|
|
||||||
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
|
|
||||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
|
||||||
filter: progid:dximagetransform.microsoft.gradient(enabled=false);
|
|
||||||
border: 1px solid #cccccc;
|
|
||||||
border-bottom-color: #b3b3b3;
|
|
||||||
-webkit-border-radius: 10px;
|
|
||||||
-moz-border-radius: 10px;
|
|
||||||
border-radius: 10px;
|
|
||||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
||||||
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
||||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
div.leaflet-div-icon div {
|
|
||||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
line-height: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.leaflet-div-icon div div {
|
|
||||||
display: block;
|
|
||||||
font-size: xx-small;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.legend-content {
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.legend-box {
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 8px;
|
|
||||||
border: solid 1px #000;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.leaflet-div-icon div div.legend-box {
|
|
||||||
width: 5px;
|
|
||||||
height: 5px;
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 4px;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.leaflet-div-icon div div.key {
|
|
||||||
margin: 2px 4px 0px 0px;
|
|
||||||
font-weight: bold;
|
|
||||||
line-height: 10px;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.data-layer-legend div {
|
|
||||||
display: inline-block;
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
.data-layer-legend .legend-box, .data-layer-legend .key {
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choropleth-text {
|
|
||||||
font-size: x-small;
|
|
||||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
vertical-align: middle;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scale-bars i {
|
|
||||||
vertical-align: bottom;
|
|
||||||
display: inline-block;
|
|
||||||
background-color: silver;
|
|
||||||
height: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.min-value, .max-value {
|
|
||||||
vertical-align: middle;
|
|
||||||
width: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.min-value {
|
|
||||||
text-align: right;
|
|
||||||
margin-right: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.max-value {
|
|
||||||
text-align: left;
|
|
||||||
margin-left: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scale-value {
|
|
||||||
text-align: center;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.data-layer-legend {
|
|
||||||
padding: 8px 0px 0px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scale-bars {
|
|
||||||
vertical-align: middle;
|
|
||||||
line-height: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.legend-title {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-popup-content {
|
|
||||||
overflow: auto;
|
|
||||||
max-height: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.palette-element {
|
|
||||||
display: inline-block;
|
|
||||||
width: 12px;
|
|
||||||
height: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-control-legend {
|
|
||||||
background-color: rgba(255, 255, 255, 0.7);
|
|
||||||
padding: 0px;
|
|
||||||
border-radius: 4px;
|
|
||||||
-webkit-border-radius: 4px;
|
|
||||||
-moz-border-radius: 4px;
|
|
||||||
max-height: 70px;
|
|
||||||
width: 268px;
|
|
||||||
box-shadow: 0 1px 7px #999;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-control-legend.larger {
|
|
||||||
max-height: 50%;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-control-legend .legend {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-control-legend i {
|
|
||||||
background-image: none;
|
|
||||||
vertical-align: text-bottom;
|
|
||||||
}
|
|
||||||
|
|
||||||
.photo {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 2px;
|
|
||||||
background-color: white;
|
|
||||||
box-shadow: 2px 2px 3px rgba(100, 100, 100, 0.5);
|
|
||||||
opacity: 0;
|
|
||||||
-moz-transition: opacity 1s; /* Firefox 4 */
|
|
||||||
-webkit-transition: opacity 1s; /* Safari and Chrome */
|
|
||||||
-o-transition: opacity 1s;
|
|
||||||
transition: opacity 1s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.photo-info {
|
|
||||||
background-color: rgba(0, 0, 0, 0.6);
|
|
||||||
padding: 10px;
|
|
||||||
position: absolute;
|
|
||||||
top: 0px;
|
|
||||||
color: white;
|
|
||||||
margin: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.photo-link {
|
|
||||||
float: right;
|
|
||||||
height: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.author-link {
|
|
||||||
margin-left: 2px;
|
|
||||||
width: 400px;
|
|
||||||
display: block;
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
text.leaflet-svg-text {
|
|
||||||
alignment-baseline: central;
|
|
||||||
dominant-baseline: central;
|
|
||||||
text-anchor: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
Vendored
-54
@@ -1,54 +0,0 @@
|
|||||||
.leaflet-label {
|
|
||||||
background: rgb(235, 235, 235);
|
|
||||||
background: rgba(235, 235, 235, 0.81);
|
|
||||||
background-clip: padding-box;
|
|
||||||
border-color: #777;
|
|
||||||
border-color: rgba(0,0,0,0.25);
|
|
||||||
border-radius: 4px;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 4px;
|
|
||||||
color: #111;
|
|
||||||
display: block;
|
|
||||||
font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 1px 6px;
|
|
||||||
position: absolute;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
pointer-events: none;
|
|
||||||
white-space: nowrap;
|
|
||||||
z-index: 6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-label.leaflet-clickable {
|
|
||||||
cursor: pointer;
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-label:before,
|
|
||||||
.leaflet-label:after {
|
|
||||||
border-top: 6px solid transparent;
|
|
||||||
border-bottom: 6px solid transparent;
|
|
||||||
content: none;
|
|
||||||
position: absolute;
|
|
||||||
top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-label:before {
|
|
||||||
border-right: 6px solid black;
|
|
||||||
border-right-color: inherit;
|
|
||||||
left: -10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-label:after {
|
|
||||||
border-left: 6px solid black;
|
|
||||||
border-left-color: inherit;
|
|
||||||
right: -10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-label-right:before,
|
|
||||||
.leaflet-label-left:after {
|
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
Vendored
+2
@@ -0,0 +1,2 @@
|
|||||||
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e():"function"==typeof define&&define.amd?define(e):e()}(0,function(){"use strict";function t(t,e){return e={exports:{}},t(e,e.exports),e.exports}var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=t(function(t){!function(e){function n(t,e){function n(t){return e.bgcolor&&(t.style.backgroundColor=e.bgcolor),e.width&&(t.style.width=e.width+"px"),e.height&&(t.style.height=e.height+"px"),e.style&&Object.keys(e.style).forEach(function(n){t.style[n]=e.style[n]}),t}return e=e||{},s(e),Promise.resolve(t).then(function(t){return u(t,e.filter,!0)}).then(c).then(d).then(n).then(function(n){return g(n,e.width||h.width(t),e.height||h.height(t))})}function i(t,e){return l(t,e||{}).then(function(e){return e.getContext("2d").getImageData(0,0,h.width(t),h.height(t)).data})}function o(t,e){return l(t,e||{}).then(function(t){return t.toDataURL()})}function r(t,e){return e=e||{},l(t,e).then(function(t){return t.toDataURL("image/jpeg",e.quality||1)})}function a(t,e){return l(t,e||{}).then(h.canvasToBlob)}function s(t){void 0===t.imagePlaceholder?w.impl.options.imagePlaceholder=M.imagePlaceholder:w.impl.options.imagePlaceholder=t.imagePlaceholder,void 0===t.cacheBust?w.impl.options.cacheBust=M.cacheBust:w.impl.options.cacheBust=t.cacheBust}function l(t,e){function i(t){var n=document.createElement("canvas");if(n.width=e.width||h.width(t),n.height=e.height||h.height(t),e.bgcolor){var i=n.getContext("2d");i.fillStyle=e.bgcolor,i.fillRect(0,0,n.width,n.height)}return n}return n(t,e).then(h.makeImage).then(h.delay(100)).then(function(e){var n=i(t);return n.getContext("2d").drawImage(e,0,0),n})}function u(t,e,n){function i(t){return t instanceof HTMLCanvasElement?h.makeImage(t.toDataURL()):t.cloneNode(!1)}function o(t,e,n){var i=t.childNodes;return 0===i.length?Promise.resolve(e):function(t,e,n){var i=Promise.resolve();return e.forEach(function(e){i=i.then(function(){return u(e,n)}).then(function(e){e&&t.appendChild(e)})}),i}(e,h.asArray(i),n).then(function(){return e})}function r(t,e){function n(){!function(t,e){t.cssText?e.cssText=t.cssText:function(t,e){h.asArray(t).forEach(function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))})}(t,e)}(window.getComputedStyle(t),e.style)}function i(){function n(n){var i=window.getComputedStyle(t,n),o=i.getPropertyValue("content");if(""!==o&&"none"!==o){var r=h.uid();e.className=e.className+" "+r;var a=document.createElement("style");a.appendChild(function(t,e,n){var i="."+t+":"+e,o=n.cssText?function(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}(n):function(t){function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}return h.asArray(t).map(e).join("; ")+";"}(n);return document.createTextNode(i+"{"+o+"}")}(r,n,i)),e.appendChild(a)}}[":before",":after"].forEach(function(t){n(t)})}function o(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function r(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach(function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)}))}return e instanceof Element?Promise.resolve().then(n).then(i).then(o).then(r).then(function(){return e}):e}return n||!e||e(t)?Promise.resolve(t).then(i).then(function(n){return o(t,n,e)}).then(function(e){return r(t,e)}):Promise.resolve()}function c(t){return p.resolveAll().then(function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t})}function d(t){return f.inlineAll(t).then(function(){return t})}function g(t,e,n){return Promise.resolve(t).then(function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)}).then(h.escapeXhtml).then(function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"}).then(function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+n+'">'+t+"</svg>"}).then(function(t){return"data:image/svg+xml;charset=utf-8,"+t})}var h=function(){function t(){var t="application/font-woff",e="image/jpeg";return{woff:t,woff2:t,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:e,jpeg:e,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function e(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function n(n){var i=e(n).toLowerCase();return t()[i]||""}function i(t){return-1!==t.search(/^(data:)/)}function o(t){return new Promise(function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),i=n.length,o=new Uint8Array(i),r=0;r<i;r++)o[r]=n.charCodeAt(r);e(new Blob([o],{type:"image/png"}))})}function r(t){return t.toBlob?new Promise(function(e){t.toBlob(e)}):o(t)}function a(t,e){var n=document.implementation.createHTMLDocument(),i=n.createElement("base"Line truncated
|
||||||
|
//# sourceMappingURL=bundle.js.map
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"bundle.js","sources":["../node_modules/dom-to-image/dist/dom-to-image.min.js","../node_modules/file-saver/FileSaver.js","../src/index.js"],"sourcesContent":["/*! dom-to-image 10-06-2017 */\n!function(a){\"use strict\";function b(a,b){function c(a){return b.bgcolor&&(a.style.backgroundColor=b.bgcolor),b.width&&(a.style.width=b.width+\"px\"),b.height&&(a.style.height=b.height+\"px\"),b.style&&Object.keys(b.style).forEach(function(c){a.style[c]=b.style[c]}),a}return b=b||{},g(b),Promise.resolve(a).then(function(a){return i(a,b.filter,!0)}).then(j).then(k).then(c).then(function(c){return l(c,b.width||q.width(a),b.height||q.height(a))})}function c(a,b){return h(a,b||{}).then(function(b){return b.getContext(\"2d\").getImageData(0,0,q.width(a),q.height(a)).data})}function d(a,b){return h(a,b||{}).then(function(a){return a.toDataURL()})}function e(a,b){return b=b||{},h(a,b).then(function(a){return a.toDataURL(\"image/jpeg\",b.quality||1)})}function f(a,b){return h(a,b||{}).then(q.canvasToBlob)}function g(a){\"undefined\"==typeof a.imagePlaceholder?v.impl.options.imagePlaceholder=u.imagePlaceholder:v.impl.options.imagePlaceholder=a.imagePlaceholder,\"undefined\"==typeof a.cacheBust?v.impl.options.cacheBust=u.cacheBust:v.impl.options.cacheBust=a.cacheBust}function h(a,c){function d(a){var b=document.createElement(\"canvas\");if(b.width=c.width||q.width(a),b.height=c.height||q.height(a),c.bgcolor){var d=b.getContext(\"2d\");d.fillStyle=c.bgcolor,d.fillRect(0,0,b.width,b.height)}return b}return b(a,c).then(q.makeImage).then(q.delay(100)).then(function(b){var c=d(a);return c.getContext(\"2d\").drawImage(b,0,0),c})}function i(a,b,c){function d(a){return a instanceof HTMLCanvasElement?q.makeImage(a.toDataURL()):a.cloneNode(!1)}function e(a,b,c){function d(a,b,c){var d=Promise.resolve();return b.forEach(function(b){d=d.then(function(){return i(b,c)}).then(function(b){b&&a.appendChild(b)})}),d}var e=a.childNodes;return 0===e.length?Promise.resolve(b):d(b,q.asArray(e),c).then(function(){return b})}function f(a,b){function c(){function c(a,b){function c(a,b){q.asArray(a).forEach(function(c){b.setProperty(c,a.getPropertyValue(c),a.getPropertyPriority(c))})}a.cssText?b.cssText=a.cssText:c(a,b)}c(window.getComputedStyle(a),b.style)}function d(){function c(c){function d(a,b,c){function d(a){var b=a.getPropertyValue(\"content\");return a.cssText+\" content: \"+b+\";\"}function e(a){function b(b){return b+\": \"+a.getPropertyValue(b)+(a.getPropertyPriority(b)?\" !important\":\"\")}return q.asArray(a).map(b).join(\"; \")+\";\"}var f=\".\"+a+\":\"+b,g=c.cssText?d(c):e(c);return document.createTextNode(f+\"{\"+g+\"}\")}var e=window.getComputedStyle(a,c),f=e.getPropertyValue(\"content\");if(\"\"!==f&&\"none\"!==f){var g=q.uid();b.className=b.className+\" \"+g;var h=document.createElement(\"style\");h.appendChild(d(g,c,e)),b.appendChild(h)}}[\":before\",\":after\"].forEach(function(a){c(a)})}function e(){a instanceof HTMLTextAreaElement&&(b.innerHTML=a.value),a instanceof HTMLInputElement&&b.setAttribute(\"value\",a.value)}function f(){b instanceof SVGElement&&(b.setAttribute(\"xmlns\",\"http://www.w3.org/2000/svg\"),b instanceof SVGRectElement&&[\"width\",\"height\"].forEach(function(a){var c=b.getAttribute(a);c&&b.style.setProperty(a,c)}))}return b instanceof Element?Promise.resolve().then(c).then(d).then(e).then(f).then(function(){return b}):b}return c||!b||b(a)?Promise.resolve(a).then(d).then(function(c){return e(a,c,b)}).then(function(b){return f(a,b)}):Promise.resolve()}function j(a){return s.resolveAll().then(function(b){var c=document.createElement(\"style\");return a.appendChild(c),c.appendChild(document.createTextNode(b)),a})}function k(a){return t.inlineAll(a).then(function(){return a})}function l(a,b,c){return Promise.resolve(a).then(function(a){return a.setAttribute(\"xmlns\",\"http://www.w3.org/1999/xhtml\"),(new XMLSerializer).serializeToString(a)}).then(q.escapeXhtml).then(function(a){return'<foreignObject x=\"0\" y=\"0\" width=\"100%\" height=\"100%\">'+a+\"</foreignObject>\"}).then(function(a){return'<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"'+b+'\" height=\"'+c+'\">'+a+\"</svg>\"}).then(function(a){return\"data:image/svg+xml;charset=utf-8,\"+a})}function m(){function a(){var a=\"application/font-woff\",b=\"image/jpeg\";return{woff:a,woff2:a,ttf:\"application/font-truetype\",eot:\"application/vnd.ms-fontobject\",png:\"image/png\",jpg:b,jpeg:b,gif:\"image/gif\",tiff:\"image/tiff\",svg:\"image/svg+xml\"}}function b(a){var b=/\\.([^\\.\\/]*?)$/g.exec(a);return b?b[1]:\"\"}function c(c){var d=b(c).toLowerCase();return a()[d]||\"\"}function d(a){return a.search(/^(data:)/)!==-1}function e(a){return new Promise(function(b){for(var c=window.atob(a.toDataURL().split(\",\")[1]),d=c.length,e=new Uint8Array(d),f=0;f<d;f++)e[f]=c.charCodeAt(f);b(new Blob([e],{type:\"image/png\"}))})}function f(a){return a.toBlob?new Promise(function(b){a.toBlob(b)}):e(a)}function g(a,b){var c=document.implementation.cLine truncated
|
||||||
File renamed without changes.
File renamed without changes.
|
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
Vendored
-161
@@ -1,161 +0,0 @@
|
|||||||
/* jQuery.print, version 1.0.3
|
|
||||||
* (c) Sathvik Ponangi, Doers' Guild
|
|
||||||
* Licence: CC-By (http://creativecommons.org/licenses/by/3.0/)
|
|
||||||
*--------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
(function($) {"use strict";
|
|
||||||
// A nice closure for our definitions
|
|
||||||
|
|
||||||
function getjQueryObject(string) {
|
|
||||||
// Make string a vaild jQuery thing
|
|
||||||
var jqObj = $("");
|
|
||||||
try {
|
|
||||||
jqObj = $(string).clone();
|
|
||||||
} catch(e) {
|
|
||||||
jqObj = $("<span />").html(string);
|
|
||||||
}
|
|
||||||
return jqObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isNode(o) {
|
|
||||||
/* http://stackoverflow.com/a/384380/937891 */
|
|
||||||
return !!( typeof Node === "object" ? o instanceof Node : o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$.print = $.fn.print = function() {
|
|
||||||
// Print a given set of elements
|
|
||||||
|
|
||||||
var options, $this, self = this;
|
|
||||||
|
|
||||||
// console.log("Printing", this, arguments);
|
|
||||||
|
|
||||||
if ( self instanceof $) {
|
|
||||||
// Get the node if it is a jQuery object
|
|
||||||
self = self.get(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isNode(self)) {
|
|
||||||
// If `this` is a HTML element, i.e. for
|
|
||||||
// $(selector).print()
|
|
||||||
$this = $(self);
|
|
||||||
if (arguments.length > 0) {
|
|
||||||
options = arguments[0];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (arguments.length > 0) {
|
|
||||||
// $.print(selector,options)
|
|
||||||
$this = $(arguments[0]);
|
|
||||||
if (isNode($this[0])) {
|
|
||||||
if (arguments.length > 1) {
|
|
||||||
options = arguments[1];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// $.print(options)
|
|
||||||
options = arguments[0];
|
|
||||||
$this = $("html");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// $.print()
|
|
||||||
$this = $("html");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Default options
|
|
||||||
var defaults = {
|
|
||||||
globalStyles : true,
|
|
||||||
mediaPrint : false,
|
|
||||||
stylesheet : null,
|
|
||||||
noPrintSelector : ".no-print",
|
|
||||||
iframe : true,
|
|
||||||
append : null,
|
|
||||||
prepend : null
|
|
||||||
};
|
|
||||||
// Merge with user-options
|
|
||||||
options = $.extend({}, defaults, (options || {}));
|
|
||||||
|
|
||||||
var $styles = $("");
|
|
||||||
if (options.globalStyles) {
|
|
||||||
// Apply the stlyes from the current sheet to the printed page
|
|
||||||
$styles = $("style, link, meta, title");
|
|
||||||
} else if (options.mediaPrint) {
|
|
||||||
// Apply the media-print stylesheet
|
|
||||||
$styles = $("link[media=print]");
|
|
||||||
}
|
|
||||||
if (options.stylesheet) {
|
|
||||||
// Add a custom stylesheet if given
|
|
||||||
$styles = $.merge($styles, $('<link rel="stylesheet" href="' + options.stylesheet + '">'));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a copy of the element to print
|
|
||||||
var copy = $this.clone();
|
|
||||||
// Wrap it in a span to get the HTML markup string
|
|
||||||
copy = $("<span/>").append(copy);
|
|
||||||
// Remove unwanted elements
|
|
||||||
copy.find(options.noPrintSelector).remove();
|
|
||||||
// Add in the styles
|
|
||||||
copy.append($styles.clone());
|
|
||||||
// Appedned content
|
|
||||||
copy.append(getjQueryObject(options.append));
|
|
||||||
// Prepended content
|
|
||||||
copy.prepend(getjQueryObject(options.prepend));
|
|
||||||
// Get the HTML markup string
|
|
||||||
var content = copy.html();
|
|
||||||
// Destroy the copy
|
|
||||||
copy.remove();
|
|
||||||
|
|
||||||
var w, wdoc;
|
|
||||||
if (options.iframe) {
|
|
||||||
// Use an iframe for printing
|
|
||||||
try {
|
|
||||||
var $iframe = $(options.iframe + "");
|
|
||||||
var iframeCount = $iframe.length;
|
|
||||||
if (iframeCount === 0) {
|
|
||||||
// Create a new iFrame if none is given
|
|
||||||
$iframe = $('<iframe height="0" width="0" border="0" wmode="Opaque"/>').prependTo('body').css({
|
|
||||||
"position" : "absolute",
|
|
||||||
"top" : -999,
|
|
||||||
"left" : -999
|
|
||||||
});
|
|
||||||
}
|
|
||||||
w = $iframe.get(0);
|
|
||||||
w = w.contentWindow || w.contentDocument || w;
|
|
||||||
wdoc = w.document || w.contentDocument || w;
|
|
||||||
wdoc.open();
|
|
||||||
wdoc.write(content);
|
|
||||||
wdoc.close();
|
|
||||||
setTimeout(function() {
|
|
||||||
// Fix for IE : Allow it to render the iframe
|
|
||||||
w.focus();
|
|
||||||
w.print();
|
|
||||||
setTimeout(function() {
|
|
||||||
// Fix for IE
|
|
||||||
if (iframeCount === 0) {
|
|
||||||
// Destroy the iframe if created here
|
|
||||||
$iframe.remove();
|
|
||||||
}
|
|
||||||
}, 100);
|
|
||||||
}, 250);
|
|
||||||
} catch (e) {
|
|
||||||
// Use the pop-up method if iframe fails for some reason
|
|
||||||
console.error("Failed to print from iframe", e.stack, e.message);
|
|
||||||
w = window.open();
|
|
||||||
w.document.write(content);
|
|
||||||
w.document.close();
|
|
||||||
w.focus();
|
|
||||||
w.print();
|
|
||||||
w.close();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Use a new window for printing
|
|
||||||
w = window.open();
|
|
||||||
w.document.write(content);
|
|
||||||
w.document.close();
|
|
||||||
w.focus();
|
|
||||||
w.print();
|
|
||||||
w.close();
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
})(jQuery);
|
|
||||||
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
/* @license
|
||||||
|
* jQuery.print, version 1.6.0
|
||||||
|
* (c) Sathvik Ponangi, Doers' Guild
|
||||||
|
* Licence: CC-By (http://creativecommons.org/licenses/by/3.0/)
|
||||||
|
*--------------------------------------------------------------------------*/
|
||||||
|
!function(e){"use strict";function t(t,n,r){for(var o=e(t),i=o.clone(n,r),a=o.find("textarea").add(o.filter("textarea")),l=i.find("textarea").add(i.filter("textarea")),c=o.find("select").add(o.filter("select")),d=i.find("select").add(i.filter("select")),f=0,s=a.length;f<s;++f)e(l[f]).val(e(a[f]).val());for(f=0,s=c.length;f<s;++f)for(var p=0,u=c[f].options.length;p<u;++p)!0===c[f].options[p].selected&&(d[f].options[p].selected=!0);return i}function n(n){var r=e("");try{r=t(n)}catch(t){r=e("<span />").html(n)}return r}function r(t,n,r){var o=e.Deferred();try{var i=(t=t.contentWindow||t.contentDocument||t).document||t.contentDocument||t;r.doctype&&i.write(r.doctype),i.write(n),i.close();var a=!1,l=function(){if(!a){t.focus();try{t.document.execCommand("print",!1,null)||t.print(),e("body").focus()}catch(e){t.print()}t.close(),a=!0,o.resolve()}};e(t).on("load",l),setTimeout(l,r.timeout)}catch(e){o.reject(e)}return o}function o(e,t){return r(window.open(),e,t).always(function(){try{t.deferred.resolve()}catch(e){console.warn("Error notifying deferred",e)}})}function i(e){return!!("object"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}e.print=e.fn.print=function(){var a,l,c=this;c instanceof e&&(c=c.get(0)),i(c)?(l=e(c),arguments.length>0&&(a=arguments[0])):arguments.length>0?i((l=e(arguments[0]))[0])?arguments.length>1&&(a=arguments[1]):(a=arguments[0],l=e("html")):l=e("html");var d={globalStyles:!0,mediaPrint:!1,stylesheet:null,noPrintSelector:".no-print",iframe:!0,append:null,prepend:null,manuallyCopyFormValues:!0,deferred:e.Deferred(),timeout:750,title:null,doctype:"<!doctype html>"};a=e.extend({},d,a||{});var f=e("");a.globalStyles?f=e("style, link, meta, base, title"):a.mediaPrint&&(f=e("link[media=print]")),a.stylesheet&&(f=e.merge(f,e('<link rel="stylesheet" href="'+a.stylesheet+'">')));var s=t(l);if((s=e("<span/>").append(s)).find(a.noPrintSelector).remove(),s.append(t(f)),a.title){var p=e("title",s);0===p.length&&(p=e("<title />"),s.append(p)),p.text(a.title)}s.append(n(a.append)),s.prepend(n(a.prepend)),a.manuallyCopyFormValues&&(s.find("input").each(function(){var t=e(this);t.is("[type='radio']")||t.is("[type='checkbox']")?t.prop("checked")&&t.attr("checked","checked"):t.attr("value",t.val())}),s.find("select").each(function(){e(this).find(":selected").attr("selected","selected")}),s.find("textarea").each(function(){var t=e(this);t.text(t.val())}));var u,h,m,y,v=s.html();try{a.deferred.notify("generated_markup",v,s)}catch(e){console.warn("Error notifying deferred",e)}if(s.remove(),a.iframe)try{u=v,m=e((h=a).iframe+""),0===(y=m.length)&&(m=e('<iframe height="0" width="0" border="0" wmode="Opaque"/>').prependTo("body").css({position:"absolute",top:-999,left:-999})),r(m.get(0),u,h).done(function(){setTimeout(function(){0===y&&m.remove()},1e3)}).fail(function(e){console.error("Failed to print from iframe",e),o(u,h)}).always(function(){try{h.deferred.resolve()}catch(e){console.warn("Error notifying deferred",e)}})}catch(e){console.error("Failed to print from iframe",e.stack,e.message),o(v,a)}else o(v,a);return this}}(jQuery);
|
||||||
-5
@@ -1,5 +0,0 @@
|
|||||||
/*!
|
|
||||||
* TableSorter 2.16.2 min - Client-side table sorting with ease!
|
|
||||||
* Copyright (c) 2007 Christian Bach
|
|
||||||
*/
|
|
||||||
!function(g){g.extend({tablesorter:new function(){function d(){var a=arguments[0],b=1<arguments.length?Array.prototype.slice.call(arguments):a;if("undefined"!==typeof console&&"undefined"!==typeof console.log)console[/error/i.test(a)?"error":/warn/i.test(a)?"warn":"log"](b);else alert(b)}function u(a,b){d(a+" ("+((new Date).getTime()-b.getTime())+"ms)")}function n(a){for(var b in a)return!1;return!0}function p(a,b,c){if(!b)return"";var h=a.config,e=h.textExtraction||"",f="",f="basic"===e?g(b).attr(h.textAttribute)|| b.textContent||b.innerText||g(b).text()||"":"function"===typeof e?e(b,a,c):"object"===typeof e&&e.hasOwnProperty(c)?e[c](b,a,c):b.textContent||b.innerText||g(b).text()||"";return g.trim(f)}function s(a){var b=a.config,c=b.$tbodies=b.$table.children("tbody:not(."+b.cssInfoBlock+")"),h,e,t,k,l,m,g,n,w=0,q="",r=c.length;if(0===r)return b.debug?d("Warning: *Empty table!* Not building a parser cache"):"";b.debug&&(n=new Date,d("Detecting parsers for each column"));for(e=[];w<r;){h=c[w].rows;if(h[w])for(t= h[w].cells.length,k=0;k<t;k++){l=b.$headers.filter(":not([colspan])");l=l.add(b.$headers.filter('[colspan="1"]')).filter('[data-column="'+k+'"]:last');m=b.headers[k];g=f.getParserById(f.getData(l,m,"sorter"));b.empties[k]=f.getData(l,m,"empty")||b.emptyTo||(b.emptyToBottom?"bottom":"top");b.strings[k]=f.getData(l,m,"string")||b.stringTo||"max";if(!g)a:{l=a;m=h;g=-1;for(var s=k,A=void 0,x=f.parsers.length,y=!1,F="",A=!0;""===F&&A;)g++,m[g]?(y=m[g].cells[s],F=p(l,y,s),l.config.debug&&d("Checking if value was empty on row "+ g+", column: "+s+': "'+F+'"')):A=!1;for(;0<=--x;)if((A=f.parsers[x])&&"text"!==A.id&&A.is&&A.is(F,l,y)){g=A;break a}g=f.getParserById("text")}b.debug&&(q+="column:"+k+"; parser:"+g.id+"; string:"+b.strings[k]+"; empty: "+b.empties[k]+"\n");e.push(g)}w+=e.length?r:1}b.debug&&(d(q?q:"No parsers detected"),u("Completed detecting parsers",n));b.parsers=e}function x(a){var b,c,h,e,t,k,l,m,z,n,w,q=a.config,r=q.$table.children("tbody"),s=q.parsers;q.cache={};if(!s)return q.debug?d("Warning: *Empty table!* Not building a cache"): "";q.debug&&(m=new Date);q.showProcessing&&f.isProcessing(a,!0);for(t=0;t<r.length;t++)if(w=[],b=q.cache[t]={normalized:[]},!r.eq(t).hasClass(q.cssInfoBlock)){z=r[t]&&r[t].rows.length||0;for(h=0;h<z;++h)if(n={child:[]},k=g(r[t].rows[h]),l=[],k.hasClass(q.cssChildRow)&&0!==h)c=b.normalized.length-1,b.normalized[c][q.columns].$row=b.normalized[c][q.columns].$row.add(k),k.prev().hasClass(q.cssChildRow)||k.prev().addClass(f.css.cssHasChild),n.child[c]=g.trim(k[0].textContent||k[0].innerText||k.text()|| "");else{n.$row=k;n.order=h;for(e=0;e<q.columns;++e)"undefined"===typeof s[e]?q.debug&&d("No parser found for cell:",k[0].cells[e],"does it have a header?"):(c=p(a,k[0].cells[e],e),c=s[e].format(c,a,k[0].cells[e],e),l.push(c),"numeric"===(s[e].type||"").toLowerCase()&&(w[e]=Math.max(Math.abs(c)||0,w[e]||0)));l[q.columns]=n;b.normalized.push(l)}b.colMax=w}q.showProcessing&&f.isProcessing(a);q.debug&&u("Building cache for "+z+" rows",m)}function y(a,b){var c=a.config,h=c.widgetOptions,e=a.tBodies,t= [],k=c.cache,d,m,z,p,w,q;if(n(k))return c.appender?c.appender(a,t):a.isUpdating?c.$table.trigger("updateComplete",a):"";c.debug&&(q=new Date);for(w=0;w<e.length;w++)if(d=g(e[w]),d.length&&!d.hasClass(c.cssInfoBlock)){z=f.processTbody(a,d,!0);d=k[w].normalized;m=d.length;for(p=0;p<m;p++)t.push(d[p][c.columns].$row),c.appender&&(!c.pager||c.pager.removeRows&&h.pager_removeRows||c.pager.ajax)||z.append(d[p][c.columns].$row);f.processTbody(a,z,!1)}c.appender&&c.appender(a,t);c.debug&&u("Rebuilt table", q);b||c.appender||f.applyWidget(a);a.isUpdating&&c.$table.trigger("updateComplete",a)}function C(a){return/^d/i.test(a)||1===a}function D(a){var b,c,h,e,t,k,l,m=a.config;m.headerList=[];m.headerContent=[];m.debug&&(l=new Date);m.columns=f.computeColumnIndex(m.$table.children("thead, tfoot").children("tr"));e=m.cssIcon?'<i class="'+(m.cssIcon===f.css.icon?f.css.icon:m.cssIcon+" "+f.css.icon)+'"></i>':"";m.$headers=g(a).find(m.selectorHeaders).each(function(a){c=g(this);b=m.headers[a];m.headerContent[a]= g(this).html();t=m.headerTemplate.replace(/\{content\}/g,g(this).html()).replace(/\{icon\}/g,e);m.onRenderTemplate&&(h=m.onRenderTemplate.apply(c,[a,t]))&&"string"===typeof h&&(t=h);g(this).html('<div class="'+f.css.headerIn+'">'+t+"</div>");m.onRenderHeader&&m.onRenderHeader.apply(c,[a]);this.column=parseInt(g(this).attr("data-column"),10);this.order=C(f.getData(c,b,"sortInitialOrder")||m.sortInitialOrder)?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=!1;k=f.getData(c,b,"lockedOrder")||!1;"undefined"!== typeof k&&!1!==k&&(this.order=this.lockedOrder=C(k)?[1,1,1]:[0,0,0]);c.addClass(f.css.header+" "+m.cssHeader);m.headerList[a]=this;c.parent().addClass(f.css.headerRow+" "+m.cssHeaderRow).attr("role","row");m.tabIndex&&c.attr("tabindex",0)}).attr({scope:"col",role:"columnheader"});B(a);m.debug&&(u("Built headers:",l),d(m.$headers))}function E(a,b,c){var h=a.config;h.$table.find(h.selLine truncated
|
|
||||||
-42
@@ -1,42 +0,0 @@
|
|||||||
/* pager wrapper, div */
|
|
||||||
.tablesorter-pager {
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
/* pager wrapper, in thead/tfoot */
|
|
||||||
td.tablesorter-pager {
|
|
||||||
background-color: #e6eeee;
|
|
||||||
margin: 0; /* needed for bootstrap .pager gets a 18px bottom margin */
|
|
||||||
}
|
|
||||||
/* pager navigation arrows */
|
|
||||||
.tablesorter-pager img {
|
|
||||||
vertical-align: middle;
|
|
||||||
margin-right: 2px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* pager output text */
|
|
||||||
.tablesorter-pager .pagedisplay {
|
|
||||||
padding: 0 5px 0 5px;
|
|
||||||
width: auto;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* pager element reset (needed for bootstrap) */
|
|
||||||
.tablesorter-pager select {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*** css used when "updateArrows" option is true ***/
|
|
||||||
/* the pager itself gets a disabled class when the number of rows is less than the size */
|
|
||||||
.tablesorter-pager.disabled {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
/* hide or fade out pager arrows when the first or last row is visible */
|
|
||||||
.tablesorter-pager .disabled {
|
|
||||||
/* visibility: hidden */
|
|
||||||
opacity: 0.5;
|
|
||||||
filter: alpha(opacity=50);
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/* tablesorter pager plugin updated 4/23/2014 (v2.16.0) */
|
|
||||||
;(function(h){var k=h.tablesorter;h.extend({tablesorterPager:new function(){this.defaults={container:null,ajaxUrl:null,customAjaxUrl:function(c,a){return a},ajaxObject:{dataType:"json"},processAjaxOnInit:!0,ajaxProcessing:function(c){return[0,[],null]},output:"{startRow} to {endRow} of {totalRows} rows",updateArrows:!0,page:0,pageReset:0,size:10,savePages:!0,storageKey:"tablesorter-pager",fixedHeight:!1,countChildRows:!1,removeRows:!1,cssFirst:".first",cssPrev:".prev",cssNext:".next",cssLast:".last", cssGoto:".gotoPage",cssPageDisplay:".pagedisplay",cssPageSize:".pagesize",cssErrorRow:"tablesorter-errorRow",cssDisabled:"disabled",totalRows:0,totalPages:0,filteredRows:0,filteredPages:0,ajaxCounter:0,currentFilters:[],startRow:0,endRow:0,$size:null,last:{}};var w=this,p=function(c,a){var b=c.cssDisabled,d=!!a,f=d||0===c.page,g=Math.min(c.totalPages,c.filteredPages),d=d||c.page===g-1||0===c.totalPages;c.updateArrows&&(c.$container.find(c.cssFirst+","+c.cssPrev)[f?"addClass":"removeClass"](b).attr("aria-disabled", f),c.$container.find(c.cssNext+","+c.cssLast)[d?"addClass":"removeClass"](b).attr("aria-disabled",d))},t=function(c,a,b){var d,f,g,l=c.config;d=l.$table.hasClass("hasFilters")&&!a.ajaxUrl;g=[];f=a.size||10;g=[l.widgetOptions&&l.widgetOptions.filter_filteredRow||"filtered",l.selectorRemove];a.countChildRows&&g.push(l.cssChildRow);g.join("|");a.totalPages=Math.ceil(a.totalRows/f);a.filteredRows=d?0:a.totalRows;a.filteredPages=a.totalPages;d&&(h.each(l.cache[0].normalized,function(e,c){a.filteredRows+= a.regexRows.test(c[l.columns].$row[0].className)?0:1}),a.filteredPages=Math.ceil(a.filteredRows/f)||0);if(0<=Math.min(a.totalPages,a.filteredPages)&&(g=a.size*a.page>a.filteredRows,a.startRow=g?1:0===a.filteredRows?0:a.size*a.page+1,a.page=g?0:a.page,a.endRow=Math.min(a.filteredRows,a.totalRows,a.size*(a.page+1)),d=a.$container.find(a.cssPageDisplay),g=(a.ajaxData&&a.ajaxData.output?a.ajaxData.output||a.output:a.output).replace(/\{page([\-+]\d+)?\}/gi,function(c,b){return a.totalPages?a.page+(b?parseInt(b, 10):1):0}).replace(/\{\w+(\s*:\s*\w+)?\}/gi,function(c){c=c.replace(/[{}\s]/g,"");var b=c.split(":"),d=a.ajaxData,f=/(rows?|pages?)$/i.test(c)?0:"";return 1<b.length&&d&&d[b[0]]?d[b[0]][b[1]]:a[c]||(d?d[c]:f)||f}),d.length&&(d["INPUT"===d[0].tagName?"val":"html"](g),a.$goto.length))){g="";f=Math.min(a.totalPages,a.filteredPages);for(d=1;d<=f;d++)g+="<option>"+d+"</option>";a.$goto.html(g).val(a.page+1)}p(a);a.initialized&&!1!==b&&(l.$table.trigger("pagerComplete",a),a.savePages&&k.storage&&k.storage(c, a.storageKey,{page:a.page,size:a.size}))},u=function(c,a){var b,d=c.config,f=d.$tbodies.eq(0);a.fixedHeight&&(f.find("tr.pagerSavedHeightSpacer").remove(),b=h.data(c,"pagerSavedHeight"))&&(b-=f.height(),5<b&&h.data(c,"pagerLastSize")===a.size&&f.children("tr:visible").length<a.size&&f.append('<tr class="pagerSavedHeightSpacer '+d.selectorRemove.replace(/(tr)?\./g,"")+'" style="height:'+b+'px;"></tr>'))},z=function(c,a){var b=c.config.$tbodies.eq(0);b.find("tr.pagerSavedHeightSpacer").remove();h.data(c, "pagerSavedHeight",b.height());u(c,a);h.data(c,"pagerLastSize",a.size)},v=function(c,a){if(!a.ajaxUrl){var b,d=0,f=c.config,g=f.$tbodies.eq(0).children(),h=g.length,e=a.page*a.size,m=e+a.size,n=f.widgetOptions&&f.widgetOptions.filter_filteredRow||"filtered",r=0;for(b=0;b<h;b++)g[b].className.match(n)||(r===e&&g[b].className.match(f.cssChildRow)?g[b].style.display="none":(g[b].style.display=r>=e&&r<m?"":"none",r+=g[b].className.match(f.cssChildRow+"|"+f.selectorRemove.slice(1))&&!a.countChildRows? 0:1,r===m&&"none"!==g[b].style.display&&g[b].className.match(k.css.cssHasChild)&&(d=b)));if(0<d&&g[d].className.match(k.css.cssHasChild))for(;++d<h&&g[d].className.match(f.cssChildRow);)g[d].style.display=""}},A=function(c,a){a.size=parseInt(a.$size.val(),10)||a.size;h.data(c,"pagerLastSize",a.size);p(a);a.removeRows||(v(c,a),h(c).bind("sortEnd.pager filterEnd.pager",function(){v(c,a)}))},B=function(c,a,b,d,f){if("function"===typeof b.ajaxProcessing){var g,l,e,m,n,r,s=a.config,q=s.$table,p="";g=b.ajaxProcessing(c, a)||[0,[]];c=q.find("thead th").length;k.showError(a);if(f)s.debug&&k.log("Ajax Error",d,f),k.showError(a,0===d.status?"Not connected, verify Network":404===d.status?"Requested page not found [404]":500===d.status?"Internal Server Error [500]":"parsererror"===f?"Requested JSON parse failed":"timeout"===f?"Time out error":"abort"===f?"Ajax Request aborted":"Uncaught error: "+d.statusText+" ["+d.status+"]"),s.$tbodies.eq(0).empty(),b.totalRows=0;else{h.isArray(g)?(d=isNaN(g[0])&&!isNaN(g[1]),f=g[d? 1:0],b.totalRows=isNaN(f)?b.totalRows||0:f,d=0===b.totalRows?[""]:g[d?0:1]||[],n=g[2]):(b.ajaxData=g,b.totalRows=g.total,n=g.headers,d=g.rows);r=d.length;if(d instanceof jQuery)b.processAjaxOnInit&&s.$tbodies.eq(0).empty().append(d);else if(r){for(g=0;g<r;g++){p+="<tr>";for(f=0;f<d[g].length;f++)p+=/^\s*<td/.test(d[g][f])?h.trim(d[g][f]):"<td>"+d[g][f]+"</td>";p+="</tr>"}b.processAjaxOnInit&&s.$tbodies.eq(0).htmlLine truncated
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
/*! tableSorter 2.16+ widgets - updated 4/27/2014 (v2.16.2) */
|
|
||||||
;(function(k){
|
|
||||||
var d=k.tablesorter=k.tablesorter||{};
|
|
||||||
d.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",footerRow:"",footerCells:"",icons:"",sortNone:"bootstrap-icon-unsorted",sortAsc:"icon-chevron-up glyphicon glyphicon-chevron-up",sortDesc:"icon-chevron-down glyphicon glyphicon-chevron-down",active:"",hover:"",filterRow:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content ui-corner-all",header:"ui-widget-header ui-corner-all ui-state-default", footerRow:"",footerCells:"",icons:"ui-icon",sortNone:"ui-icon-carat-2-n-s",sortAsc:"ui-icon-carat-1-n",sortDesc:"ui-icon-carat-1-s",active:"ui-state-active",hover:"ui-state-hover",filterRow:"",even:"ui-widget-content",odd:"ui-state-default"}};k.extend(d.css,{filterRow:"tablesorter-filter-row",filter:"tablesorter-filter",wrapper:"tablesorter-wrapper",resizer:"tablesorter-resizer",grip:"tablesorter-resizer-grip",sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible"});
|
|
||||||
d.storage=function(b, a,e,c){b=k(b)[0];var f,d,h=!1;f={};d=b.config;var l=k(b);b=c&&c.id||l.attr(c&&c.group||"data-table-group")||b.id||k(".tablesorter").index(l);c=c&&c.url||l.attr(c&&c.page||"data-table-page")||d&&d.fixedUrl||window.location.pathname;if("localStorage"in window)try{window.localStorage.setItem("_tmptest","temp"),h=!0,window.localStorage.removeItem("_tmptest")}catch(m){}k.parseJSON&&(h?f=k.parseJSON(localStorage[a]||"{}"):(d=document.cookie.split(/[;\s|=]/),f=k.inArray(a,d)+1,f=0!==f?k.parseJSON(d[f]|| "{}"):{}));if((e||""===e)&&window.JSON&&JSON.hasOwnProperty("stringify"))f[c]||(f[c]={}),f[c][b]=e,h?localStorage[a]=JSON.stringify(f):(e=new Date,e.setTime(e.getTime()+31536E6),document.cookie=a+"="+JSON.stringify(f).replace(/\"/g,'"')+"; expires="+e.toGMTString()+"; path=/");else return f&&f[c]?f[c][b]:""};
|
|
||||||
d.addHeaderResizeEvent=function(b,a,e){var c;e=k.extend({},{timer:250},e);var d=b.config,g=d.widgetOptions,h=function(a){g.resize_flag=!0;c=[];d.$headers.each(function(){var a=k(this),b=a.data("savedSizes")|| [0,0],e=this.offsetWidth,d=this.offsetHeight;if(e!==b[0]||d!==b[1])a.data("savedSizes",[e,d]),c.push(this)});c.length&&!1!==a&&d.$table.trigger("resize",[c]);g.resize_flag=!1};h(!1);clearInterval(g.resize_timer);if(a)return g.resize_flag=!1;g.resize_timer=setInterval(function(){g.resize_flag||h()},e.timer)};
|
|
||||||
d.addWidget({id:"uitheme",priority:10,format:function(b,a,e){var c,f,g,h=d.themes;c=a.$table;g=a.$headers;var l=a.theme||"jui",m=h[l]||h.jui,h=m.sortNone+" "+m.sortDesc+" "+m.sortAsc;a.debug&& (f=new Date);c.hasClass("tablesorter-"+l)&&a.theme!==l&&b.hasInitialized||(""!==m.even&&(e.zebra[0]+=" "+m.even),""!==m.odd&&(e.zebra[1]+=" "+m.odd),c.find("caption").addClass(m.caption),b=c.removeClass(""===a.theme?"":"tablesorter-"+a.theme).addClass("tablesorter-"+l+" "+m.table).find("tfoot"),b.length&&b.find("tr").addClass(m.footerRow).children("th, td").addClass(m.footerCells),g.addClass(m.header).not(".sorter-false").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(a){k(this)["mouseenter"=== a.type?"addClass":"removeClass"](m.hover)}),g.find("."+d.css.wrapper).length||g.wrapInner('<div class="'+d.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>'),a.cssIcon&&g.find("."+d.css.icon).addClass(m.icons),c.hasClass("hasFilters")&&g.find("."+d.css.filterRow).addClass(m.filterRow));for(c=0;c<a.columns;c++)b=a.$headers.add(a.$extraHeaders).filter('[data-column="'+c+'"]'),e=d.css.icon?b.find("."+d.css.icon):b,a.$headers.filter('[data-column="'+c+'"]:last')[0].sortDisabled? (b.removeClass(h),e.removeClass(h+" "+m.icons)):(g=b.hasClass(d.css.sortAsc)?m.sortAsc:b.hasClass(d.css.sortDesc)?m.sortDesc:b.hasClass(d.css.header)?m.sortNone:"",b[g===m.sortNone?"removeClass":"addClass"](m.active),e.removeClass(h).addClass(g));a.debug&&d.benchmark("Applying "+l+" theme",f)},remove:function(b,a,e){b=a.$table;a=a.theme||"jui";e=d.themes[a]||d.themes.jui;var c=b.children("thead").children(),f=e.sortNone+" "+e.sortDesc+" "+e.sortAsc;b.removeClass("tablesorter-"+a+" "+e.table).find(d.css.header).removeClass(e.header); c.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(e.hover+" "+f+" "+e.active).find("."+d.css.filterRow).removeClass(e.filterRow);c.find("."+d.css.icon).removeClass(e.icons)}});
|
|
||||||
d.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(b,a,e){var c,f,g,h,l,m,q,n,p=a.$table,t=a.$tbodies,v=a.sortList,u=v.length,w=e&&e.columns||["primary","secondary","tertiary"],x=w.length-1;q=w.join(" ");a.debug&&(c=new Date);for(g=0;g<t.length;g++)f=d.processTbody(b, t.eq(g),!0),h=f.children("tr"),h.each(function(){l=k(this);if("none"!==this.style.display&&(m=l.children().removeClass(q),v&&v[0]&&(m.eq(v[0][0]).addClass(w[0]),1<u)))for(n=1;n<u;n++)m.eq(v[n][0]).addClass(w[n]||w[x])}),d.processTbody(b,f,!1);b=!1!==e.columns_thead?["thead tr"]:[];!1!==e.columns_tfoot&&b.push("tfoot tr");if(b.length&&(h=p.find(b.join(",")).children().removeClass(q),u))for(n=0;n<u;n++)h.filter('[data-column="'+v[n][0]+'"]').addClass(w[n]||w[x]);a.debug&&d.benchmark("Applying Columns widget", c)},remove:function(b,a,e){var c=a.$tbodies,f=(e.columns||["primary","secondary","tertiary"]).join(" ");a.$headers.removeClass(f);a.$table.children("tfoot").children("tr").children("th, td").removeClass(f);for(a=0;a<c.length;a++)e=d.processTbody(b,c.eq(a),!0),e.children("tr").each(function(){k(this).children().removeClass(f)}),d.processTbody(b,e,!1)}});
|
|
||||||
d.addWidget({id:"filter",priority:50,options:{filter_childRows:!1,filter_columnFilters:!0,filter_cssFilter:"",filter_external:"",filter_filteredRow:"filtered", filter_formatter:null,filter_functions:null,filter_hideEmpty:!0,filter_hideFilters:!1,filter_ignoreCase:!0,filter_liveSearch:!0,filter_onlyAvail:"filter-onlyAvail",filter_placeholder:{search:"",select:""},filter_reset:null,filter_saveFilters:!1,filter_searchDelay:300,filter_selectSource:null,filter_startsWith:!1,filter_useParsedData:!1,filter_serversideFiltering:!1,filter_defaultAttrib:"data-value"},format:function(b,a,e){a.$table.hasClass("hasFilters")||d.filter.init(b,a,e)},remove:function(b,a, e){var c,f=a.$tbodies;a.$table.removeClass("hasFilters").unbind("addRows updateCell update updateRows updateComplete appendCache filterReset filterEnd search ".split(" ").join(a.namespace+"filter ")).find("."+d.css.filterRow).remove();for(a=0;a<f.length;a++)c=d.processTbody(b,f.eq(a),!0),c.children().removeClass(e.filter_filteredRow).show(),d.processTbody(b,c,!1);e.filter_reset&&k(document).undelegate(e.filter_reset,"click.tsfilter")}});
|
|
||||||
d.filter={regex:{regex:/^\/((?:\\\/|[^\/])+)\/([mig]{0,3})?$/, child:/tablesorter-childRow/,filtered:/filtered/,type:/undefined|number/,exact:/(^[\"|\'|=]+)|([\"|\'|=]+$)/g,nondigit:/[^\w,. \-()]/g,operators:/[<>=]/g},types:{regex:function(b,a,e,c){if(d.filter.regex.regex.test(a)){var f;b=d.filter.regex.regex.exec(a);try{f=RegExp(b[1],b[2]).test(c)}catch(g){f=!1}return f}return null},operators:function(b,a,e,c,f,g,h,l,k){if(/^[<>]=?/.test(a)){var q,n;q=h.config;b=d.formatFloat(a.replace(d.filter.regex.operators,""),h);e=q.parsers[g];l=b;if(k[g]||"numeric"=== e.type)q=e.format(""+a.replace(d.filter.regex.operators,""),h,q.$headers.eq(g),g),b="number"!==typeof b||""===q||isNaN(q)?b:q;q=!k[g]&&"numeric"!==e.type||isNaN(b)||!f?isNaN(c)?d.formatFloat(c.replace(d.filter.regex.nondigit,""),h):d.formatFloat(c,h):f;/>/.test(a)&&(n=/>=/.test(a)?q>=b:q>b);/</.test(a)&&(n=/<=/.test(a)?q<=b:q<b);n||""!==l||(n=!0);return n}return null},exact:function(b,a,e,c,f,g,h,l,m,q){return d.filter.regex.exact.test(a)?(b=a.replace(d.filter.regex.exact,""),q?0<=k.inArray(b,q): b==c):null},notMatch:function(b,a,e,c,d,g,h,l){return/^\!/.test(a)?(a=a.replace("!",""),b=c.search(k.trim(a)),""===a?!0:!(l.filter_startsWith?0===b:0<=b)):null},and:function(b,a,e,c){if(/\s+(AND|&&)\s+/g.test(b)){b=a.split(/(?:\s+(?:and|&&)\s+)/g);a=0<=c.search(k.trim(b[0]));for(e=b.length-1;a&&e;)a=a&&0<=c.search(k.trim(b[e])),e--;return a}return null},range:function(b,a,e,c,f,g,h,l,k){if(/\s+(-|to)\s+/.test(a)){b=h.config;var q=a.split(/(?: - | to )/);e=d.formatFloat(q[0].replace(d.filter.regex.nondigit, ""),h);l=d.formatFloat(q[1].replace(d.filter.regex.nondigit,""),h);if(k[g]||"numeric"===b.parsers[g].type)a=b.parsers[g].format(""+q[0],h,b.$headers.eq(g),g),e=""===a||isNaN(a)?e:a,a=b.parsers[g].format(""+q[1],h,b.$headers.eq(g),g),l=""===a||isNaN(a)?l:a;a=!k[g]&&"numeric"!==b.parsers[g].type||isNaN(e)||isNaN(l)?isNaN(c)?d.formatFloat(c.replace(d.filter.regex.nondigit,""),h):d.formatFloat(c,h):f;e>l&&(c=e,e=l,l=c);return a>=e&&a<=l||""===e||""===l}return null},wild:function(b,a,e,c,d,g,h,l,m,q){return/[\?|\*]/.test(a)|| /\s+OR\s+/i.test(b)?(b=h.config,a=a.replace(/\s+OR\s+/gi,"|"),!b.$headers.filter('[data-column="'+g+'"]:last').hasClass("filter-match")&&/\|/.test(a)&&(a=k.isArray(q)?"("+a+")":"^("+a+")$"),RegExp(a.replace(/\?/g,"\\S{1}").replace(/\*/g,"\\S*")).test(c)):null},fuzzy:function(b,a,e,c){if(/^~/.test(a)){b=0;e=c.length;var d=a.slice(1);for(a=0;a<e;a++)c[a]===d[b]&&(b+=1);return b===d.length?!0:!1}return null}},init:function(b,a,e){var c,f,g,h,l,m;a.debug&&(m=new Date);a.$table.addClass("hasFilters"); d.filter.regex.child=RegExp(a.cssChildRow);d.filter.regex.filtered=RegExp(e.filter_filteredRow);!1!==e.filter_columnFilters&&a.$headers.filter(".filter-false").length!==a.$headers.length&&d.filter.buildRow(b,a,e);a.$table.bind("addRows updateCell update updateRows updateComplete appendCache filterReset filterEnd search ".split(" ").join(a.namespace+"filter "),function(c,f){a.$table.find("."+d.css.filterRow).toggle(!(e.filter_hideEmpty&&k.isEmptyObject(a.cache)));/(search|filter)/.test(c.type)||(c.stopPropagation(), d.filter.buildDefault(b,!0));"filterReset"===c.type?d.filter.searching(b,[]):"filterEnd"===c.type?d.filter.buildDefault(b,!0):(f="search"===c.type?f:"updateComplete"===c.type?a.$table.data("lastSearch"):"",/(update|add)/.test(c.type)&&"updateComplete"!==c.type&&(a.lastCombinedFilter=null),d.filter.searching(b,f,!0));return!1});e.filter_reset&&(e.filter_reset instanceof k?e.filter_reset.click(function(){a.$table.trigger("filterReset")}):k(e.filter_reset).length&&k(document).undelegate(e.filter_reset, "click.tsfilter").delegate(e.filter_reset,"click.tsfilter",function(){a.$table.trigger("filterReset")}));if(e.filter_functions)for(h in e.filter_functions)if(e.filter_functions.hasOwnProperty(h)&&"string"===typeof h)if(g=a.$headers.filter('[data-column="'+h+'"]:last'),c="",!0===e.filter_functions[h]&&!g.hasClass("filter-false"))d.filter.buildSelect(b,h);else if("string"===typeof h&&!g.hasClass("filter-false")){for(f in e.filter_functions[h])"string"===typeof f&&(c+=""===c?'<option value="">'+(g.data("placeholder")|| g.attr("data-placeholder")||e.filter_placeholder.select||"")+"</option>":"",c+='<option value="'+f+'">'+f+"</option>");a.$table.find("thead").find("select."+d.css.filter+'[data-column="'+h+'"]').append(c)}d.filter.buildDefault(b,!0);d.filter.bindSearch(b,a.$table.find("."+d.css.filter),!0);e.filter_external&&d.filter.bindSearch(b,e.filter_external);e.filter_hideFilters&&d.filter.hideFilters(b,a);a.showProcessing&&a.$table.bind("filterStart"+a.namespace+"filter filterEnd"+a.namespace+"filter",function(e, c){g=c?a.$table.find("."+d.css.header).filter("[data-column]").filter(function(){return""!==c[k(this).data("column")]}):"";d.isProcessing(b,"filterStart"===e.type,c?g:"")});a.debug&&d.benchmark("Applying Filter widget",m);a.$table.bind("tablesorter-initialized pagerInitialized",function(){l=d.filter.setDefaults(b,a,e)||[];l.length&&Line truncated
|
|
||||||
d.getFilters=function(b,a,e,c){var f,g=!1,h=b?k(b)[0].config:"",l=h?h.widgetOptions:"";if(!0!==a&&l&&!l.filter_columnFilters)return k(b).data("lastSearch");if(h&&(h.$filters&&(f=h.$filters.find("."+d.css.filter)),l.filter_$externalFilters&&(f=f&&f.length?f.add(l.filter_$externalFilters):l.filter_$externalFilters),f&&f.length))for(g=e||[],b=0;b<h.columns+1;b++)a=f.filter('[data-column="'+(b===h.columns?"all":b)+'"]'),a.length&&(a=a.sort(function(a, b){return k(b).attr("data-lastSearchTime")-k(a).attr("data-lastSearchTime")}),k.isArray(e)?(c?a.slice(1):a).val(e[b]).trigger("change.tsfilter"):(g[b]=a.val()||"",a.slice(1).val(g[b])),b===h.columns&&a.length&&(l.filter_$anyMatch=a));0===g.length&&(g=!1);return g};
|
|
||||||
d.setFilters=function(b,a,e,c){var f=b?k(b)[0].config:"";b=d.getFilters(b,!0,a,c);f&&e&&(f.lastCombinedFilter=null,d.filter.searching(f.$table[0],a,c),f.$table.trigger("filterFomatterUpdate"));return!!b};
|
|
||||||
d.addWidget({id:"stickyHeaders", priority:60,options:{stickyHeaders:"",stickyHeaders_attachTo:null,stickyHeaders_offset:0,stickyHeaders_filteredToTop:!0,stickyHeaders_cloneId:"-sticky",stickyHeaders_addResizeEvent:!0,stickyHeaders_includeCaption:!0,stickyHeaders_zIndex:2},format:function(b,a,e){if(!(a.$table.hasClass("hasStickyHeaders")||0<=k.inArray("filter",a.widgets)&&!a.$table.hasClass("hasFilters"))){var c=a.$table,f=k(e.stickyHeaders_attachTo),g=c.children("thead:first"),h=f.length?f:k(window),l=g.children("tr").not(".sticky-false").children(), m="."+d.css.headerIn,q=c.find("tfoot"),n=isNaN(e.stickyHeaders_offset)?k(e.stickyHeaders_offset):"",p=f.length?0:n.length?n.height()||0:parseInt(e.stickyHeaders_offset,10)||0,t=e.$sticky=c.clone().addClass("containsStickyHeaders").css({position:f.length?"absolute":"fixed",margin:0,top:p,left:0,visibility:"hidden",zIndex:e.stickyHeaders_zIndex?e.stickyHeaders_zIndex:2}),v=t.children("thead:first").addClass(d.css.sticky+" "+e.stickyHeaders),u,w="",x=0,D="collapse"!==c.css("border-collapse")&&!/(webkit|msie)/i.test(navigator.userAgent), y=function(){p=n.length?n.height()||0:parseInt(e.stickyHeaders_offset,10)||0;x=0;D&&(x=2*parseInt(l.eq(0).css("border-left-width"),10));t.css({left:f.length?(parseInt(f.css("padding-left"),10)||0)+parseInt(a.$table.css("padding-left"),10)+parseInt(a.$table.css("margin-left"),10)+parseInt(c.css("border-left-width"),10):g.offset().left-h.scrollLeft()-x,width:c.width()});u.filter(":visible").each(function(b){b=l.filter(":visible").eq(b);var c=D&&k(this).attr("data-column")===""+parseInt(a.columns/2, 10)?1:0;k(this).css({width:b.width()-x,height:b.height()}).find(m).width(b.find(m).width()-c)})};t.attr("id")&&(t[0].id+=e.stickyHeaders_cloneId);t.find("thead:gt(0), tr.sticky-false").hide();t.find("tbody, tfoot").remove();e.stickyHeaders_includeCaption?t.find("caption").css("margin-left","-1px"):t.find("caption").remove();u=v.children().children();t.css({height:0,width:0,padding:0,margin:0,border:0});u.find("."+d.css.resizer).remove();c.addClass("hasStickyHeaders").bind("pagerComplete.tsSticky", function(){y()});d.bindEvents(b,v.children().children(".tablesorter-header"));c.after(t);h.bind("scroll.tsSticky resize.tsSticky",function(a){if(c.is(":visible")){var b=c.offset(),d=e.stickyHeaders_includeCaption?0:c.find("caption").outerHeight(!0),d=(f.length?f.offset().top:h.scrollTop())+p-d,k=c.height()-(t.height()+(q.height()||0)),b=d>b.top&&d<b.top+k?"visible":"hidden",d={visibility:b};f.length?d.top=f.scrollTop():d.left=g.offset().left-h.scrollLeft()-x;t.removeClass("tablesorter-sticky-visible tablesorter-sticky-hidden").addClass("tablesorter-sticky-"+ b).css(d);if(b!==w||"resize"===a.type)y(),w=b}});e.stickyHeaders_addResizeEvent&&d.addHeaderResizeEvent(b);c.hasClass("hasFilters")&&(c.bind("filterEnd",function(){var b=k(document.activeElement).closest("td"),b=b.parent().children().index(b);t.hasClass(d.css.stickyVis)&&e.stickyHeaders_filteredToTop&&(window.scrollTo(0,c.position().top),0<=b&&a.$filters&&a.$filters.eq(b).find("a, select, input").filter(":visible").focus())}),d.filter.bindSearch(c,u.find("."+d.css.filter)));c.trigger("stickyHeadersInit")}}, remove:function(b,a,e){a.$table.removeClass("hasStickyHeaders").unbind("pagerComplete.tsSticky").find("."+d.css.sticky).remove();e.$sticky&&e.$sticky.length&&e.$sticky.remove();k(".hasStickyHeaders").length||k(window).unbind("scroll.tsSticky resize.tsSticky");d.addHeaderResizeEvent(b,!1)}});
|
|
||||||
d.addWidget({id:"resizable",priority:40,options:{resizable:!0,resizable_addLastColumn:!1,resizable_widths:[]},format:function(b,a,e){if(!a.$table.hasClass("hasResizable")){a.$table.addClass("hasResizable");d.resizableReset(b, !0);var c,f,g,h,l={},m=a.$table,q=0,n=null,p=null,t=20>Math.abs(m.parent().width()-m.width()),v=function(){d.storage&&n&&p&&(l={},l[n.index()]=n.width(),l[p.index()]=p.width(),n.width(l[n.index()]),p.width(l[p.index()]),!1!==e.resizable&&d.storage(b,"tablesorter-resizable",a.$headers.map(function(){return k(this).width()}).get()));q=0;n=p=null;k(window).trigger("resize")};if(l=d.storage&&!1!==e.resizable?d.storage(b,"tablesorter-resizable"):{})for(h in l)!isNaN(h)&&h<a.$headers.length&&a.$headers.eq(h).width(l[h]); c=m.children("thead:first").children("tr");c.children().each(function(){var b;b=k(this);h=b.attr("data-column");b="false"===d.getData(b,a.headers[h],"resizable");c.children().filter('[data-column="'+h+'"]')[b?"addClass":"removeClass"]("resizable-false")});c.each(function(){g=k(this).children().not(".resizable-false");k(this).find("."+d.css.wrapper).length||g.wrapInner('<div class="'+d.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>');e.resizable_addLastColumn||(g=g.slice(0, -1));f=f?f.add(g):g});f.each(function(){var a=k(this),b=parseInt(a.css("padding-right"),10)+10;a.find("."+d.css.wrapper).append('<div class="'+d.css.resizer+'" style="cursor:w-resize;position:absolute;z-index:1;right:-'+b+'px;top:0;height:100%;width:20px;"></div>')}).bind("mousemove.tsresize",function(a){if(0!==q&&n){var b=a.pageX-q,c=n.width();n.width(c+b);n.width()!==c&&t&&p.width(p.width()-b);q=a.pageX}}).bind("mouseup.tsresize",function(){v()}).find("."+d.css.resizer+",."+d.css.grip).bind("mousedown", function(b){n=k(b.target).closest("th");var c=a.$headers.filter('[data-column="'+n.attr("data-column")+'"]');1<c.length&&(n=n.add(c));p=b.shiftKey?n.parent().find("th").not(".resizable-false").filter(":last"):n.nextAll(":not(.resizable-false)").eq(0);q=b.pageX});m.find("thead:first").bind("mouseup.tsresize mouseleave.tsresize",function(){v()}).bind("contextmenu.tsresize",function(){d.resizableReset(b);var a=k.isEmptyObject?k.isEmptyObject(l):!0;l={};return a})}},remove:function(b,a){a.$table.removeClass("hasResizable").children("thead").unbind("mouseup.tsresize mouseleave.tsresize contextmenu.tsresize").children("tr").children().unbind("mousemove.tsresize mouseup.tsresize").find("."+ d.css.resizer+",."+d.css.grip).remove();d.resizableReset(b)}});
|
|
||||||
d.resizableReset=function(b,a){k(b).each(function(){var e,c=this.config,f=c&&c.widgetOptions;b&&c&&(c.$headers.each(function(a){e=k(this);f.resizable_widths[a]?e.css("width",f.resizable_widths[a]):e.hasClass("resizable-false")||e.css("width","")}),d.storage&&!a&&d.storage(this,"tablesorter-resizable",{}))})};
|
|
||||||
d.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(b,a,d,c){a.format(b,d,c,!0)},format:function(b,a,e,c){var f, g=a.$table;e=!1!==e.saveSort;var h={sortList:a.sortList};a.debug&&(f=new Date);g.hasClass("hasSaveSort")?e&&b.hasInitialized&&d.storage&&(d.storage(b,"tablesorter-savesort",h),a.debug&&d.benchmark("saveSort widget: Saving last sort: "+a.sortList,f)):(g.addClass("hasSaveSort"),h="",d.storage&&(h=(e=d.storage(b,"tablesorter-savesort"))&&e.hasOwnProperty("sortList")&&k.isArray(e.sortList)?e.sortList:"",a.debug&&d.benchmark('saveSort: Last sort loaded: "'+h+'"',f),g.bind("saveSortReset",function(a){a.stopPropagation(); d.storage(b,"tablesorter-savesort","")})),c&&h&&0<h.length?a.sortList=h:b.hasInitialized&&h&&0<h.length&&g.trigger("sorton",[h]))},remove:function(b){d.storage&&d.storage(b,"tablesorter-savesort","")}})
|
|
||||||
})(jQuery);
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
/*
|
|
||||||
@preserve Leaflet Data Visualization Framework, a JavaScript library for creating thematic maps using Leaflet
|
|
||||||
(c) 2013, Scott Fairgrieve, HumanGeo
|
|
||||||
*/
|
|
||||||
L.LinearFunction=L.Class.extend({initialize:function(t,e,i){this.setOptions(i),this.setRange(t,e)},_calculateParameters:function(t,e){0===this._xRange?(this._slope=0,this._b=t.y):(this._slope=(e.y-t.y)/this._xRange,this._b=t.y-this._slope*t.x)},_arrayToPoint:function(t){return{x:t[0],y:t[1]}},setOptions:function(t){L.Util.setOptions(this,t),this._preProcess=this.options.preProcess,this._postProcess=this.options.postProcess},getBounds:function(){var t=Math.min(this._minPoint.x,this._maxPoint.x),e=Math.max(this._minPoint.x,this._maxPoint.x),i=Math.min(this._minPoint.y,this._maxPoint.y),n=Math.max(this._minPoint.y,this._maxPoint.y);return[new L.Point(t,i),new L.Point(e,n)]},setRange:function(t,e){return t=t instanceof Array?this._arrayToPoint(t):t,e=e instanceof Array?this._arrayToPoint(e):e,this._minPoint=t,this._maxPoint=e,this._xRange=e.x-t.x,this._calculateParameters(t,e),this},setMin:function(t){return this.setRange(t,this._maxPoint),this},setMax:function(t){return this.setRange(this._minPoint,t),this},setPreProcess:function(t){return this._preProcess=t,this},setPostProcess:function(t){return this._postProcess=t,this},evaluate:function(t){var e;return this._preProcess&&(t=this._preProcess(t)),e=Number((this._slope*t).toFixed(6))+Number(this._b.toFixed(6)),this._postProcess&&(e=this._postProcess(e)),e},random:function(){var t=Math.random()*this._xRange+this._minPoint.x;return this.evaluate(t)},sample:function(t){t=Math.max(t,2);for(var e=t-1,i=this._xRange/e,n=this._minPoint.x,a=[];this._maxPoint.x>=n;)a.push(this.evaluate(n)),n+=i;return a},samplePoints:function(t){t=Math.max(t,2);for(var e=t-1,i=this._xRange/e,n=this._minPoint.x,a=[];this._maxPoint.x>=n;)a.push(new L.Point(n,this.evaluate(n))),n+=i;return a},getIntersectionPoint:function(t){var e=null;if(this._slope!==t._slope){var i=(this._b-t._b)/(t._slope-this._slope),n=this.evaluate(i);e=new L.Point(i,n)}return e}}),L.ColorFunction=L.LinearFunction.extend({options:{alpha:1,includeAlpha:!1},initialize:function(t,e,i){L.Util.setOptions(this,i),this._parts=[],this._dynamicPart=null,this._outputPrecision=0,this._prefix=null,this._formatOutput=function(t){return t.toFixed(this._outputPrecision)},this._mapOutput=function(t){for(var e=[],i=0;this._parts.length>i;++i){var n=this._parts[i];e.push(t[n])}return this.options.includeAlpha&&e.push(this.options.alpha),e},this._getColorString=function(t){t=this._formatOutput(t),this.options[this._dynamicPart]=t;var e=this._mapOutput(this.options);return this._writeColor(this._prefix,e)},this._writeColor=function(t,e){return this.options.includeAlpha&&(t+="a"),t+"("+e.join(",")+")"};var n=function(t){i&&i.postProcess&&(t=i.postProcess.call(this,t));var e=this._getColorString(t);return L.Browser.ie&&e.indexOf("hsl")>-1&&(e=L.hslColor(e).toRGBString()),e};L.LinearFunction.prototype.initialize.call(this,t,e,{preProcess:this.options.preProcess,postProcess:n})}}),L.HSLColorFunction=L.ColorFunction.extend({initialize:function(t,e,i){L.ColorFunction.prototype.initialize.call(this,t,e,i),this._parts=["outputHue","outputSaturation","outputLuminosity"],this._prefix="hsl",this._outputPrecision=2}}),L.RGBColorFunction=L.ColorFunction.extend({initialize:function(t,e,i){L.ColorFunction.prototype.initialize.call(this,t,e,i),this._parts=["outputRed","outputBlue","outputGreen"],this._prefix="rgb",this._outputPrecision=0}}),L.RGBRedFunction=L.LinearFunction.extend({options:{outputGreen:0,outputBlue:0},initialize:function(t,e,i){L.RGBColorFunction.prototype.initialize.call(this,t,e,i),this._dynamicPart="outputRed"}}),L.RGBBlueFunction=L.LinearFunction.extend({options:{outputRed:0,outputGreen:0},initialize:function(t,e,i){L.RGBColorFunction.prototype.initialize.call(this,t,e,i),this._dynamicPart="outputBlue"}}),L.RGBGreenFunction=L.LinearFunction.extend({options:{outputRed:0,outputBlue:0},initialize:function(t,e,i){L.RGBColorFunction.prototype.initialize.call(this,t,e,i),this._dynamicPart="outputGreen"}}),L.RGBColorBlendFunction=L.LinearFunction.extend({initialize:function(t,e,i,n){i=new L.RGBColor(i),n=new L.RGBColor(n);var a=i.r(),o=n.r(),r=i.g(),s=n.g(),f=i.b(),d=n.b();this._minX=t,this._maxX=e,this._redFunction=new L.LinearFunction(new L.Point(t,a),new L.Point(e,o)),this._greenFunction=new L.LinearFunction(new L.Point(t,r),new L.Point(e,s)),this._blueFunction=new L.LinearFunction(new L.Point(t,f),new L.Point(e,d))},getBounds:function(){var t=this._redFunction.getBounds(),e=this._greenFunction.getBounds(),i=this._blueFunction.getBounds(),n=Math.min(t[0].y,e[0].y,i[0].y),a=Math.max(t[0].y,e[0].y,i[0].y);return[new L.Point(t[0].x,n),new L.Point(t[1].x,a)]},evaluate:function(t){return new L.RGBColor([this._redFunction.evaluate(t),this._greenFunction.evaluate(t),this._blueFunction.evaluate(t)]).toRGBString()}}),L.HSLHueFunction=L.HSLColorFunction.extend({options:{outputSaturation:"100%",outputLuminosity:"50%"},initialize:function(t,e,i){L.HSLColorFunction.prototype.initialize.call(this,t,e,i),this._dynamicPart="outputHue"}}),L.HSLSaturaLine truncated
|
|
||||||
},luminosityPalette:function(t,e,i,n,a){return new L.HSLLuminosityFunction(new L.Point(t,i),new L.Point(e,n),a)},saturationPalette:function(t,e,i,n,a){return new L.HSLSaturationFunction(new L.Point(t,i),new L.Point(e,n),a)},rgbBlendPalette:function(t,e,i,n,a){return new L.RGBColorBlendFunction(t,e,i,n,a)},hslBlendPalette:function(t,e,i,n,a){return new L.HSLColorBlendFunction(t,e,i,n,a)},customColorPalette:function(t,e,i,n){return new L.CustomColorFunction(t,e,i,n)}},L.DynamicColorPalettes={rainbow:{text:"Rainbow",getPalette:function(t,e){return L.Palettes.huePalette(t,e,0,300)}},greentored:{text:"Green - Red",getPalette:function(t,e){return L.Palettes.huePalette(t,e,120,0)}},yellowtored:{text:"Yellow - Red",getPalette:function(t,e){return L.Palettes.huePalette(t,e,60,0)}},orangetored:{text:"Orange - Red",getPalette:function(t,e){return L.Palettes.huePalette(t,e,30,0)}},redtopurple:{text:"Red - Purple",getPalette:function(t,e){return L.Palettes.huePalette(t,e,360,270)}},bluetored:{text:"Blue - Red",getPalette:function(t,e){return L.Palettes.huePalette(t,e,210,360)}},bluetored2:{text:"Blue - Red 2",getPalette:function(t,e){return L.Palettes.huePalette(t,e,180,0)}},whitetored:{text:"White - Red",getPalette:function(t,e){return L.Palettes.luminosityPalette(t,e,1,.5,{outputHue:0})}},whitetoorange:{text:"White - Orange",getPalette:function(t,e){return L.Palettes.luminosityPalette(t,e,1,.5,{outputHue:30})}},whitetoyellow:{text:"White - Yellow",getPalette:function(t,e){return L.Palettes.luminosityPalette(t,e,1,.5,{outputHue:60})}},whitetogreen:{text:"White - Green",getPalette:function(t,e){return L.Palettes.luminosityPalette(t,e,1,.5,{outputHue:120})}},whitetoltblue:{text:"White - Lt. Blue",getPalette:function(t,e){return L.Palettes.luminosityPalette(t,e,1,.5,{outputHue:180})}},whitetoblue:{text:"White - Blue",getPalette:function(t,e){return L.Palettes.luminosityPalette(t,e,1,.5,{outputHue:240})}},whitetopurple:{text:"White - Purple",getPalette:function(t,e){return L.Palettes.luminosityPalette(t,e,1,.5,{outputHue:270})}},graytored:{text:"Gray - Red",getPalette:function(t,e){return L.Palettes.saturationPalette(t,e,0,1,{outputHue:0})}},graytoorange:{text:"Gray - Orange",getPalette:function(t,e){return L.Palettes.saturationPalette(t,e,0,1,{outputHue:30})}},graytoyellow:{text:"Gray - Yellow",getPalette:function(t,e){return L.Palettes.saturationPalette(t,e,0,1,{outputHue:60})}},graytogreen:{text:"Gray - Green",getPalette:function(t,e){return L.Palettes.saturationPalette(t,e,0,1,{outputHue:120})}},graytoltblue:{text:"Gray - Lt. Blue",getPalette:function(t,e){return L.Palettes.saturationPalette(t,e,0,1,{outputHue:180})}},graytoblue:{text:"Gray - Blue",getPalette:function(t,e){return L.Palettes.saturationPalette(t,e,0,1,{outputHue:240})}},graytopurple:{text:"Gray - Purple",getPalette:function(t,e){return L.Palettes.saturationPalette(t,e,0,1,{outputHue:270})}}},L.DynamicPaletteElement=L.Class.extend({initialize:function(t,e){this._key=t,this._dynamicPalette=e},generate:function(t){var e=L.DomUtil.create("div","palette"),i=t.count,n=this._dynamicPalette.getPalette(0,i-1),a=t.width,o=!0;void 0!=t.showText&&(o=t.showText),e.setAttribute("data-palette-key",this._key),this._dynamicPalette.text&&o&&(L.DomUtil.create("div","palette-text",e).innerHTML='<i class="icon-ok hidden"></i>'+this._dynamicPalette.text);var r=a/i;t.className&&L.DomUtil.addClass(e,t.className);for(var s=0;i>s;++s){var s=L.DomUtil.create("i","palette-element");for(var f in n){var d=n[f],c=d.evaluate?d.evaluate(s):d;L.StyleConverter.setCSSProperty(s,f,c)}s.style.width=r+"px",e.appendChild(s)}return e}}),L.Path.XLINK_NS="http://www.w3.org/1999/xlink";var TextFunctions=TextFunctions||{__updatePath:L.Path.prototype._updatePath,_updatePath:function(){this.__updatePath.call(this),this.options.text&&this._createText(this.options.text)},_initText:function(){this.options.text&&this._createText(this.options.text)},getTextAnchor:function(){return this._point?this._point:void 0},setTextAnchor:function(t){this._text&&(this._text.setAttribute("x",t.x),this._text.setAttribute("y",t.y))},_createText:function(t){this._text&&this._container.removeChild(this._text),this._pathDef&&this._defs.removeChild(this._pathDef);var e=function(t,e){var i="";for(var n in e)i+=n+": "+e[n]+";";return t.setAttribute("style",i),t},i=function(t,e){for(var i in e)t.setAttribute(i,e[i]);return t};this._text=this._createElement("text");var n=document.createTextNode(t.text);if(t.path){var a=t.path,o=L.Util.guid(),r=this._createElement("path");r.setAttribute("d",this._path.getAttribute("d")),r.setAttribute("id",o),this._defs||(this._defs=this._createElement("defs"),this._container.appendChild(this._defs)),this._defs.appendChild(r),this._pathDef=r;var s=this._createElement("textPath");a.startOffset&&s.setAttribute("startOffset",a.startOffset),a.attr&&i(s,a.attr),a.style&&e(s,a.style),s.setAttributeNS(L.Path.XLINK_NS,"xlink:href","#"+o),s.appendChild(n),this._text.appendChild(s)}else{this._text.appendCLine truncated
|
|
||||||
n=new L.RadialBarMarker(this._latlng,f),this.addLayer(n)}}}});
|
|
||||||
Vendored
-478
@@ -1,478 +0,0 @@
|
|||||||
/* required styles */
|
|
||||||
|
|
||||||
.leaflet-map-pane,
|
|
||||||
.leaflet-tile,
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow,
|
|
||||||
.leaflet-tile-pane,
|
|
||||||
.leaflet-tile-container,
|
|
||||||
.leaflet-overlay-pane,
|
|
||||||
.leaflet-shadow-pane,
|
|
||||||
.leaflet-marker-pane,
|
|
||||||
.leaflet-popup-pane,
|
|
||||||
.leaflet-overlay-pane svg,
|
|
||||||
.leaflet-zoom-box,
|
|
||||||
.leaflet-image-layer,
|
|
||||||
.leaflet-layer {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.leaflet-container {
|
|
||||||
overflow: hidden;
|
|
||||||
-ms-touch-action: none;
|
|
||||||
}
|
|
||||||
.leaflet-tile,
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow {
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
-webkit-user-drag: none;
|
|
||||||
}
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
/* map is broken in FF if you have max-width: 100% on tiles */
|
|
||||||
.leaflet-container img {
|
|
||||||
max-width: none !important;
|
|
||||||
}
|
|
||||||
/* stupid Android 2 doesn't understand "max-width: none" properly */
|
|
||||||
.leaflet-container img.leaflet-image-layer {
|
|
||||||
max-width: 15000px !important;
|
|
||||||
}
|
|
||||||
.leaflet-tile {
|
|
||||||
filter: inherit;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
.leaflet-tile-loaded {
|
|
||||||
visibility: inherit;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-box {
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
|
|
||||||
.leaflet-overlay-pane svg {
|
|
||||||
-moz-user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-tile-pane { z-index: 2; }
|
|
||||||
.leaflet-objects-pane { z-index: 3; }
|
|
||||||
.leaflet-overlay-pane { z-index: 4; }
|
|
||||||
.leaflet-shadow-pane { z-index: 5; }
|
|
||||||
.leaflet-marker-pane { z-index: 6; }
|
|
||||||
.leaflet-popup-pane { z-index: 7; }
|
|
||||||
|
|
||||||
.leaflet-vml-shape {
|
|
||||||
width: 1px;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
.lvml {
|
|
||||||
behavior: url(#default#VML);
|
|
||||||
display: inline-block;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* control positioning */
|
|
||||||
|
|
||||||
.leaflet-control {
|
|
||||||
position: relative;
|
|
||||||
z-index: 7;
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
.leaflet-top,
|
|
||||||
.leaflet-bottom {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 1000;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.leaflet-top {
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.leaflet-right {
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
.leaflet-bottom {
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
.leaflet-left {
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
.leaflet-control {
|
|
||||||
float: left;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
.leaflet-right .leaflet-control {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
.leaflet-top .leaflet-control {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-bottom .leaflet-control {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-left .leaflet-control {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-right .leaflet-control {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* zoom and fade animations */
|
|
||||||
|
|
||||||
.leaflet-fade-anim .leaflet-tile,
|
|
||||||
.leaflet-fade-anim .leaflet-popup {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transition: opacity 0.2s linear;
|
|
||||||
-moz-transition: opacity 0.2s linear;
|
|
||||||
-o-transition: opacity 0.2s linear;
|
|
||||||
transition: opacity 0.2s linear;
|
|
||||||
}
|
|
||||||
.leaflet-fade-anim .leaflet-tile-loaded,
|
|
||||||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
|
||||||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
}
|
|
||||||
.leaflet-zoom-anim .leaflet-tile,
|
|
||||||
.leaflet-pan-anim .leaflet-tile,
|
|
||||||
.leaflet-touching .leaflet-zoom-animated {
|
|
||||||
-webkit-transition: none;
|
|
||||||
-moz-transition: none;
|
|
||||||
-o-transition: none;
|
|
||||||
transition: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-zoom-anim .leaflet-zoom-hide {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* cursors */
|
|
||||||
|
|
||||||
.leaflet-clickable {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.leaflet-container {
|
|
||||||
cursor: -webkit-grab;
|
|
||||||
cursor: -moz-grab;
|
|
||||||
}
|
|
||||||
.leaflet-popup-pane,
|
|
||||||
.leaflet-control {
|
|
||||||
cursor: auto;
|
|
||||||
}
|
|
||||||
.leaflet-dragging .leaflet-container,
|
|
||||||
.leaflet-dragging .leaflet-clickable {
|
|
||||||
cursor: move;
|
|
||||||
cursor: -webkit-grabbing;
|
|
||||||
cursor: -moz-grabbing;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* visual tweaks */
|
|
||||||
|
|
||||||
.leaflet-container {
|
|
||||||
background: #ddd;
|
|
||||||
outline: 0;
|
|
||||||
}
|
|
||||||
.leaflet-container a {
|
|
||||||
color: #0078A8;
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-active {
|
|
||||||
outline: 2px solid orange;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-box {
|
|
||||||
border: 2px dotted #38f;
|
|
||||||
background: rgba(255,255,255,0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* general typography */
|
|
||||||
.leaflet-container {
|
|
||||||
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* general toolbar styles */
|
|
||||||
|
|
||||||
.leaflet-bar {
|
|
||||||
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
.leaflet-bar a,
|
|
||||||
.leaflet-bar a:hover {
|
|
||||||
background-color: #fff;
|
|
||||||
border-bottom: 1px solid #ccc;
|
|
||||||
width: 26px;
|
|
||||||
height: 26px;
|
|
||||||
line-height: 26px;
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
text-decoration: none;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
.leaflet-bar a,
|
|
||||||
.leaflet-control-layers-toggle {
|
|
||||||
background-position: 50% 50%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:hover {
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:first-child {
|
|
||||||
border-top-left-radius: 4px;
|
|
||||||
border-top-right-radius: 4px;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:last-child {
|
|
||||||
border-bottom-left-radius: 4px;
|
|
||||||
border-bottom-right-radius: 4px;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.leaflet-bar a.leaflet-disabled {
|
|
||||||
cursor: default;
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
color: #bbb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-bar a {
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* zoom control */
|
|
||||||
|
|
||||||
.leaflet-control-zoom-in,
|
|
||||||
.leaflet-control-zoom-out {
|
|
||||||
font: bold 18px 'Lucida Console', Monaco, monospace;
|
|
||||||
text-indent: 1px;
|
|
||||||
}
|
|
||||||
.leaflet-control-zoom-out {
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-control-zoom-in {
|
|
||||||
font-size: 22px;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-control-zoom-out {
|
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* layers control */
|
|
||||||
|
|
||||||
.leaflet-control-layers {
|
|
||||||
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-toggle {
|
|
||||||
background-image: url(images/layers.png);
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
}
|
|
||||||
.leaflet-retina .leaflet-control-layers-toggle {
|
|
||||||
background-image: url(images/layers-2x.png);
|
|
||||||
background-size: 26px 26px;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-control-layers-toggle {
|
|
||||||
width: 44px;
|
|
||||||
height: 44px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers .leaflet-control-layers-list,
|
|
||||||
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-expanded .leaflet-control-layers-list {
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-expanded {
|
|
||||||
padding: 6px 10px 6px 6px;
|
|
||||||
color: #333;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-selector {
|
|
||||||
margin-top: 2px;
|
|
||||||
position: relative;
|
|
||||||
top: 1px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers label {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-separator {
|
|
||||||
height: 0;
|
|
||||||
border-top: 1px solid #ddd;
|
|
||||||
margin: 5px -10px 5px -6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* attribution and scale controls */
|
|
||||||
|
|
||||||
.leaflet-container .leaflet-control-attribution {
|
|
||||||
background: #fff;
|
|
||||||
background: rgba(255, 255, 255, 0.7);
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution,
|
|
||||||
.leaflet-control-scale-line {
|
|
||||||
padding: 0 5px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
.leaflet-container .leaflet-control-attribution,
|
|
||||||
.leaflet-container .leaflet-control-scale {
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
.leaflet-left .leaflet-control-scale {
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-bottom .leaflet-control-scale {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line {
|
|
||||||
border: 2px solid #777;
|
|
||||||
border-top: none;
|
|
||||||
line-height: 1.1;
|
|
||||||
padding: 2px 5px 1px;
|
|
||||||
font-size: 11px;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
-moz-box-sizing: content-box;
|
|
||||||
box-sizing: content-box;
|
|
||||||
|
|
||||||
background: #fff;
|
|
||||||
background: rgba(255, 255, 255, 0.5);
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line:not(:first-child) {
|
|
||||||
border-top: 2px solid #777;
|
|
||||||
border-bottom: none;
|
|
||||||
margin-top: -2px;
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
|
|
||||||
border-bottom: 2px solid #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-control-attribution,
|
|
||||||
.leaflet-touch .leaflet-control-layers,
|
|
||||||
.leaflet-touch .leaflet-bar {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-control-layers,
|
|
||||||
.leaflet-touch .leaflet-bar {
|
|
||||||
border: 2px solid rgba(0,0,0,0.2);
|
|
||||||
background-clip: padding-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* popup */
|
|
||||||
|
|
||||||
.leaflet-popup {
|
|
||||||
position: absolute;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content-wrapper {
|
|
||||||
padding: 1px;
|
|
||||||
text-align: left;
|
|
||||||
border-radius: 12px;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content {
|
|
||||||
margin: 13px 19px;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content p {
|
|
||||||
margin: 18px 0;
|
|
||||||
}
|
|
||||||
.leaflet-popup-tip-container {
|
|
||||||
margin: 0 auto;
|
|
||||||
width: 40px;
|
|
||||||
height: 20px;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.leaflet-popup-tip {
|
|
||||||
width: 17px;
|
|
||||||
height: 17px;
|
|
||||||
padding: 1px;
|
|
||||||
|
|
||||||
margin: -10px auto 0;
|
|
||||||
|
|
||||||
-webkit-transform: rotate(45deg);
|
|
||||||
-moz-transform: rotate(45deg);
|
|
||||||
-ms-transform: rotate(45deg);
|
|
||||||
-o-transform: rotate(45deg);
|
|
||||||
transform: rotate(45deg);
|
|
||||||
}
|
|
||||||
.leaflet-popup-content-wrapper,
|
|
||||||
.leaflet-popup-tip {
|
|
||||||
background: white;
|
|
||||||
|
|
||||||
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-popup-close-button {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
padding: 4px 4px 0 0;
|
|
||||||
text-align: center;
|
|
||||||
width: 18px;
|
|
||||||
height: 14px;
|
|
||||||
font: 16px/14px Tahoma, Verdana, sans-serif;
|
|
||||||
color: #c3c3c3;
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: bold;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-popup-close-button:hover {
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
.leaflet-popup-scrolled {
|
|
||||||
overflow: auto;
|
|
||||||
border-bottom: 1px solid #ddd;
|
|
||||||
border-top: 1px solid #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
|
||||||
zoom: 1;
|
|
||||||
}
|
|
||||||
.leaflet-oldie .leaflet-popup-tip {
|
|
||||||
width: 24px;
|
|
||||||
margin: 0 auto;
|
|
||||||
|
|
||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
|
||||||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
|
||||||
}
|
|
||||||
.leaflet-oldie .leaflet-popup-tip-container {
|
|
||||||
margin-top: -1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-oldie .leaflet-control-zoom,
|
|
||||||
.leaflet-oldie .leaflet-control-layers,
|
|
||||||
.leaflet-oldie .leaflet-popup-content-wrapper,
|
|
||||||
.leaflet-oldie .leaflet-popup-tip {
|
|
||||||
border: 1px solid #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* div icon */
|
|
||||||
|
|
||||||
.leaflet-div-icon {
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #666;
|
|
||||||
}
|
|
||||||
Vendored
-28
@@ -1,28 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
L.Control.EasyPrint = L.Control.extend({
|
|
||||||
options: {
|
|
||||||
position: 'topright',
|
|
||||||
title: 'Print map',
|
|
||||||
},
|
|
||||||
|
|
||||||
onAdd: function () {
|
|
||||||
var container = L.DomUtil.create('div', 'leaflet-control-easyPrint leaflet-bar leaflet-control');
|
|
||||||
|
|
||||||
this.link = L.DomUtil.create('a', 'leaflet-control-easyPrint-button leaflet-bar-part', container);
|
|
||||||
this.link.href = 'javascript:void($("#map").print({stylesheet:"external/easyPrint.css"}))';
|
|
||||||
|
|
||||||
return container;
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
_click: function (e) {
|
|
||||||
L.DomEvent.stopPropagation(e);
|
|
||||||
L.DomEvent.preventDefault(e);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
L.easyPrint = function() {
|
|
||||||
return new L.Control.EasyPrint();
|
|
||||||
};
|
|
||||||
|
|
||||||
Vendored
-9
@@ -1,9 +0,0 @@
|
|||||||
/*
|
|
||||||
Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com
|
|
||||||
(c) 2010-2013, Vladimir Agafonkin
|
|
||||||
(c) 2010-2011, CloudMade
|
|
||||||
*/
|
|
||||||
!function(t,e,i){var n=t.L,o={};o.version="0.7.2","object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),o.noConflict=function(){return t.L=n,this},t.L=o,o.Util={extend:function(t){var e,i,n,o,s=Array.prototype.slice.call(arguments,1);for(i=0,n=s.length;n>i;i++){o=s[i]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if("object"==typeof t){o=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?(o=!0,void 0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),t.apply(i,a),void 0)}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,o=["webkit","moz","o","ms"];for(i=0;i<o.length&&!n;i++)n=t[o[i]+e];return n}function i(e){var i=+new Date,o=Math.max(0,16-(i-n));return n=i+o,t.setTimeout(e,o)}var n=0,s=t.requestAnimationFrame||e("RequestAnimationFrame")||i,a=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};o.Util.requestAnimFrame=function(e,n,a,r){return e=o.bind(e,n),a&&s===i?(e(),void 0):s.call(t,e,r)},o.Util.cancelAnimFrame=function(e){e&&a.call(t,e)}}(),o.extend=o.Util.extend,o.bind=o.Util.bind,o.stamp=o.Util.stamp,o.setOptions=o.Util.setOptions,o.Class=function(){},o.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var n=new i;n.constructor=e,e.prototype=n;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&(e[s]=this[s]);t.statics&&(o.extend(e,t.statics),delete t.statics),t.includes&&(o.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),t.options&&n.options&&(t.options=o.extend({},n.options,t.options)),o.extend(n,t),n._initHooks=[];var a=this;return e.__super__=a.prototype,n.callInitHooks=function(){if(!this._initHooksCalled){a.prototype.callInitHooks&&a.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;e>t;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s="_leaflet_events";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d=this[s]=this[s]||{},p=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)r={action:e,context:i||this},h=t[n],p?(l=h+"_idx",u=l+"_len",c=d[l]=d[l]||{},c[p]||(c[p]=[],d[u]=(d[u]||0)+1),c[p].push(r)):(d[h]=d[h]||[],d[h].push(r));return this},hasEventListeners:function(t){var e=this[s];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[s])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d,p,_=this[s],m=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)if(r=t[n],u=r+"_idx",c=u+"_len",d=_[u],e){if(h=m&&d?d[m]:_[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(p=h.splice(l,1),p[0].action=o.Util.falseFn);i&&d&&0===h.length&&(delete d[m],_[c]--)}}else delete _[r],delete _[u],delete _[c];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,a,r,h,l=o.Util.extend({},e,{type:t,target:this}),u=this[s];if(u[t])for(i=u[t].slice(),n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);r=u[t+"_idx"];for(Line truncated
|
|
||||||
return new o.LatLng(u*i,a)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:"EPSG:3395",projection:o.Projection.Mercator,transformation:function(){var t=o.Projection.Mercator,e=t.R_MAJOR,i=.5/(Math.PI*e);return new o.Transformation(i,.5,-i,.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-1/0);for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=o.DomUtil.create("div",e,this._container),this._tileContainer=o.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||i<this.options.minZoom)){var s=o.bounds(e.min.divideBy(n)._floor(),e.max.divideBy(n)._floor());this._addTilesFromCenterOut(s),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(s)}}},_addTilesFromCenterOut:function(t){var i,n,s,a=[],r=t.getCenter();for(i=t.min.y;i<=t.max.y;i++)for(n=t.min.x;n<=t.max.x;n++)s=new o.Point(n,i),this._tileShouldBeLoaded(s)&&a.push(s);var h=a.length;if(0!==h){a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)});var l=e.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=h,n=0;h>n;n++)this._addTile(a[n],l);this._tileContainer.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var n=e.tileSize,o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}reLine truncated
|
|
||||||
},_animatePathZoom:function(t){var e=this.getZoomScale(t.zoom),i=this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);this._pathRoot.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(i)+" scale("+e+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max,n=i.x-e.x,s=i.y-e.y,a=this._pathRoot,r=this._panes.overlayPane;o.Browser.mobileWebkit&&r.removeChild(a),o.DomUtil.setPosition(a,e),a.setAttribute("width",n),a.setAttribute("height",s),a.setAttribute("viewBox",[e.x,e.y,n,s].join(" ")),o.Browser.mobileWebkit&&r.appendChild(a)}}}),o.Path.include({bindPopup:function(t,e){return t instanceof o.Popup?this._popup=t:((!this._popup||e)&&(this._popup=new o.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(t){return this._popup&&(t=t||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:t})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(t){this._popup.setLatLng(t.latlng),this._map.openPopup(this._popup)}}),o.Browser.vml=!o.Browser.svg&&function(){try{var t=e.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");o.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,t.dashStyle=i.dashArray?o.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):"",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color)},_drawPath:function(){var t,e,i,n,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)s=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](s.x,s.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checLine truncated
|
|
||||||
break}};e.documentElement.addEventListener(this.POINTER_UP,l,!1),e.documentElement.addEventListener(this.POINTER_CANCEL,l,!1),this._pointerDocumentListener=!0}return this},addPointerListenerMove:function(t,e,i,n){function o(t){if(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons){for(var e=0;e<a.length;e++)if(a[e].pointerId===t.pointerId){a[e]=t;break}t.touches=a.slice(),t.changedTouches=[t],i(t)}}var s="_leaflet_",a=this._pointers;return t[s+"touchmove"+n]=o,t.addEventListener(this.POINTER_MOVE,o,!1),this},addPointerListenerEnd:function(t,e,i,n){var o="_leaflet_",s=this._pointers,a=function(t){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}t.touches=s.slice(),t.changedTouches=[t],i(t)};return t[o+"touchend"+n]=a,t.addEventListener(this.POINTER_UP,a,!1),t.addEventListener(this.POINTER_CANCEL,a,!1),this},removePointerListener:function(t,e,i){var n="_leaflet_",o=t[n+e+i];switch(e){case"touchstart":t.removeEventListener(this.POINTER_DOWN,o,!1);break;case"touchmove":t.removeEventListener(this.POINTER_MOVE,o,!1);break;case"touchend":t.removeEventListener(this.POINTER_UP,o,!1),t.removeEventListener(this.POINTER_CANCEL,o,!1)}return this}}),o.Map.mergeOptions({touchZoom:o.Browser.touch&&!o.Browser.android23,bounceAtZoomLimits:!0}),o.Map.TouchZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var n=i.mouseEventToLayerPoint(t.touches[0]),s=i.mouseEventToLayerPoint(t.touches[1]),a=i._getCenterLayerPoint();this._startCenter=n.add(s)._divideBy(2),this._startDist=n.distanceTo(s),this._moved=!1,this._zooming=!0,this._centerOffset=a.subtract(this._startCenter),i._panAnim&&i._panAnim.stop(),o.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),o.DomEvent.preventDefault(t)}},_onTouchMove:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&this._zooming){var i=e.mouseEventToLayerPoint(t.touches[0]),n=e.mouseEventToLayerPoint(t.touches[1]);this._scale=i.distanceTo(n)/this._startDist,this._delta=i._add(n)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(e.options.bounceAtZoomLimits||!(e.getZoom()===e.getMinZoom()&&this._scale<1||e.getZoom()===e.getMaxZoom()&&this._scale>1))&&(this._moved||(o.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return this._zooming=!1,void 0;var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,"leaflet-touching"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r),l=t.getZoomScale(h)/this._scale;t._animateZoom(n,h,i,l)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,clearTimeout(this._holdTimeout),void 0;var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),o.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.PoinLine truncated
|
|
||||||
Vendored
-9
@@ -1,9 +0,0 @@
|
|||||||
/*
|
|
||||||
Leaflet.label, a plugin that adds labels to markers and vectors for Leaflet powered maps.
|
|
||||||
(c) 2012-2013, Jacob Toye, Smartrak
|
|
||||||
|
|
||||||
https://github.com/Leaflet/Leaflet.label
|
|
||||||
http://leafletjs.com
|
|
||||||
https://github.com/jacobtoye
|
|
||||||
*/
|
|
||||||
(function(){L.labelVersion="0.2.2-dev",L.Label=L.Class.extend({includes:L.Mixin.Events,options:{className:"",clickable:!1,direction:"right",noHide:!1,offset:[12,-15],opacity:1,zoomAnimation:!0},initialize:function(t,e){L.setOptions(this,t),this._source=e,this._animated=L.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(t){this._map=t,this._pane=this._source instanceof L.Marker?t._panes.markerPane:t._panes.popupPane,this._container||this._initLayout(),this._pane.appendChild(this._container),this._initInteraction(),this._update(),this.setOpacity(this.options.opacity),t.on("moveend",this._onMoveEnd,this).on("viewreset",this._onViewReset,this),this._animated&&t.on("zoomanim",this._zoomAnimation,this),L.Browser.touch&&!this.options.noHide&&L.DomEvent.on(this._container,"click",this.close,this)},onRemove:function(t){this._pane.removeChild(this._container),t.off({zoomanim:this._zoomAnimation,moveend:this._onMoveEnd,viewreset:this._onViewReset},this),this._removeInteraction(),this._map=null},setLatLng:function(t){return this._latlng=L.latLng(t),this._map&&this._updatePosition(),this},setContent:function(t){return this._previousContent=this._content,this._content=t,this._updateContent(),this},close:function(){var t=this._map;t&&(L.Browser.touch&&!this.options.noHide&&L.DomEvent.off(this._container,"click",this.close),t.removeLayer(this))},updateZIndex:function(t){this._zIndex=t,this._container&&this._zIndex&&(this._container.style.zIndex=t)},setOpacity:function(t){this.options.opacity=t,this._container&&L.DomUtil.setOpacity(this._container,t)},_initLayout:function(){this._container=L.DomUtil.create("div","leaflet-label "+this.options.className+" leaflet-zoom-animated"),this.updateZIndex(this._zIndex)},_update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updatePosition(),this._container.style.visibility="")},_updateContent:function(){this._content&&this._map&&this._prevContent!==this._content&&"string"==typeof this._content&&(this._container.innerHTML=this._content,this._prevContent=this._content,this._labelWidth=this._container.offsetWidth)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),s=this.options.direction,a=this._labelWidth,l=L.point(this.options.offset);"right"===s||"auto"===s&&o.x<n.x?(L.DomUtil.addClass(i,"leaflet-label-right"),L.DomUtil.removeClass(i,"leaflet-label-left"),t=t.add(l)):(L.DomUtil.addClass(i,"leaflet-label-left"),L.DomUtil.removeClass(i,"leaflet-label-right"),t=t.add(L.point(-l.x-a,l.y))),L.DomUtil.setPosition(i,t)},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPosition(e)},_onMoveEnd:function(){this._animated&&"auto"!==this.options.direction||this._updatePosition()},_onViewReset:function(t){t&&t.hard&&this._update()},_initInteraction:function(){if(this.options.clickable){var t=this._container,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this);for(var i=0;e.length>i;i++)L.DomEvent.on(t,e[i],this._fireMouseEvent,this)}},_removeInteraction:function(){if(this.options.clickable){var t=this._container,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];L.DomUtil.removeClass(t,"leaflet-clickable"),L.DomEvent.off(t,"click",this._onMouseClick,this);for(var i=0;e.length>i;i++)L.DomEvent.off(t,e[i],this._fireMouseEvent,this)}},_onMouseClick:function(t){this.hasEventListeners(t.type)&&L.DomEvent.stopPropagation(t),this.fire(t.type,{originalEvent:t})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&L.DomEvent.preventDefault(t),"mousedown"!==t.type?L.DomEvent.stopPropagation(t):L.DomEvent.preventDefault(t)}}),L.BaseMarkerMethods={showLabel:function(){return this.label&&this._map&&(this.label.setLatLng(this._latlng),this._map.showLabel(this.label)),this},hideLabel:function(){return this.label&&this.label.close(),this},setLabelNoHide:function(t){this._labelNoHide!==t&&(this._labelNoHide=t,t?(this._removeLabelRevealHandlers(),this.showLabel()):(this._addLabelRevealHandlers(),this.hideLabel()))},bindLabel:function(t,e){var i=this.options.icon?this.options.icon.options.labelAnchor:this.options.labelAnchor,n=L.point(i)||L.point(0,0);return n=n.add(L.Label.prototype.options.offset),e&&e.offset&&(n=n.add(e.offset)),e=L.Util.extend({offset:n},e),this._labelNoHide=e.noHide,this.label||(this._labelNoHide||this._addLabelRevealHandlers(),this.on("remove",this.hideLabel,this).on("move",this._moveLabel,this).on("add",this._onMarkerAdd,this),this._hasLabelHandlers=!0),this.label=new L.Label(e,this).setContent(t),this},unbindLabel:function(){return this.label&&(this.hideLabel(),this.label=null,this._hasLabelHandlersLine truncated
|
|
||||||
Vendored
+3
-1
@@ -1 +1,3 @@
|
|||||||
/*! sprintf.js | Copyright (c) 2007-2013 Alexandru Marasteanu <hello at alexei dot ro> | 3 clause BSD license */(function(e){function r(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function i(e,t){for(var n=[];t>0;n[--t]=e);return n.join("")}var t=function(){return t.cache.hasOwnProperty(arguments[0])||(t.cache[arguments[0]]=t.parse(arguments[0])),t.format.call(null,t.cache[arguments[0]],arguments)};t.format=function(e,n){var s=1,o=e.length,u="",a,f=[],l,c,h,p,d,v;for(l=0;l<o;l++){u=r(e[l]);if(u==="string")f.push(e[l]);else if(u==="array"){h=e[l];if(h[2]){a=n[s];for(c=0;c<h[2].length;c++){if(!a.hasOwnProperty(h[2][c]))throw t('[sprintf] property "%s" does not exist',h[2][c]);a=a[h[2][c]]}}else h[1]?a=n[h[1]]:a=n[s++];if(/[^s]/.test(h[8])&&r(a)!="number")throw t("[sprintf] expecting number but found %s",r(a));switch(h[8]){case"b":a=a.toString(2);break;case"c":a=String.fromCharCode(a);break;case"d":a=parseInt(a,10);break;case"e":a=h[7]?a.toExponential(h[7]):a.toExponential();break;case"f":a=h[7]?parseFloat(a).toFixed(h[7]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&h[7]?a.substring(0,h[7]):a;break;case"u":a>>>=0;break;case"x":a=a.toString(16);break;case"X":a=a.toString(16).toUpperCase()}a=/[def]/.test(h[8])&&h[3]&&a>=0?"+"+a:a,d=h[4]?h[4]=="0"?"0":h[4].charAt(1):" ",v=h[6]-String(a).length,p=h[6]?i(d,v):"",f.push(h[5]?a+p:p+a)}}return f.join("")},t.cache={},t.parse=function(e){var t=e,n=[],r=[],i=0;while(t){if((n=/^[^\x25]+/.exec(t))!==null)r.push(n[0]);else if((n=/^\x25{2}/.exec(t))!==null)r.push("%");else{if((n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t))===null)throw"[sprintf] huh?";if(n[2]){i|=1;var s=[],o=n[2],u=[];if((u=/^([a-z_][a-z_\d]*)/i.exec(o))===null)throw"[sprintf] huh?";s.push(u[1]);while((o=o.substring(u[0].length))!=="")if((u=/^\.([a-z_][a-z_\d]*)/i.exec(o))!==null)s.push(u[1]);else{if((u=/^\[(\d+)\]/.exec(o))===null)throw"[sprintf] huh?";s.push(u[1])}n[2]=s}else i|=2;if(i===3)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";r.push(n)}t=t.substring(n[0].length)}return r};var n=function(e,n,r){return r=n.slice(0),r.splice(0,0,e),t.apply(null,r)};e.sprintf=t,e.vsprintf=n})(typeof exports!="undefined"?exports:window);
|
/*! sprintf-js v1.1.2 | Copyright (c) 2007-present, Alexandru Mărășteanu <hello@alexei.ro> | BSD-3-Clause */
|
||||||
|
!function(){"use strict";var g={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function y(e){return function(e,t){var r,n,i,s,a,o,p,c,l,u=1,f=e.length,d="";for(n=0;n<f;n++)if("string"==typeof e[n])d+=e[n];else if("object"==typeof e[n]){if((s=e[n]).keys)for(r=t[u],i=0;i<s.keys.length;i++){if(null==r)throw new Error(y('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[i],s.keys[i-1]));r=r[s.keys[i]]}else r=s.param_no?t[s.param_no]:t[u++];if(g.not_type.test(s.type)&&g.not_primitive.test(s.type)&&r instanceof Function&&(r=r()),g.numeric_arg.test(s.type)&&"number"!=typeof r&&isNaN(r))throw new TypeError(y("[sprintf] expecting number but found %T",r));switch(g.number.test(s.type)&&(c=0<=r),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}g.json.test(s.type)?d+=r:(!g.number.test(s.type)||c&&!s.sign?l="":(l=c?"+":"-",r=r.toString().replace(g.sign,"")),o=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",p=s.width-(l+r).length,a=s.width&&0<p?o.repeat(p):"",d+=s.align?l+r+a:"0"===o?l+a+r:a+l+r)}return d}(function(e){if(p[e])return p[e];var t,r=e,n=[],i=0;for(;r;){if(null!==(t=g.text.exec(r)))n.push(t[0]);else if(null!==(t=g.modulo.exec(r)))n.push("%");else{if(null===(t=g.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var s=[],a=t[2],o=[];if(null===(o=g.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(o[1]);""!==(a=a.substring(o[0].length));)if(null!==(o=g.key_access.exec(a)))s.push(o[1]);else{if(null===(o=g.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(o[1])}t[2]=s}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return p[e]=n}(e),arguments)}function e(e,t){return y.apply(null,[e].concat(t||[]))}var p=Object.create(null);"undefined"!=typeof exports&&(exports.sprintf=y,exports.vsprintf=e),"undefined"!=typeof window&&(window.sprintf=y,window.vsprintf=e,"function"==typeof define&&define.amd&&define(function(){return{sprintf:y,vsprintf:e}}))}();
|
||||||
|
//# sourceMappingURL=sprintf.min.js.map
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["sprintf.js"],"names":["re","not_string","not_bool","not_type","not_primitive","number","numeric_arg","json","not_json","text","modulo","placeholder","key","key_access","index_access","sign","sprintf","parse_tree","argv","arg","i","k","ph","pad","pad_character","pad_length","is_positive","cursor","tree_length","length","output","keys","undefined","Error","param_no","test","type","Function","isNaN","TypeError","parseInt","toString","String","fromCharCode","JSON","stringify","width","precision","parseFloat","toExponential","toFixed","Number","toPrecision","substring","Object","prototype","call","slice","toLowerCase","valueOf","toUpperCase","replace","pad_char","charAt","repeat","align","sprintf_format","fmt","sprintf_cache","match","_fmt","arg_names","exec","push","SyntaxError","field_list","replacement_field","field_match","sprintf_parse","arguments","vsprintf","apply","concat","create","exports","window","define"],"mappings":";CAEC,WACG,aAEA,IAAIA,EAAK,CACLC,WAAY,OACZC,SAAU,OACVC,SAAU,OACVC,cAAe,OACfC,OAAQ,UACRC,YAAa,eACbC,KAAM,MACNC,SAAU,OACVC,KAAM,YACNC,OAAQ,WACRC,YAAa,2FACbC,IAAK,sBACLC,WAAY,wBACZC,aAAc,aACdC,KAAM,SAGV,SAASC,EAAQJ,GAEb,OAOJ,SAAwBK,EAAYC,GAChC,IAAiDC,EAAkBC,EAAGC,EAAGC,EAAIC,EAAKC,EAAeC,EAAYC,EAAaX,EAAtHY,EAAS,EAAGC,EAAcX,EAAWY,OAAaC,EAAS,GAC/D,IAAKV,EAAI,EAAGA,EAAIQ,EAAaR,IACzB,GAA6B,iBAAlBH,EAAWG,GAClBU,GAAUb,EAAWG,QAEpB,GAA6B,iBAAlBH,EAAWG,GAAiB,CAExC,IADAE,EAAKL,EAAWG,IACTW,KAEH,IADAZ,EAAMD,EAAKS,GACNN,EAAI,EAAGA,EAAIC,EAAGS,KAAKF,OAAQR,IAAK,CACjC,GAAWW,MAAPb,EACA,MAAM,IAAIc,MAAMjB,EAAQ,gEAAiEM,EAAGS,KAAKV,GAAIC,EAAGS,KAAKV,EAAE,KAEnHF,EAAMA,EAAIG,EAAGS,KAAKV,SAItBF,EADKG,EAAGY,SACFhB,EAAKI,EAAGY,UAGRhB,EAAKS,KAOf,GAJI3B,EAAGG,SAASgC,KAAKb,EAAGc,OAASpC,EAAGI,cAAc+B,KAAKb,EAAGc,OAASjB,aAAekB,WAC9ElB,EAAMA,KAGNnB,EAAGM,YAAY6B,KAAKb,EAAGc,OAAyB,iBAARjB,GAAoBmB,MAAMnB,GAClE,MAAM,IAAIoB,UAAUvB,EAAQ,0CAA2CG,IAO3E,OAJInB,EAAGK,OAAO8B,KAAKb,EAAGc,QAClBV,EAAqB,GAAPP,GAGVG,EAAGc,MACP,IAAK,IACDjB,EAAMqB,SAASrB,EAAK,IAAIsB,SAAS,GACjC,MACJ,IAAK,IACDtB,EAAMuB,OAAOC,aAAaH,SAASrB,EAAK,KACxC,MACJ,IAAK,IACL,IAAK,IACDA,EAAMqB,SAASrB,EAAK,IACpB,MACJ,IAAK,IACDA,EAAMyB,KAAKC,UAAU1B,EAAK,KAAMG,EAAGwB,MAAQN,SAASlB,EAAGwB,OAAS,GAChE,MACJ,IAAK,IACD3B,EAAMG,EAAGyB,UAAYC,WAAW7B,GAAK8B,cAAc3B,EAAGyB,WAAaC,WAAW7B,GAAK8B,gBACnF,MACJ,IAAK,IACD9B,EAAMG,EAAGyB,UAAYC,WAAW7B,GAAK+B,QAAQ5B,EAAGyB,WAAaC,WAAW7B,GACxE,MACJ,IAAK,IACDA,EAAMG,EAAGyB,UAAYL,OAAOS,OAAOhC,EAAIiC,YAAY9B,EAAGyB,aAAeC,WAAW7B,GAChF,MACJ,IAAK,IACDA,GAAOqB,SAASrB,EAAK,MAAQ,GAAGsB,SAAS,GACzC,MACJ,IAAK,IACDtB,EAAMuB,OAAOvB,GACbA,EAAOG,EAAGyB,UAAY5B,EAAIkC,UAAU,EAAG/B,EAAGyB,WAAa5B,EACvD,MACJ,IAAK,IACDA,EAAMuB,SAASvB,GACfA,EAAOG,EAAGyB,UAAY5B,EAAIkC,UAAU,EAAG/B,EAAGyB,WAAa5B,EACvD,MACJ,IAAK,IACDA,EAAMmC,OAAOC,UAAUd,SAASe,KAAKrC,GAAKsC,MAAM,GAAI,GAAGC,cACvDvC,EAAOG,EAAGyB,UAAY5B,EAAIkC,UAAU,EAAG/B,EAAGyB,WAAa5B,EACvD,MACJ,IAAK,IACDA,EAAMqB,SAASrB,EAAK,MAAQ,EAC5B,MACJ,IAAK,IACDA,EAAMA,EAAIwC,UACVxC,EAAOG,EAAGyB,UAAY5B,EAAIkC,UAAU,EAAG/B,EAAGyB,WAAa5B,EACvD,MACJ,IAAK,IACDA,GAAOqB,SAASrB,EAAK,MAAQ,GAAGsB,SAAS,IACzC,MACJ,IAAK,IACDtB,GAAOqB,SAASrB,EAAK,MAAQ,GAAGsB,SAAS,IAAImB,cAGjD5D,EAAGO,KAAK4B,KAAKb,EAAGc,MAChBN,GAAUX,IAGNnB,EAAGK,OAAO8B,KAAKb,EAAGc,OAAWV,IAAeJ,EAAGP,KAK/CA,EAAO,IAJPA,EAAOW,EAAc,IAAM,IAC3BP,EAAMA,EAAIsB,WAAWoB,QAAQ7D,EAAGe,KAAM,KAK1CS,EAAgBF,EAAGwC,SAA2B,MAAhBxC,EAAGwC,SAAmB,IAAMxC,EAAGwC,SAASC,OAAO,GAAK,IAClFtC,EAAaH,EAAGwB,OAAS/B,EAAOI,GAAKU,OACrCN,EAAMD,EAAGwB,OAAsB,EAAbrB,EAAiBD,EAAcwC,OAAOvC,GAAoB,GAC5EK,GAAUR,EAAG2C,MAAQlD,EAAOI,EAAMI,EAAyB,MAAlBC,EAAwBT,EAAOQ,EAAMJ,EAAMI,EAAMR,EAAOI,GAI7G,OAAOW,EAjHAoC,CAsHX,SAAuBC,GACnB,GAAIC,EAAcD,GACd,OAAOC,EAAcD,GAGzB,IAAgBE,EAAZC,EAAOH,EAAYlD,EAAa,GAAIsD,EAAY,EACpD,KAAOD,GAAM,CACT,GAAqC,QAAhCD,EAAQrE,EAAGS,KAAK+D,KAAKF,IACtBrD,EAAWwD,KAAKJ,EAAM,SAErB,GAAuC,QAAlCA,EAAQrE,EAAGU,OAAO8D,KAAKF,IAC7BrD,EAAWwD,KAAK,SAEf,CAAA,GAA4C,QAAvCJ,EAAQrE,EAAGW,YAAY6D,KAAKF,IA6ClC,MAAM,IAAII,YAAY,oCA5CtB,GAAIL,EAAM,GAAI,CACVE,GAAa,EACb,IAAII,EAAa,GAAIC,EAAoBP,EAAM,GAAIQ,EAAc,GACjE,GAAuD,QAAlDA,EAAc7E,EAAGY,IAAI4D,KAAKI,IAe3B,MAAM,IAAIF,YAAY,gDAbtB,IADAC,EAAWF,KAAKI,EAAY,IACwD,MAA5ED,EAAoBA,EAAkBvB,UAAUwB,EAAY,GAAGhD,UACnE,GAA8D,QAAzDgD,EAAc7E,EAAGa,WAAW2D,KAAKI,IAClCD,EAAWF,KAAKI,EAAY,QAE3B,CAAA,GAAgE,QAA3DA,EAAc7E,EAAGc,aAAa0D,KAAKI,IAIzC,MAAM,IAAIF,YAAY,gDAHtBC,EAAWF,KAAKI,EAAY,IAUxCR,EAAM,GAAKM,OAGXJ,GAAa,EAEjB,GAAkB,IAAdA,EACA,MAAM,IAAItC,MAAM,6EAGpBhB,EAAWwD,KACP,CACI9D,YAAa0D,EAAM,GACnBnC,SAAamC,EAAM,GACnBtC,KAAasC,EAAM,GACnBtD,KAAasD,EAAM,GACnBP,SAAaO,EAAM,GACnBJ,MAAaI,EAAM,GACnBvB,MAAauB,EAAM,GACnBtB,UAAasB,EAAM,GACnBjC,KAAaiC,EAAM,KAO/BC,EAAOA,EAAKjB,UAAUgB,EAAM,GAAGxC,QAEnC,OAAOuC,EAAcD,GAAOlD,EApLN6D,CAAclE,GAAMmE,WAG9C,SAASC,EAASb,EAAKjD,GACnB,OAAOF,EAAQiE,MAAM,KAAM,CAACd,GAAKe,OAAOhE,GAAQ,KAgHpD,IAAIkD,EAAgBd,OAAO6B,OAAO,MAuEX,oBAAZC,UACPA,QAAiB,QAAIpE,EACrBoE,QAAkB,SAAIJ,GAEJ,oBAAXK,SACPA,OAAgB,QAAIrE,EACpBqE,OAAiB,SAAIL,EAEC,mBAAXM,QAAyBA,OAAY,KAC5CA,OAAO,WACH,MAAO,CACHtE,QAAWA,EACXgE,SAAYA,MA9N/B","file":"sprintf.min.js","sourcesContent":["/* global window, exports, define *Line truncated
|
||||||
Vendored
-221
@@ -1,221 +0,0 @@
|
|||||||
/*************
|
|
||||||
Blue Theme
|
|
||||||
*************/
|
|
||||||
/* overall */
|
|
||||||
.tablesorter-blue {
|
|
||||||
width: 100%;
|
|
||||||
background-color: #fff;
|
|
||||||
margin: 10px 0 15px;
|
|
||||||
text-align: left;
|
|
||||||
border-spacing: 0;
|
|
||||||
border: #cdcdcd 1px solid;
|
|
||||||
border-width: 1px 0 0 1px;
|
|
||||||
}
|
|
||||||
.tablesorter-blue th,
|
|
||||||
.tablesorter-blue td {
|
|
||||||
border: #cdcdcd 1px solid;
|
|
||||||
border-width: 0 1px 1px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* header */
|
|
||||||
.tablesorter-blue th,
|
|
||||||
.tablesorter-blue thead td {
|
|
||||||
font: bold 12px/18px Arial, Sans-serif;
|
|
||||||
color: #000;
|
|
||||||
background-color: #99bfe6;
|
|
||||||
border-collapse: collapse;
|
|
||||||
padding: 4px;
|
|
||||||
text-shadow: 0 1px 0 rgba(204, 204, 204, 0.7);
|
|
||||||
}
|
|
||||||
.tablesorter-blue tbody td,
|
|
||||||
.tablesorter-blue tfoot th,
|
|
||||||
.tablesorter-blue tfoot td {
|
|
||||||
padding: 4px;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
.tablesorter-blue .header,
|
|
||||||
.tablesorter-blue .tablesorter-header {
|
|
||||||
/* black (unsorted) double arrow */
|
|
||||||
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
|
|
||||||
/* white (unsorted) double arrow */
|
|
||||||
/* background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==); */
|
|
||||||
/* image */
|
|
||||||
/* background-image: url(images/black-unsorted.gif); */
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: center right;
|
|
||||||
padding: 4px 18px 4px 4px;
|
|
||||||
white-space: normal;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.tablesorter-blue .headerSortUp,
|
|
||||||
.tablesorter-blue .tablesorter-headerSortUp,
|
|
||||||
.tablesorter-blue .tablesorter-headerAsc {
|
|
||||||
background-color: #9fbfdf;
|
|
||||||
/* black asc arrow */
|
|
||||||
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
|
|
||||||
/* white asc arrow */
|
|
||||||
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7); */
|
|
||||||
/* image */
|
|
||||||
/* background-image: url(images/black-asc.gif); */
|
|
||||||
}
|
|
||||||
.tablesorter-blue .headerSortDown,
|
|
||||||
.tablesorter-blue .tablesorter-headerSortDown,
|
|
||||||
.tablesorter-blue .tablesorter-headerDesc {
|
|
||||||
background-color: #8cb3d9;
|
|
||||||
/* black desc arrow */
|
|
||||||
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
|
|
||||||
/* white desc arrow */
|
|
||||||
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7); */
|
|
||||||
/* image */
|
|
||||||
/* background-image: url(images/black-desc.gif); */
|
|
||||||
}
|
|
||||||
.tablesorter-blue thead .sorter-false {
|
|
||||||
background-image: none;
|
|
||||||
cursor: default;
|
|
||||||
padding: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* tfoot */
|
|
||||||
.tablesorter-blue tfoot .tablesorter-headerSortUp,
|
|
||||||
.tablesorter-blue tfoot .tablesorter-headerSortDown,
|
|
||||||
.tablesorter-blue tfoot .tablesorter-headerAsc,
|
|
||||||
.tablesorter-blue tfoot .tablesorter-headerDesc {
|
|
||||||
/* remove sort arrows from footer */
|
|
||||||
background-image: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* tbody */
|
|
||||||
.tablesorter-blue td {
|
|
||||||
color: #3d3d3d;
|
|
||||||
background-color: #fff;
|
|
||||||
padding: 4px;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* hovered row colors
|
|
||||||
you'll need to add additional lines for
|
|
||||||
rows with more than 2 child rows
|
|
||||||
*/
|
|
||||||
.tablesorter-blue tbody > tr:hover > td,
|
|
||||||
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow > td,
|
|
||||||
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td,
|
|
||||||
.tablesorter-blue tbody > tr.even:hover > td,
|
|
||||||
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow > td,
|
|
||||||
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
|
|
||||||
background: #d9d9d9;
|
|
||||||
}
|
|
||||||
.tablesorter-blue tbody > tr.odd:hover > td,
|
|
||||||
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow > td,
|
|
||||||
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
|
|
||||||
background: #bfbfbf;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* table processing indicator */
|
|
||||||
.tablesorter-blue .tablesorter-processing {
|
|
||||||
background-position: center center !important;
|
|
||||||
background-repeat: no-repeat !important;
|
|
||||||
/* background-image: url(../addons/pager/icons/loading.gif) !important; */
|
|
||||||
background-image: url('data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=') !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Zebra Widget - row alternating colors */
|
|
||||||
.tablesorter-blue tbody tr.odd td {
|
|
||||||
background-color: #ebf2fa;
|
|
||||||
}
|
|
||||||
.tablesorter-blue tbody tr.even td {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Column Widget - column sort colors */
|
|
||||||
.tablesorter-blue td.primary,
|
|
||||||
.tablesorter-blue tr.odd td.primary {
|
|
||||||
background-color: #99b3e6;
|
|
||||||
}
|
|
||||||
.tablesorter-blue tr.even td.primary {
|
|
||||||
background-color: #c2d1f0;
|
|
||||||
}
|
|
||||||
.tablesorter-blue td.secondary,
|
|
||||||
.tablesorter-blue tr.odd td.secondary {
|
|
||||||
background-color: #c2d1f0;
|
|
||||||
}
|
|
||||||
.tablesorter-blue tr.even td.secondary {
|
|
||||||
background-color: #d6e0f5;
|
|
||||||
}
|
|
||||||
.tablesorter-blue td.tertiary,
|
|
||||||
.tablesorter-blue tr.odd td.tertiary {
|
|
||||||
background-color: #d6e0f5;
|
|
||||||
}
|
|
||||||
.tablesorter-blue tr.even td.tertiary {
|
|
||||||
background-color: #ebf0fa;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* caption */
|
|
||||||
caption {
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* filter widget */
|
|
||||||
.tablesorter-blue .tablesorter-filter-row td {
|
|
||||||
background: #eee;
|
|
||||||
line-height: normal;
|
|
||||||
text-align: center; /* center the input */
|
|
||||||
-webkit-transition: line-height 0.1s ease;
|
|
||||||
-moz-transition: line-height 0.1s ease;
|
|
||||||
-o-transition: line-height 0.1s ease;
|
|
||||||
transition: line-height 0.1s ease;
|
|
||||||
}
|
|
||||||
/* optional disabled input styling */
|
|
||||||
.tablesorter-blue .tablesorter-filter-row .disabled {
|
|
||||||
opacity: 0.5;
|
|
||||||
filter: alpha(opacity=50);
|
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
|
||||||
/* hidden filter row */
|
|
||||||
.tablesorter-blue .tablesorter-filter-row.hideme td {
|
|
||||||
/*** *********************************************** ***/
|
|
||||||
/*** change this padding to modify the thickness ***/
|
|
||||||
/*** of the closed filter row (height = padding x 2) ***/
|
|
||||||
padding: 2px;
|
|
||||||
/*** *********************************************** ***/
|
|
||||||
margin: 0;
|
|
||||||
line-height: 0;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.tablesorter-blue .tablesorter-filter-row.hideme .tablesorter-filter {
|
|
||||||
height: 1px;
|
|
||||||
min-height: 0;
|
|
||||||
border: 0;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
/* don't use visibility: hidden because it disables tabbing */
|
|
||||||
opacity: 0;
|
|
||||||
filter: alpha(opacity=0);
|
|
||||||
}
|
|
||||||
/* filters */
|
|
||||||
.tablesorter-blue .tablesorter-filter {
|
|
||||||
width: 98%;
|
|
||||||
height: auto;
|
|
||||||
margin: 0;
|
|
||||||
padding: 4px;
|
|
||||||
background-color: #fff;
|
|
||||||
border: 1px solid #bbb;
|
|
||||||
color: #333;
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
-webkit-transition: height 0.1s ease;
|
|
||||||
-moz-transition: height 0.1s ease;
|
|
||||||
-o-transition: height 0.1s ease;
|
|
||||||
transition: height 0.1s ease;
|
|
||||||
}
|
|
||||||
/* rows hidden by filtering (needed for child rows) */
|
|
||||||
.tablesorter .filtered {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ajax error row */
|
|
||||||
.tablesorter .tablesorter-errorRow td {
|
|
||||||
text-align: center;
|
|
||||||
cursor: pointer;
|
|
||||||
background-color: #e6bf99;
|
|
||||||
}
|
|
||||||
Vendored
-863
@@ -1,863 +0,0 @@
|
|||||||
/* Pager widget (beta) for TableSorter 3/31/2014 (v2.15.12) */
|
|
||||||
/*jshint browser:true, jquery:true, unused:false */
|
|
||||||
;(function($){
|
|
||||||
"use strict";
|
|
||||||
var tsp,
|
|
||||||
ts = $.tablesorter;
|
|
||||||
|
|
||||||
ts.addWidget({
|
|
||||||
id: "pager",
|
|
||||||
priority: 55, // load pager after filter widget
|
|
||||||
options : {
|
|
||||||
// output default: '{page}/{totalPages}'
|
|
||||||
// possible variables: {page}, {totalPages}, {filteredPages}, {startRow}, {endRow}, {filteredRows} and {totalRows}
|
|
||||||
pager_output: '{startRow} to {endRow} of {totalRows} rows', // '{page}/{totalPages}'
|
|
||||||
|
|
||||||
// apply disabled classname to the pager arrows when the rows at either extreme is visible
|
|
||||||
pager_updateArrows: true,
|
|
||||||
|
|
||||||
// starting page of the pager (zero based index)
|
|
||||||
pager_startPage: 0,
|
|
||||||
|
|
||||||
// Number of visible rows
|
|
||||||
pager_size: 10,
|
|
||||||
|
|
||||||
// Save pager page & size if the storage script is loaded (requires $.tablesorter.storage in jquery.tablesorter.widgets.js)
|
|
||||||
pager_savePages: true,
|
|
||||||
|
|
||||||
//defines custom storage key
|
|
||||||
pager_storageKey: 'tablesorter-pager',
|
|
||||||
|
|
||||||
// if true, the table will remain the same height no matter how many records are displayed. The space is made up by an empty
|
|
||||||
// table row set to a height to compensate; default is false
|
|
||||||
pager_fixedHeight: false,
|
|
||||||
|
|
||||||
// count child rows towards the set page size? (set true if it is a visible table row within the pager)
|
|
||||||
// if true, child row(s) may not appear to be attached to its parent row, may be split across pages or
|
|
||||||
// may distort the table if rowspan or cellspans are included.
|
|
||||||
pager_countChildRows: false,
|
|
||||||
|
|
||||||
// remove rows from the table to speed up the sort of large tables.
|
|
||||||
// setting this to false, only hides the non-visible rows; needed if you plan to add/remove rows with the pager enabled.
|
|
||||||
pager_removeRows: false, // removing rows in larger tables speeds up the sort
|
|
||||||
|
|
||||||
// use this format: "http://mydatabase.com?page={page}&size={size}&{sortList:col}&{filterList:fcol}"
|
|
||||||
// where {page} is replaced by the page number, {size} is replaced by the number of records to show,
|
|
||||||
// {sortList:col} adds the sortList to the url into a "col" array, and {filterList:fcol} adds
|
|
||||||
// the filterList to the url into an "fcol" array.
|
|
||||||
// So a sortList = [[2,0],[3,0]] becomes "&col[2]=0&col[3]=0" in the url
|
|
||||||
// and a filterList = [[2,Blue],[3,13]] becomes "&fcol[2]=Blue&fcol[3]=13" in the url
|
|
||||||
pager_ajaxUrl: null,
|
|
||||||
|
|
||||||
// modify the url after all processing has been applied
|
|
||||||
pager_customAjaxUrl: function(table, url) { return url; },
|
|
||||||
|
|
||||||
// modify the $.ajax object to allow complete control over your ajax requests
|
|
||||||
pager_ajaxObject: {
|
|
||||||
dataType: 'json'
|
|
||||||
},
|
|
||||||
|
|
||||||
// set this to false if you want to block ajax loading on init
|
|
||||||
pager_processAjaxOnInit: true,
|
|
||||||
|
|
||||||
// process ajax so that the following information is returned:
|
|
||||||
// [ total_rows (number), rows (array of arrays), headers (array; optional) ]
|
|
||||||
// example:
|
|
||||||
// [
|
|
||||||
// 100, // total rows
|
|
||||||
// [
|
|
||||||
// [ "row1cell1", "row1cell2", ... "row1cellN" ],
|
|
||||||
// [ "row2cell1", "row2cell2", ... "row2cellN" ],
|
|
||||||
// ...
|
|
||||||
// [ "rowNcell1", "rowNcell2", ... "rowNcellN" ]
|
|
||||||
// ],
|
|
||||||
// [ "header1", "header2", ... "headerN" ] // optional
|
|
||||||
// ]
|
|
||||||
pager_ajaxProcessing: function(ajax){ return [ 0, [], null ]; },
|
|
||||||
|
|
||||||
// css class names of pager arrows
|
|
||||||
pager_css: {
|
|
||||||
container : 'tablesorter-pager',
|
|
||||||
errorRow : 'tablesorter-errorRow', // error information row (don't include period at beginning)
|
|
||||||
disabled : 'disabled' // class added to arrows @ extremes (i.e. prev/first arrows "disabled" on first page)
|
|
||||||
},
|
|
||||||
|
|
||||||
// jQuery selectors
|
|
||||||
pager_selectors: {
|
|
||||||
container : '.pager', // target the pager markup
|
|
||||||
first : '.first', // go to first page arrow
|
|
||||||
prev : '.prev', // previous page arrow
|
|
||||||
next : '.next', // next page arrow
|
|
||||||
last : '.last', // go to last page arrow
|
|
||||||
goto : '.gotoPage', // go to page selector - select dropdown that sets the current page
|
|
||||||
pageDisplay : '.pagedisplay', // location of where the "output" is displayed
|
|
||||||
pageSize : '.pagesize' // page size selector - select dropdown that sets the "size" option
|
|
||||||
}
|
|
||||||
},
|
|
||||||
init: function(table){
|
|
||||||
tsp.init(table);
|
|
||||||
},
|
|
||||||
// only update to complete sorter initialization
|
|
||||||
format: function(table, c){
|
|
||||||
if (!(c.pager && c.pager.initialized)){
|
|
||||||
return tsp.initComplete(table, c);
|
|
||||||
}
|
|
||||||
tsp.moveToPage(table, c.pager, false);
|
|
||||||
},
|
|
||||||
remove: function(table, c){
|
|
||||||
tsp.destroyPager(table, c);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/* pager widget functions */
|
|
||||||
tsp = ts.pager = {
|
|
||||||
|
|
||||||
init: function(table) {
|
|
||||||
// check if tablesorter has initialized
|
|
||||||
if (table.hasInitialized && table.config.pager.initialized) { return; }
|
|
||||||
var t,
|
|
||||||
c = table.config,
|
|
||||||
wo = c.widgetOptions,
|
|
||||||
s = wo.pager_selectors,
|
|
||||||
|
|
||||||
// save pager variables
|
|
||||||
p = c.pager = $.extend({
|
|
||||||
totalPages: 0,
|
|
||||||
filteredRows: 0,
|
|
||||||
filteredPages: 0,
|
|
||||||
currentFilters: [],
|
|
||||||
page: wo.pager_startPage,
|
|
||||||
size: wo.pager_size,
|
|
||||||
startRow: 0,
|
|
||||||
endRow: 0,
|
|
||||||
ajaxCounter: 0,
|
|
||||||
$size: null,
|
|
||||||
last: {}
|
|
||||||
}, c.pager);
|
|
||||||
|
|
||||||
// pager initializes multiple times before table has completed initialization
|
|
||||||
if (p.isInitializing) { return; }
|
|
||||||
|
|
||||||
p.isInitializing = true;
|
|
||||||
if (c.debug) {
|
|
||||||
ts.log('Pager initializing');
|
|
||||||
}
|
|
||||||
|
|
||||||
// added in case the pager is reinitialized after being destroyed.
|
|
||||||
p.$container = $(s.container).addClass(wo.pager_css.container).show();
|
|
||||||
// goto selector
|
|
||||||
p.$goto = p.$container.find(s.goto);
|
|
||||||
// page size selector
|
|
||||||
p.$size = p.$container.find(s.pageSize);
|
|
||||||
p.totalRows = c.$tbodies.eq(0).children().length;
|
|
||||||
p.oldAjaxSuccess = p.oldAjaxSuccess || wo.pager_ajaxObject.success;
|
|
||||||
c.appender = tsp.appender;
|
|
||||||
if (ts.filter && $.inArray('filter', c.widgets) >= 0) {
|
|
||||||
// get any default filter settings (data-value attribute) fixes #388
|
|
||||||
p.currentFilters = c.$table.data('lastSearch') || ts.filter.setDefaults(table, c, wo) || [];
|
|
||||||
// set, but don't apply current filters
|
|
||||||
ts.setFilters(table, p.currentFilters, false);
|
|
||||||
}
|
|
||||||
if (wo.pager_savePages && ts.storage) {
|
|
||||||
t = ts.storage(table, wo.pager_storageKey) || {}; // fixes #387
|
|
||||||
p.page = isNaN(t.page) ? p.page : t.page;
|
|
||||||
p.size = ( isNaN(t.size) ? p.size : t.size ) || 10;
|
|
||||||
$.data(table, 'pagerLastSize', p.size);
|
|
||||||
}
|
|
||||||
// clear initialized flag
|
|
||||||
p.initialized = false;
|
|
||||||
// before initialization event
|
|
||||||
c.$table.trigger('pagerBeforeInitialized', c);
|
|
||||||
|
|
||||||
tsp.enablePager(table, c, false);
|
|
||||||
|
|
||||||
if ( typeof(wo.pager_ajaxUrl) === 'string' ) {
|
|
||||||
// ajax pager; interact with database
|
|
||||||
p.ajax = true;
|
|
||||||
// When filtering with ajax, allow only custom filtering function, disable default filtering since it will be done server side.
|
|
||||||
wo.filter_serversideFiltering = true;
|
|
||||||
c.serverSideSorting = true;
|
|
||||||
tsp.moveToPage(table, p);
|
|
||||||
} else {
|
|
||||||
p.ajax = false;
|
|
||||||
// Regular pager; all rows stored in memory
|
|
||||||
c.$table.trigger("appendCache", [{}, true]);
|
|
||||||
tsp.hideRowsSetup(table, c);
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
initComplete: function(table, c){
|
|
||||||
var p = c.pager;
|
|
||||||
tsp.changeHeight(table, c);
|
|
||||||
tsp.bindEvents(table, c);
|
|
||||||
|
|
||||||
// pager initialized
|
|
||||||
p.initialized = true;
|
|
||||||
p.isInitializing = false;
|
|
||||||
tsp.setPageSize(table, 0, c); // page size 0 is ignored
|
|
||||||
c.$table.trigger('pagerInitialized', c);
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
bindEvents: function(table, c){
|
|
||||||
var ctrls, fxn,
|
|
||||||
p = c.pager,
|
|
||||||
wo = c.widgetOptions,
|
|
||||||
s = wo.pager_selectors;
|
|
||||||
|
|
||||||
c.$table
|
|
||||||
.unbind('filterStart filterEnd sortEnd disable enable destroy update updateRows updateAll addRows pageSize '.split(' ').join('.pager '))
|
|
||||||
.bind('filterStart.pager', function(e, filters) {
|
|
||||||
p.currentFilters = filters;
|
|
||||||
p.page = 0; // fixes #456
|
|
||||||
})
|
|
||||||
// update pager after filter widget completes
|
|
||||||
.bind('filterEnd.pager sortEnd.pager', function() {
|
|
||||||
if (p.initialized) {
|
|
||||||
tsp.moveToPage(table, p, false);
|
|
||||||
tsp.updatePageDisplay(table, c, false);
|
|
||||||
tsp.fixHeight(table, c);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.bind('disable.pager', function(e){
|
|
||||||
e.stopPropagation();
|
|
||||||
tsp.showAllRows(table, c);
|
|
||||||
})
|
|
||||||
.on('enable.pager', function(e){
|
|
||||||
e.stopPropagation();
|
|
||||||
tsp.enablePager(table, c, true);
|
|
||||||
})
|
|
||||||
.on('destroy.pager', function(e){
|
|
||||||
e.stopPropagation();
|
|
||||||
tsp.destroyPager(table, c);
|
|
||||||
})
|
|
||||||
.on('update updateRows updateAll addRows '.split(' ').join('.pager '), function(e){
|
|
||||||
e.stopPropagation();
|
|
||||||
tsp.hideRows(table, c);
|
|
||||||
// make sure widgets are applied - fixes #450
|
|
||||||
c.$table.trigger('applyWidgets');
|
|
||||||
})
|
|
||||||
.on('pageSize.pager', function(e,v){
|
|
||||||
e.stopPropagation();
|
|
||||||
tsp.setPageSize(table, parseInt(v, 10) || 10, c);
|
|
||||||
tsp.hideRows(table, c);
|
|
||||||
tsp.updatePageDisplay(table, c, false);
|
|
||||||
if (p.$size.length) { p.$size.val(p.size); } // twice?
|
|
||||||
})
|
|
||||||
.on('pageSet.pager', function(e,v){
|
|
||||||
e.stopPropagation();
|
|
||||||
p.page = (parseInt(v, 10) || 1) - 1;
|
|
||||||
if (p.$goto.length) { p.$goto.val(c.size); } // twice?
|
|
||||||
tsp.moveToPage(table, p);
|
|
||||||
tsp.updatePageDisplay(table, c, false);
|
|
||||||
});
|
|
||||||
|
|
||||||
// clicked controls
|
|
||||||
ctrls = [ s.first, s.prev, s.next, s.last ];
|
|
||||||
fxn = [ 'moveToFirstPage', 'moveToPrevPage', 'moveToNextPage', 'moveToLastPage' ];
|
|
||||||
p.$container.find(ctrls.join(','))
|
|
||||||
.attr("tabindex", 0)
|
|
||||||
.unbind('click.pager')
|
|
||||||
.bind('click.pager', function(e){
|
|
||||||
e.stopPropagation();
|
|
||||||
var i,
|
|
||||||
$c = $(this),
|
|
||||||
l = ctrls.length;
|
|
||||||
if ( !$c.hasClass(wo.pager_css.disabled) ) {
|
|
||||||
for (i = 0; i < l; i++) {
|
|
||||||
if ($c.is(ctrls[i])) {
|
|
||||||
tsp[fxn[i]](table, p);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if ( p.$goto.length ) {
|
|
||||||
p.$goto
|
|
||||||
.unbind('change')
|
|
||||||
.bind('change', function(){
|
|
||||||
p.page = $(this).val() - 1;
|
|
||||||
tsp.moveToPage(table, p);
|
|
||||||
tsp.updatePageDisplay(table, c, false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( p.$size.length ) {
|
|
||||||
p.$size
|
|
||||||
.unbind('change.pager')
|
|
||||||
.bind('change.pager', function() {
|
|
||||||
p.$size.val( $(this).val() ); // in case there are more than one pagers
|
|
||||||
if ( !$(this).hasClass(wo.pager_css.disabled) ) {
|
|
||||||
tsp.setPageSize(table, parseInt( $(this).val(), 10 ), c);
|
|
||||||
tsp.changeHeight(table, c);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
// hide arrows at extremes
|
|
||||||
pagerArrows: function(c, disable) {
|
|
||||||
var p = c.pager,
|
|
||||||
dis = !!disable,
|
|
||||||
first = dis || p.page === 0,
|
|
||||||
tp = Math.min( p.totalPages, p.filteredPages ),
|
|
||||||
last = dis || p.page === tp - 1 || p.totalPages === 0,
|
|
||||||
wo = c.widgetOptions,
|
|
||||||
s = wo.pager_selectors;
|
|
||||||
if ( wo.pager_updateArrows ) {
|
|
||||||
p.$container.find(s.first + ',' + s.prev).toggleClass(wo.pager_css.disabled, first).attr('aria-disabled', first);
|
|
||||||
p.$container.find(s.next + ',' + s.last).toggleClass(wo.pager_css.disabled, last).attr('aria-disabled', last);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
updatePageDisplay: function(table, c, completed) {
|
|
||||||
var i, pg, s, out,
|
|
||||||
wo = c.widgetOptions,
|
|
||||||
p = c.pager,
|
|
||||||
f = c.$table.hasClass('hasFilters') && !wo.pager_ajaxUrl,
|
|
||||||
t = (c.widgetOptions && c.widgetOptions.filter_filteredRow || 'filtered') + ',' + c.selectorRemove +
|
|
||||||
(wo.pager_countChildRows ? '' : ',.' + c.cssChildRow),
|
|
||||||
sz = p.size || 10; // don't allow dividing by zero
|
|
||||||
p.$size.add(p.$goto).removeClass(wo.pager_css.disabled).removeAttr('disabled').attr('aria-disabled', 'false');
|
|
||||||
p.totalPages = Math.ceil( p.totalRows / sz ); // needed for "pageSize" method
|
|
||||||
p.filteredRows = (f) ? c.$tbodies.eq(0).children('tr').not('.' + t).length : p.totalRows;
|
|
||||||
p.filteredPages = (f) ? Math.ceil( p.filteredRows / sz ) || 1 : p.totalPages;
|
|
||||||
if ( Math.min( p.totalPages, p.filteredPages ) >= 0 ) {
|
|
||||||
t = (p.size * p.page > p.filteredRows);
|
|
||||||
p.startRow = (t) ? 1 : (p.filteredRows === 0 ? 0 : p.size * p.page + 1);
|
|
||||||
p.page = (t) ? 0 : p.page;
|
|
||||||
p.endRow = Math.min( p.filteredRows, p.totalRows, p.size * ( p.page + 1 ) );
|
|
||||||
out = p.$container.find(wo.pager_selectors.pageDisplay);
|
|
||||||
// form the output string (can now get a new output string from the server)
|
|
||||||
s = ( p.ajaxData && p.ajaxData.output ? p.ajaxData.output || wo.pager_output : wo.pager_output )
|
|
||||||
// {page} = one-based index; {page+#} = zero based index +/- value
|
|
||||||
.replace(/\{page([\-+]\d+)?\}/gi, function(m,n){
|
|
||||||
return p.totalPages ? p.page + (n ? parseInt(n, 10) : 1) : 0;
|
|
||||||
})
|
|
||||||
// {totalPages}, {extra}, {extra:0} (array) or {extra : key} (object)
|
|
||||||
.replace(/\{\w+(\s*:\s*\w+)?\}/gi, function(m){
|
|
||||||
var str = m.replace(/[{}\s]/g,''),
|
|
||||||
extra = str.split(':'),
|
|
||||||
data = p.ajaxData,
|
|
||||||
// return zero for default page/row numbers
|
|
||||||
deflt = /(rows?|pages?)$/i.test(str) ? 0 : '';
|
|
||||||
return extra.length > 1 && data && data[extra[0]] ? data[extra[0]][extra[1]] : p[str] || (data ? data[str] : deflt) || deflt;
|
|
||||||
});
|
|
||||||
if (out.length) {
|
|
||||||
out[ (out[0].tagName === 'INPUT') ? 'val' : 'html' ](s);
|
|
||||||
if ( p.$goto.length ) {
|
|
||||||
t = '';
|
|
||||||
pg = Math.min( p.totalPages, p.filteredPages );
|
|
||||||
for ( i = 1; i <= pg; i++ ) {
|
|
||||||
t += '<option>' + i + '</option>';
|
|
||||||
}
|
|
||||||
p.$goto.html(t).val( p.page + 1 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tsp.pagerArrows(c);
|
|
||||||
if (p.initialized && completed !== false) {
|
|
||||||
c.$table.trigger('pagerComplete', c);
|
|
||||||
// save pager info to storage
|
|
||||||
if (wo.pager_savePages && ts.storage) {
|
|
||||||
ts.storage(table, wo.pager_storageKey, {
|
|
||||||
page : p.page,
|
|
||||||
size : p.size
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
fixHeight: function(table, c) {
|
|
||||||
var d, h,
|
|
||||||
p = c.pager,
|
|
||||||
wo = c.widgetOptions,
|
|
||||||
$b = c.$tbodies.eq(0);
|
|
||||||
if (wo.pager_fixedHeight) {
|
|
||||||
$b.find('tr.pagerSavedHeightSpacer').remove();
|
|
||||||
h = $.data(table, 'pagerSavedHeight');
|
|
||||||
if (h) {
|
|
||||||
d = h - $b.height();
|
|
||||||
if ( d > 5 && $.data(table, 'pagerLastSize') === p.size && $b.children('tr:visible').length < p.size ) {
|
|
||||||
$b.append('<tr class="pagerSavedHeightSpacer ' + wo.pager_selectors.remove.replace(/(tr)?\./g,'') + '" style="height:' + d + 'px;"></tr>');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
changeHeight: function(table, c) {
|
|
||||||
var $b = c.$tbodies.eq(0);
|
|
||||||
$b.find('tr.pagerSavedHeightSpacer').remove();
|
|
||||||
$.data(table, 'pagerSavedHeight', $b.height());
|
|
||||||
tsp.fixHeight(table, c);
|
|
||||||
$.data(table, 'pagerLastSize', c.pager.size);
|
|
||||||
},
|
|
||||||
|
|
||||||
hideRows: function(table, c){
|
|
||||||
if (!c.widgetOptions.pager_ajaxUrl) {
|
|
||||||
var i,
|
|
||||||
lastIndex = 0,
|
|
||||||
p = c.pager,
|
|
||||||
wo = c.widgetOptions,
|
|
||||||
rows = c.$tbodies.eq(0).children(),
|
|
||||||
l = rows.length,
|
|
||||||
s = ( p.page * p.size ),
|
|
||||||
e = s + p.size,
|
|
||||||
f = wo && wo.filter_filteredRow || 'filtered',
|
|
||||||
j = 0; // size counter
|
|
||||||
for ( i = 0; i < l; i++ ){
|
|
||||||
if ( !rows[i].className.match(f) ) {
|
|
||||||
if (j === s && rows[i].className.match(c.cssChildRow)) {
|
|
||||||
// hide child rows @ start of pager (if already visible)
|
|
||||||
rows[i].style.display = 'none';
|
|
||||||
} else {
|
|
||||||
rows[i].style.display = ( j >= s && j < e ) ? '' : 'none';
|
|
||||||
// don't count child rows
|
|
||||||
j += rows[i].className.match(c.cssChildRow + '|' + c.selectorRemove.slice(1)) && !wo.pager_countChildRows ? 0 : 1;
|
|
||||||
if ( j === e && rows[i].style.display !== 'none' && rows[i].className.match(ts.css.cssHasChild) ) {
|
|
||||||
lastIndex = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// add any attached child rows to last row of pager. Fixes part of issue #396
|
|
||||||
if ( lastIndex > 0 && rows[lastIndex].className.match(ts.css.cssHasChild) ) {
|
|
||||||
while ( ++lastIndex < l && rows[lastIndex].className.match(c.cssChildRow) ) {
|
|
||||||
rows[lastIndex].style.display = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
hideRowsSetup: function(table, c){
|
|
||||||
var p = c.pager;
|
|
||||||
p.size = parseInt( p.$size.val(), 10 ) || p.size;
|
|
||||||
$.data(table, 'pagerLastSize', p.size);
|
|
||||||
tsp.pagerArrows(c);
|
|
||||||
if ( !c.widgetOptions.pager_removeRows ) {
|
|
||||||
tsp.hideRows(table, c);
|
|
||||||
c.$table.on('sortEnd.pager filterEnd.pager', function(){
|
|
||||||
tsp.hideRows(table, c);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
renderAjax: function(data, table, c, xhr, exception){
|
|
||||||
var p = c.pager,
|
|
||||||
wo = c.widgetOptions;
|
|
||||||
// process data
|
|
||||||
if ( $.isFunction(wo.pager_ajaxProcessing) ) {
|
|
||||||
// ajaxProcessing result: [ total, rows, headers ]
|
|
||||||
var i, j, t, hsh, $f, $sh, th, d, l, rr_count,
|
|
||||||
$t = c.$table,
|
|
||||||
tds = '',
|
|
||||||
result = wo.pager_ajaxProcessing(data, table) || [ 0, [] ],
|
|
||||||
hl = $t.find('thead th').length;
|
|
||||||
|
|
||||||
// Clean up any previous error.
|
|
||||||
ts.showError(table);
|
|
||||||
|
|
||||||
if ( exception ) {
|
|
||||||
if (c.debug) {
|
|
||||||
ts.log('Ajax Error', xhr, exception);
|
|
||||||
}
|
|
||||||
ts.showError(table, exception.message + ' (' + xhr.status + ')');
|
|
||||||
c.$tbodies.eq(0).empty();
|
|
||||||
p.totalRows = 0;
|
|
||||||
} else {
|
|
||||||
// process ajax object
|
|
||||||
if (!$.isArray(result)) {
|
|
||||||
p.ajaxData = result;
|
|
||||||
p.totalRows = result.total;
|
|
||||||
th = result.headers;
|
|
||||||
d = result.rows;
|
|
||||||
} else {
|
|
||||||
// allow [ total, rows, headers ] or [ rows, total, headers ]
|
|
||||||
t = isNaN(result[0]) && !isNaN(result[1]);
|
|
||||||
// ensure a zero returned row count doesn't fail the logical ||
|
|
||||||
rr_count = result[t ? 1 : 0];
|
|
||||||
p.totalRows = isNaN(rr_count) ? p.totalRows || 0 : rr_count;
|
|
||||||
d = p.totalRows === 0 ? [""] : result[t ? 0 : 1] || []; // row data
|
|
||||||
th = result[2]; // headers
|
|
||||||
}
|
|
||||||
l = d.length;
|
|
||||||
if (d instanceof jQuery) {
|
|
||||||
// append jQuery object
|
|
||||||
c.$tbodies.eq(0).empty().append(d);
|
|
||||||
} else if (l) {
|
|
||||||
// build table from array
|
|
||||||
for ( i = 0; i < l; i++ ) {
|
|
||||||
tds += '<tr>';
|
|
||||||
for ( j = 0; j < d[i].length; j++ ) {
|
|
||||||
// build tbody cells; watch for data containing HTML markup - see #434
|
|
||||||
tds += /^\s*<td/.test(d[i][j]) ? $.trim(d[i][j]) : '<td>' + d[i][j] + '</td>';
|
|
||||||
}
|
|
||||||
tds += '</tr>';
|
|
||||||
}
|
|
||||||
// add rows to first tbody
|
|
||||||
if (wo.pager_processAjaxOnInit) {
|
|
||||||
c.$tbodies.eq(0).html( tds );
|
|
||||||
} else {
|
|
||||||
wo.pager_processAjaxOnInit = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// only add new header text if the length matches
|
|
||||||
if ( th && th.length === hl ) {
|
|
||||||
hsh = $t.hasClass('hasStickyHeaders');
|
|
||||||
$sh = hsh ? wo.$sticky.children('thead:first').children().children() : '';
|
|
||||||
$f = $t.find('tfoot tr:first').children();
|
|
||||||
// don't change td headers (may contain pager)
|
|
||||||
c.$headers.filter('th').each(function(j){
|
|
||||||
var $t = $(this), icn;
|
|
||||||
// add new test within the first span it finds, or just in the header
|
|
||||||
if ( $t.find('.' + ts.css.icon).length ) {
|
|
||||||
icn = $t.find('.' + ts.css.icon).clone(true);
|
|
||||||
$t.find('.tablesorter-header-inner').html( th[j] ).append(icn);
|
|
||||||
if ( hsh && $sh.length ) {
|
|
||||||
icn = $sh.eq(j).find('.' + ts.css.icon).clone(true);
|
|
||||||
$sh.eq(j).find('.tablesorter-header-inner').html( th[j] ).append(icn);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$t.find('.tablesorter-header-inner').html( th[j] );
|
|
||||||
if (hsh && $sh.length) {
|
|
||||||
$sh.eq(j).find('.tablesorter-header-inner').html( th[j] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$f.eq(j).html( th[j] );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (c.showProcessing) {
|
|
||||||
ts.isProcessing(table); // remove loading icon
|
|
||||||
}
|
|
||||||
// make sure last pager settings are saved, prevents multiple server side calls with
|
|
||||||
// the same parameters
|
|
||||||
p.totalPages = Math.ceil( p.totalRows / ( p.size || 10 ) );
|
|
||||||
p.last.totalRows = p.totalRows;
|
|
||||||
p.last.currentFilters = p.currentFilters;
|
|
||||||
p.last.sortList = (c.sortList || []).join(',');
|
|
||||||
tsp.updatePageDisplay(table, c);
|
|
||||||
tsp.fixHeight(table, c);
|
|
||||||
$t.trigger('updateCache', [function(){
|
|
||||||
if (p.initialized) {
|
|
||||||
// apply widgets after table has rendered
|
|
||||||
$t.trigger('applyWidgets');
|
|
||||||
$t.trigger('pagerChange', p);
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
}
|
|
||||||
if (!p.initialized) {
|
|
||||||
c.$table.trigger('applyWidgets');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
getAjax: function(table, c){
|
|
||||||
var counter,
|
|
||||||
url = tsp.getAjaxUrl(table, c),
|
|
||||||
$doc = $(document),
|
|
||||||
wo = c.widgetOptions,
|
|
||||||
p = c.pager;
|
|
||||||
if ( url !== '' ) {
|
|
||||||
if (c.showProcessing) {
|
|
||||||
ts.isProcessing(table, true); // show loading icon
|
|
||||||
}
|
|
||||||
$doc.on('ajaxError.pager', function(e, xhr, settings, exception) {
|
|
||||||
tsp.renderAjax(null, table, c, xhr, exception);
|
|
||||||
$doc.unbind('ajaxError.pager');
|
|
||||||
});
|
|
||||||
counter = ++p.ajaxCounter;
|
|
||||||
wo.pager_ajaxObject.url = url; // from the ajaxUrl option and modified by customAjaxUrl
|
|
||||||
wo.pager_ajaxObject.success = function(data) {
|
|
||||||
// Refuse to process old ajax commands that were overwritten by new ones - see #443
|
|
||||||
if (counter < p.ajaxCounter){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
tsp.renderAjax(data, table, c);
|
|
||||||
$doc.unbind('ajaxError.pager');
|
|
||||||
if (typeof p.oldAjaxSuccess === 'function') {
|
|
||||||
p.oldAjaxSuccess(data);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
if (c.debug) {
|
|
||||||
ts.log('ajax initialized', wo.pager_ajaxObject);
|
|
||||||
}
|
|
||||||
$.ajax(wo.pager_ajaxObject);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
getAjaxUrl: function(table, c) {
|
|
||||||
var p = c.pager,
|
|
||||||
wo = c.widgetOptions,
|
|
||||||
url = (wo.pager_ajaxUrl) ? wo.pager_ajaxUrl
|
|
||||||
// allow using "{page+1}" in the url string to switch to a non-zero based index
|
|
||||||
.replace(/\{page([\-+]\d+)?\}/, function(s,n){ return p.page + (n ? parseInt(n, 10) : 0); })
|
|
||||||
.replace(/\{size\}/g, p.size) : '',
|
|
||||||
sl = c.sortList,
|
|
||||||
fl = p.currentFilters || $(table).data('lastSearch') || [],
|
|
||||||
sortCol = url.match(/\{\s*sort(?:List)?\s*:\s*(\w*)\s*\}/),
|
|
||||||
filterCol = url.match(/\{\s*filter(?:List)?\s*:\s*(\w*)\s*\}/),
|
|
||||||
arry = [];
|
|
||||||
if (sortCol) {
|
|
||||||
sortCol = sortCol[1];
|
|
||||||
$.each(sl, function(i,v){
|
|
||||||
arry.push(sortCol + '[' + v[0] + ']=' + v[1]);
|
|
||||||
});
|
|
||||||
// if the arry is empty, just add the col parameter... "&{sortList:col}" becomes "&col"
|
|
||||||
url = url.replace(/\{\s*sort(?:List)?\s*:\s*(\w*)\s*\}/g, arry.length ? arry.join('&') : sortCol );
|
|
||||||
arry = [];
|
|
||||||
}
|
|
||||||
if (filterCol) {
|
|
||||||
filterCol = filterCol[1];
|
|
||||||
$.each(fl, function(i,v){
|
|
||||||
if (v) {
|
|
||||||
arry.push(filterCol + '[' + i + ']=' + encodeURIComponent(v));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// if the arry is empty, just add the fcol parameter... "&{filterList:fcol}" becomes "&fcol"
|
|
||||||
url = url.replace(/\{\s*filter(?:List)?\s*:\s*(\w*)\s*\}/g, arry.length ? arry.join('&') : filterCol );
|
|
||||||
p.currentFilters = fl;
|
|
||||||
}
|
|
||||||
if ( $.isFunction(wo.pager_customAjaxUrl) ) {
|
|
||||||
url = wo.pager_customAjaxUrl(table, url);
|
|
||||||
}
|
|
||||||
if (c.debug) {
|
|
||||||
ts.log('Pager ajax url: ' + url);
|
|
||||||
}
|
|
||||||
return url;
|
|
||||||
},
|
|
||||||
|
|
||||||
renderTable: function(table, rows) {
|
|
||||||
var i, $tb,
|
|
||||||
c = table.config,
|
|
||||||
p = c.pager,
|
|
||||||
wo = c.widgetOptions,
|
|
||||||
l = rows && rows.length || 0, // rows may be undefined
|
|
||||||
s = ( p.page * p.size ),
|
|
||||||
e = ( s + p.size );
|
|
||||||
if ( l < 1 ) { return; } // empty table, abort!
|
|
||||||
if ( p.page >= p.totalPages ) {
|
|
||||||
// lets not render the table more than once
|
|
||||||
return tsp.moveToLastPage(table, p);
|
|
||||||
}
|
|
||||||
p.isDisabled = false; // needed because sorting will change the page and re-enable the pager
|
|
||||||
if (p.initialized) { c.$table.trigger('pagerChange', c); }
|
|
||||||
|
|
||||||
if ( !wo.pager_removeRows ) {
|
|
||||||
tsp.hideRows(table, c);
|
|
||||||
} else {
|
|
||||||
if ( e > rows.length ) {
|
|
||||||
e = rows.length;
|
|
||||||
}
|
|
||||||
ts.clearTableBody(table);
|
|
||||||
$tb = ts.processTbody(table, c.$tbodies.eq(0), true);
|
|
||||||
for ( i = s; i < e; i++ ) {
|
|
||||||
$tb.append(rows[i]);
|
|
||||||
}
|
|
||||||
ts.processTbody(table, $tb, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
tsp.updatePageDisplay(table, c);
|
|
||||||
if ( !p.isDisabled ) { tsp.fixHeight(table, c); }
|
|
||||||
|
|
||||||
wo.pager_startPage = p.page;
|
|
||||||
wo.pager_size = p.size;
|
|
||||||
c.$table.trigger('applyWidgets');
|
|
||||||
if (table.isUpdating) {
|
|
||||||
c.$table.trigger('updateComplete');
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
showAllRows: function(table, c){
|
|
||||||
var p = c.pager,
|
|
||||||
wo = c.widgetOptions;
|
|
||||||
if ( p.ajax ) {
|
|
||||||
tsp.pagerArrows(c, true);
|
|
||||||
} else {
|
|
||||||
p.isDisabled = true;
|
|
||||||
$.data(table, 'pagerLastPage', p.page);
|
|
||||||
$.data(table, 'pagerLastSize', p.size);
|
|
||||||
p.page = 0;
|
|
||||||
p.size = p.totalRows;
|
|
||||||
p.totalPages = 1;
|
|
||||||
c.$table
|
|
||||||
.addClass('pagerDisabled')
|
|
||||||
.removeAttr('aria-describedby')
|
|
||||||
.find('tr.pagerSavedHeightSpacer').remove();
|
|
||||||
tsp.renderTable(table, c.rowsCopy);
|
|
||||||
if (c.debug) {
|
|
||||||
ts.log('pager disabled');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// disable size selector
|
|
||||||
p.$size.add(p.$goto).each(function(){
|
|
||||||
$(this).attr('aria-disabled', 'true').addClass(wo.pager_css.disabled)[0].disabled = true;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
moveToPage: function(table, p, pageMoved) {
|
|
||||||
if ( p.isDisabled ) { return; }
|
|
||||||
var c = table.config,
|
|
||||||
l = p.last,
|
|
||||||
pg = Math.min( p.totalPages, p.filteredPages );
|
|
||||||
if ( p.page < 0 ) { p.page = 0; }
|
|
||||||
if ( p.page > ( pg - 1 ) && pg !== 0 ) { p.page = pg - 1; }
|
|
||||||
// fixes issue where one current filter is [] and the other is ['','',''],
|
|
||||||
// making the next if comparison think the filters as different. Fixes #202.
|
|
||||||
l.currentFilters = (l.currentFilters || []).join('') === '' ? [] : l.currentFilters;
|
|
||||||
p.currentFilters = (p.currentFilters || []).join('') === '' ? [] : p.currentFilters;
|
|
||||||
// don't allow rendering multiple times on the same page/size/totalRows/filters/sorts
|
|
||||||
if ( l.page === p.page && l.size === p.size && l.totalRows === p.totalRows &&
|
|
||||||
(l.currentFilters || []).join(',') === (p.currentFilters || []).join(',') &&
|
|
||||||
l.sortList === (c.sortList || []).join(',') ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (c.debug) {
|
|
||||||
ts.log('Pager changing to page ' + p.page);
|
|
||||||
}
|
|
||||||
p.last = {
|
|
||||||
page : p.page,
|
|
||||||
size : p.size,
|
|
||||||
// fixes #408; modify sortList otherwise it auto-updates
|
|
||||||
sortList : (c.sortList || []).join(','),
|
|
||||||
totalRows : p.totalRows,
|
|
||||||
currentFilters : p.currentFilters || []
|
|
||||||
};
|
|
||||||
if (p.ajax) {
|
|
||||||
tsp.getAjax(table, c);
|
|
||||||
} else if (!p.ajax) {
|
|
||||||
tsp.renderTable(table, c.rowsCopy);
|
|
||||||
}
|
|
||||||
$.data(table, 'pagerLastPage', p.page);
|
|
||||||
if (p.initialized && pageMoved !== false) {
|
|
||||||
c.$table.trigger('pageMoved', c);
|
|
||||||
if (!p.ajax && table.isUpdating) {
|
|
||||||
c.$table.trigger('updateComplete');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
setPageSize: function(table, size, c) {
|
|
||||||
var p = c.pager;
|
|
||||||
p.size = size || p.size || 10;
|
|
||||||
p.$size.val(p.size);
|
|
||||||
$.data(table, 'pagerLastPage', p.page);
|
|
||||||
$.data(table, 'pagerLastSize', p.size);
|
|
||||||
p.totalPages = Math.ceil( p.totalRows / p.size );
|
|
||||||
p.filteredPages = Math.ceil( p.filteredRows / p.size );
|
|
||||||
tsp.moveToPage(table, p);
|
|
||||||
},
|
|
||||||
|
|
||||||
moveToFirstPage: function(table, p) {
|
|
||||||
p.page = 0;
|
|
||||||
tsp.moveToPage(table, p);
|
|
||||||
},
|
|
||||||
|
|
||||||
moveToLastPage: function(table, p) {
|
|
||||||
p.page = ( Math.min( p.totalPages, p.filteredPages ) - 1 );
|
|
||||||
tsp.moveToPage(table, p);
|
|
||||||
},
|
|
||||||
|
|
||||||
moveToNextPage: function(table, p) {
|
|
||||||
p.page++;
|
|
||||||
if ( p.page >= ( Math.min( p.totalPages, p.filteredPages ) - 1 ) ) {
|
|
||||||
p.page = ( Math.min( p.totalPages, p.filteredPages ) - 1 );
|
|
||||||
}
|
|
||||||
tsp.moveToPage(table, p);
|
|
||||||
},
|
|
||||||
|
|
||||||
moveToPrevPage: function(table, p) {
|
|
||||||
p.page--;
|
|
||||||
if ( p.page <= 0 ) {
|
|
||||||
p.page = 0;
|
|
||||||
}
|
|
||||||
tsp.moveToPage(table, p);
|
|
||||||
},
|
|
||||||
|
|
||||||
destroyPager: function(table, c){
|
|
||||||
var p = c.pager;
|
|
||||||
tsp.showAllRows(table, c);
|
|
||||||
p.$container.hide(); // hide pager
|
|
||||||
c.appender = null; // remove pager appender function
|
|
||||||
p.initialized = false;
|
|
||||||
c.$table.unbind('destroy.pager sortEnd.pager filterEnd.pager enable.pager disable.pager');
|
|
||||||
if (ts.storage) {
|
|
||||||
ts.storage(table, c.widgetOptions.pager_storageKey, '');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
enablePager: function(table, c, triggered){
|
|
||||||
var info, p = c.pager;
|
|
||||||
p.isDisabled = false;
|
|
||||||
p.page = $.data(table, 'pagerLastPage') || p.page || 0;
|
|
||||||
p.size = $.data(table, 'pagerLastSize') || parseInt(p.$size.find('option[selected]').val(), 10) || p.size || 10;
|
|
||||||
p.$size.val(p.size); // set page size
|
|
||||||
p.totalPages = Math.ceil( Math.min( p.totalRows, p.filteredRows ) / p.size );
|
|
||||||
c.$table.removeClass('pagerDisabled');
|
|
||||||
// if table id exists, include page display with aria info
|
|
||||||
if ( table.id ) {
|
|
||||||
info = table.id + '_pager_info';
|
|
||||||
p.$container.find(c.widgetOptions.pager_selectors.pageDisplay).attr('id', info);
|
|
||||||
c.$table.attr('aria-describedby', info);
|
|
||||||
}
|
|
||||||
if ( triggered ) {
|
|
||||||
c.$table.trigger('updateRows');
|
|
||||||
tsp.setPageSize(table, p.size, c);
|
|
||||||
tsp.hideRowsSetup(table, c);
|
|
||||||
tsp.fixHeight(table, c);
|
|
||||||
if (c.debug) {
|
|
||||||
ts.log('pager enabled');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
appender: function(table, rows) {
|
|
||||||
var c = table.config,
|
|
||||||
wo = c.widgetOptions,
|
|
||||||
p = c.pager;
|
|
||||||
if ( !p.ajax ) {
|
|
||||||
c.rowsCopy = rows;
|
|
||||||
p.totalRows = c.widgetOptions.pager_countChildRows ? c.$tbodies.eq(0).children().length : rows.length;
|
|
||||||
p.size = $.data(table, 'pagerLastSize') || p.size || wo.pager_size || 10;
|
|
||||||
p.totalPages = Math.ceil( p.totalRows / p.size );
|
|
||||||
tsp.moveToPage(table, p, true);
|
|
||||||
// update display here in case all rows are removed
|
|
||||||
tsp.updatePageDisplay(table, c, false);
|
|
||||||
} else {
|
|
||||||
tsp.moveToPage(table, p, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// see #486
|
|
||||||
ts.showError = function(table, message){
|
|
||||||
$(table).each(function(){
|
|
||||||
var $row,
|
|
||||||
c = this.config,
|
|
||||||
errorRow = c.pager && c.pager.cssErrorRow || c.widgetOptions.pager_css && c.widgetOptions.pager_css.errorRow || 'tablesorter-errorRow';
|
|
||||||
if (c) {
|
|
||||||
if (typeof message === 'undefined') {
|
|
||||||
c.$table.find('thead').find(c.selectorRemove).remove();
|
|
||||||
} else {
|
|
||||||
$row = ( /tr\>/.test(message) ? $(message) : $('<tr><td colspan="' + c.columns + '">' + message + '</td></tr>') )
|
|
||||||
.click(function(){
|
|
||||||
$(this).remove();
|
|
||||||
})
|
|
||||||
// add error row to thead instead of tbody, or clicking on the header will result in a parser error
|
|
||||||
.appendTo( c.$table.find('thead:first') )
|
|
||||||
.addClass( errorRow + ' ' + c.selectorRemove.replace(/^[.#]/, '') )
|
|
||||||
.attr({
|
|
||||||
role : 'alert',
|
|
||||||
'aria-live' : 'assertive'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
})(jQuery);
|
|
||||||
+22
-26
@@ -8,39 +8,35 @@
|
|||||||
|
|
||||||
<!-- Style definitions -->
|
<!-- Style definitions -->
|
||||||
<link rel="stylesheet" href="main.css" />
|
<link rel="stylesheet" href="main.css" />
|
||||||
<!-- link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" / -->
|
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.css" />
|
||||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/cupertino/jquery-ui.css" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/css/theme.blue.min.css" integrity="sha512-jJ9r3lTLaH5XXa9ZOsCQU8kLvxdAVzyTWO/pnzdZrshJQfnw1oevJFpoyCDr7K1lqt1hUgqoxA5e2PctVtlSTg==" crossorigin="anonymous" />
|
||||||
<link rel="stylesheet" href="external/theme.blue.css"/>
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/css/jquery.tablesorter.pager.min.css" integrity="sha512-TWYBryfpFn3IugX13ZCIYHNK3/2sZk3dyXMKp3chZL+0wRuwFr1hDqZR9Qd5SONzn+Lja10hercP2Xjuzz5O3g==" crossorigin="anonymous" />
|
||||||
<link rel="stylesheet" href="external/jquery.tablesorter.pager.css" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin="anonymous" />
|
||||||
<link rel="stylesheet" href="external/leaflet.css" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet-dvf/0.3.1/css/dvf.min.css" integrity="sha512-Ts/IYE5D8PaMBUDHcf6O57lOiV923cai3sEXo0WjhakpTxlwodQQJx1YA2t1mDUKO6fIXEngkKFLQNMXK/kBZg==" crossorigin="anonymous" />
|
||||||
<!-- link rel="stylesheet" href="external/css/dvf.css" type="text/css" media="screen" / -->
|
<link type="text/css" rel="stylesheet" href="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.css"/>
|
||||||
<link rel="stylesheet" href="external/css/leaflet.label.css" type="text/css" media="screen" />
|
<link rel="stylesheet" href="external/easyPrint/easyPrint.css"/>
|
||||||
<link rel="stylesheet" href="external/easyPrint.css"/>
|
|
||||||
|
|
||||||
<!-- jQuery & jQueryUI -->
|
<!-- jQuery & jQueryUI -->
|
||||||
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
|
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<!-- Localtime & sprintf -->
|
<!-- Localtime & sprintf -->
|
||||||
<script type="text/javascript" src="external/jquery.localtime-0.9.1.min.js"></script>
|
<script type="text/javascript" src="external/jquery.localtime-0.9.1.min.js"></script> <!-- current 2020-07-15 -->
|
||||||
<script type="text/javascript" src="external/sprintf.min.js"></script>
|
<script type="text/javascript" src="external/sprintf.min.js"></script> <!-- version 1.1.2 downloaded 2020-07-15 -->
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter -->
|
||||||
<script type="text/javascript" src="external/jquery.tablesorter.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/jquery.tablesorter.min.js" integrity="sha512-qzgd5cYSZcosqpzpn7zF2ZId8f/8CHmFKZ8j7mU4OUXTNRd5g+ZHBPsgKEwoqxCtdQvExE5LprwwPAgoicguNg==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" src="external/jquery.tablesorter.widgets.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/jquery.tablesorter.widgets.min.js" integrity="sha512-dj/9K5GRIEZu+Igm9tC16XPOTz0RdPk9FGxfZxShWf65JJNU2TjbElGjuOo3EhwAJRPhJxwEJ5b+/Ouo+VqZdQ==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" src="external/widget-pager.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/widgets/widget-pager.min.js" integrity="sha512-+X/dsto9+7foPuqwqjm+mJSPYk6Coovg9jQJvM+aBfscXOyBrAKN69GS5Z2TkMLlVHxeiE5doVqelnMfbsS9XQ==" crossorigin="anonymous"></script>
|
||||||
<!-- script type="text/javascript" src="external/jquery.tablesorter.pager.min.js"></script -->
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/extras/jquery.tablesorter.pager.min.js" integrity="sha512-y845ijdup9lDunrcSRQAlFdQICHVhkB5UNguWRX8A3L+guxO7Oow0poojw0PLckhcKij++h85bnyro80fjR9+A==" crossorigin="anonymous"></script>
|
||||||
<!-- script type="text/javascript" src="external/widget-scroller.js"></script -->
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/widgets/widget-scroller.min.js" integrity="sha512-1D2qKse1/4gCgLbgmBBv+9fJluAeJIlDgzIyZkovd1xmoyh1SW30lMIzCrD2X8Xs/sIzitUNDy86YagJRSUmaA==" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<!-- Leaflet -->
|
<!-- Leaflet -->
|
||||||
<script type="text/javascript" src="external/leaflet.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.js" integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" src="external/TileLayer.Grayscale.js"></script>
|
<!-- <script type="text/javascript" src="external/TileLayer.Grayscale.js"></script> --> <! version of 2017-11-01 downloaded 2020-07-15 -->
|
||||||
<script type="text/javascript" src="external/leaflet-dvf.markers.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-dvf/0.3.1/leaflet-dvf.markers.min.js" integrity="sha512-R/iucaxFnDFUTdZRxUvxzc+sypDQhqnxInBmNjgGE0RaiMl/ektVB1wFS/L0xDZmLFPpEGR0Kw3GEBgtQNFHyg==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" src="external/leaflet.label.js"></script>
|
<script src="external/jQuery.print.min.js"></script>
|
||||||
<script src="external/jQuery.print.js"></script>
|
<script src="external/easyPrint/bundle.js"></script>
|
||||||
<script src="external/leaflet.easyPrint.js"></script>
|
|
||||||
<script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt"></script>
|
|
||||||
<!-- <script src="https://www.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt"></script> -->
|
|
||||||
|
|
||||||
<!-- Map, Events & Stations -->
|
<!-- Map, Events & Stations -->
|
||||||
<script type="text/javascript" src="misc.js"></script>
|
<script type="text/javascript" src="misc.js"></script>
|
||||||
|
|||||||
+22
-27
@@ -8,40 +8,35 @@
|
|||||||
|
|
||||||
<!-- Style definitions -->
|
<!-- Style definitions -->
|
||||||
<link rel="stylesheet" href="main.css" />
|
<link rel="stylesheet" href="main.css" />
|
||||||
<!-- link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" / -->
|
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.css" />
|
||||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/cupertino/jquery-ui.css" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/css/theme.blue.min.css" integrity="sha512-jJ9r3lTLaH5XXa9ZOsCQU8kLvxdAVzyTWO/pnzdZrshJQfnw1oevJFpoyCDr7K1lqt1hUgqoxA5e2PctVtlSTg==" crossorigin="anonymous" />
|
||||||
<link rel="stylesheet" href="external/theme.blue.css"/>
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/css/jquery.tablesorter.pager.min.css" integrity="sha512-TWYBryfpFn3IugX13ZCIYHNK3/2sZk3dyXMKp3chZL+0wRuwFr1hDqZR9Qd5SONzn+Lja10hercP2Xjuzz5O3g==" crossorigin="anonymous" />
|
||||||
<link rel="stylesheet" href="external/jquery.tablesorter.pager.css" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin="anonymous" />
|
||||||
<link rel="stylesheet" href="external/leaflet.css" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet-dvf/0.3.1/css/dvf.min.css" integrity="sha512-Ts/IYE5D8PaMBUDHcf6O57lOiV923cai3sEXo0WjhakpTxlwodQQJx1YA2t1mDUKO6fIXEngkKFLQNMXK/kBZg==" crossorigin="anonymous" />
|
||||||
<!-- link rel="stylesheet" href="external/css/dvf.css" type="text/css" media="screen" / -->
|
<link type="text/css" rel="stylesheet" href="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.css"/>
|
||||||
<link rel="stylesheet" href="external/css/leaflet.label.css" type="text/css" media="screen" />
|
<link rel="stylesheet" href="external/easyPrint/easyPrint.css"/>
|
||||||
<link rel="stylesheet" href="external/easyPrint.css"/>
|
|
||||||
|
|
||||||
<!-- jQuery & jQueryUI -->
|
<!-- jQuery & jQueryUI -->
|
||||||
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
|
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<!-- Localtime & sprintf -->
|
<!-- Localtime & sprintf -->
|
||||||
<script type="text/javascript" src="external/jquery.localtime-0.9.1.min.js"></script>
|
<script type="text/javascript" src="external/jquery.localtime-0.9.1.min.js"></script> <!-- current 2020-07-15 -->
|
||||||
<script type="text/javascript" src="external/sprintf.min.js"></script>
|
<script type="text/javascript" src="external/sprintf.min.js"></script> <!-- version 1.1.2 downloaded 2020-07-15 -->
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter -->
|
||||||
<script type="text/javascript" src="external/jquery.tablesorter.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/jquery.tablesorter.min.js" integrity="sha512-qzgd5cYSZcosqpzpn7zF2ZId8f/8CHmFKZ8j7mU4OUXTNRd5g+ZHBPsgKEwoqxCtdQvExE5LprwwPAgoicguNg==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" src="external/jquery.tablesorter.widgets.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/jquery.tablesorter.widgets.min.js" integrity="sha512-dj/9K5GRIEZu+Igm9tC16XPOTz0RdPk9FGxfZxShWf65JJNU2TjbElGjuOo3EhwAJRPhJxwEJ5b+/Ouo+VqZdQ==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" src="external/widget-pager.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/widgets/widget-pager.min.js" integrity="sha512-+X/dsto9+7foPuqwqjm+mJSPYk6Coovg9jQJvM+aBfscXOyBrAKN69GS5Z2TkMLlVHxeiE5doVqelnMfbsS9XQ==" crossorigin="anonymous"></script>
|
||||||
<!-- script type="text/javascript" src="external/jquery.tablesorter.pager.min.js"></script -->
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/extras/jquery.tablesorter.pager.min.js" integrity="sha512-y845ijdup9lDunrcSRQAlFdQICHVhkB5UNguWRX8A3L+guxO7Oow0poojw0PLckhcKij++h85bnyro80fjR9+A==" crossorigin="anonymous"></script>
|
||||||
<!-- script type="text/javascript" src="external/widget-scroller.js"></script -->
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/widgets/widget-scroller.min.js" integrity="sha512-1D2qKse1/4gCgLbgmBBv+9fJluAeJIlDgzIyZkovd1xmoyh1SW30lMIzCrD2X8Xs/sIzitUNDy86YagJRSUmaA==" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<!-- Leaflet -->
|
<!-- Leaflet -->
|
||||||
<script type="text/javascript" src="external/leaflet.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.js" integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" src="external/TileLayer.Grayscale.js"></script>
|
<!-- <script type="text/javascript" src="external/TileLayer.Grayscale.js"></script> --> <! version of 2017-11-01 downloaded 2020-07-15 -->
|
||||||
<script type="text/javascript" src="external/leaflet-dvf.markers.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-dvf/0.3.1/leaflet-dvf.markers.min.js" integrity="sha512-R/iucaxFnDFUTdZRxUvxzc+sypDQhqnxInBmNjgGE0RaiMl/ektVB1wFS/L0xDZmLFPpEGR0Kw3GEBgtQNFHyg==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" src="external/leaflet.label.js"></script>
|
<script src="external/jQuery.print.min.js"></script>
|
||||||
<script src="external/jQuery.print.js"></script>
|
<script src="external/easyPrint/bundle.js"></script>
|
||||||
<script src="external/leaflet.easyPrint.js"></script>
|
|
||||||
|
|
||||||
<script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt"></script>
|
|
||||||
<!-- <script src="https://www.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt"></script> -->
|
|
||||||
|
|
||||||
<!-- Map, Events & Stations -->
|
<!-- Map, Events & Stations -->
|
||||||
<script type="text/javascript" src="misc.js"></script>
|
<script type="text/javascript" src="misc.js"></script>
|
||||||
|
|||||||
+10
-34
@@ -35,7 +35,7 @@ function addStationMarker(id, lat, lng, station) {
|
|||||||
radius: config['station']['markerSize'][id] || config['station']['markerSize']['defaultSize'],
|
radius: config['station']['markerSize'][id] || config['station']['markerSize']['defaultSize'],
|
||||||
className: id+' stationMarker',
|
className: id+' stationMarker',
|
||||||
});
|
});
|
||||||
marker.bindLabel('Station '+station);
|
marker.bindTooltip('Station '+station);
|
||||||
stationLayer.addLayer(marker);
|
stationLayer.addLayer(marker);
|
||||||
stationTable[id] = marker;
|
stationTable[id] = marker;
|
||||||
};
|
};
|
||||||
@@ -143,13 +143,6 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
// create baselayer
|
// create baselayer
|
||||||
switch ( config['map']['baselayer'] ) {
|
switch ( config['map']['baselayer'] ) {
|
||||||
case 'osmde': // add OpenStreetMap.DE tile layer
|
|
||||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
|
||||||
L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
|
||||||
{
|
|
||||||
attribution: '© <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
|
|
||||||
}).addTo(map);
|
|
||||||
break;
|
|
||||||
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
||||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
L.tileLayer('//server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',
|
L.tileLayer('//server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',
|
||||||
@@ -165,38 +158,21 @@ $(document).ready(function() {
|
|||||||
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
break;
|
break;
|
||||||
case 'komoot': // add OpenStreetMap.DE tile layer
|
case 'opentopo': // add OpenTopoMap tile layer https://opentopomap.org/
|
||||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
L.tileLayer('//www.komoot.de/tiles/{s}/{z}/{x}/{y}.png',
|
L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
|
||||||
{
|
{
|
||||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.komoot.de/">Komoot</a>',
|
attribution: 'Kartendaten: © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, SRTM | Kartendarstellung: © <a href="http://opentopomap.org/">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>)'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
break;
|
break;
|
||||||
case 'mapquestgray': // add MapQuestOSM tile layer
|
case 'osmde': // add OpenStreetMap.DE tile layer, default
|
||||||
null;
|
|
||||||
// map = L.map('map', { zoomControl: false, worldCopyJump: true, layers: mapLayer }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
|
||||||
// L.tileLayer.grayscale('https://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
|
||||||
// {
|
|
||||||
// subdomains: '1234',
|
|
||||||
// detectRetina: true,
|
|
||||||
// attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
|
||||||
//}).addTo(map);
|
|
||||||
//break;
|
|
||||||
case 'mapquest': // add MapQuestOSM tile layer
|
|
||||||
null;
|
null;
|
||||||
default:
|
default:
|
||||||
var mapLayer = MQ.mapLayer();
|
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
map = L.map('map', {
|
L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
||||||
zoomControl: false,
|
{
|
||||||
worldCopyJump: true,
|
attribution: '© <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
|
||||||
layers: mapLayer,
|
}).addTo(map);
|
||||||
}).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
|
||||||
//L.tileLayer('https://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
|
||||||
//{
|
|
||||||
//subdomains: '1234',
|
|
||||||
//detectRetina: true,
|
|
||||||
//attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
|
||||||
//}).addTo(map);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// add controls
|
// add controls
|
||||||
|
|||||||
+11
-35
@@ -35,7 +35,7 @@ function addStationMarker(id, lat, lng, station) {
|
|||||||
radius: config['station']['markerSize'][id] || config['station']['markerSize']['defaultSize'],
|
radius: config['station']['markerSize'][id] || config['station']['markerSize']['defaultSize'],
|
||||||
className: id+' stationMarker',
|
className: id+' stationMarker',
|
||||||
});
|
});
|
||||||
marker.bindLabel('Station '+station);
|
marker.bindTooltip('Station '+station);
|
||||||
stationLayer.addLayer(marker);
|
stationLayer.addLayer(marker);
|
||||||
stationTable[id] = marker;
|
stationTable[id] = marker;
|
||||||
};
|
};
|
||||||
@@ -141,16 +141,8 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
// create a map in the "map" div, set the view to a given place and zoom
|
// create a map in the "map" div, set the view to a given place and zoom
|
||||||
|
|
||||||
|
|
||||||
// create baselayer
|
// create baselayer
|
||||||
switch ( config['map']['baselayer'] ) {
|
switch ( config['map']['baselayer'] ) {
|
||||||
case 'osmde': // add OpenStreetMap.DE tile layer
|
|
||||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
|
||||||
L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
|
||||||
{
|
|
||||||
attribution: '© <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
|
|
||||||
}).addTo(map);
|
|
||||||
break;
|
|
||||||
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
||||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
L.tileLayer('//server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',
|
L.tileLayer('//server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',
|
||||||
@@ -166,39 +158,23 @@ $(document).ready(function() {
|
|||||||
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
break;
|
break;
|
||||||
case 'komoot': // add OpenStreetMap.DE tile layer
|
case 'opentopo': // add OpenTopoMap tile layer https://opentopomap.org/
|
||||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
L.tileLayer('//www.komoot.de/tiles/{s}/{z}/{x}/{y}.png',
|
L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
|
||||||
{
|
{
|
||||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.komoot.de/">Komoot</a>',
|
attribution: 'Kartendaten: © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, SRTM | Kartendarstellung: © <a href="http://opentopomap.org/">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>)'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
break;
|
break;
|
||||||
case 'mapquestgray': // add MapQuestOSM tile layer
|
case 'osmde': // add OpenStreetMap.DE tile layer, default
|
||||||
null;
|
|
||||||
// map = L.map('map', { zoomControl: false, worldCopyJump: true, layers: mapLayer }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
|
||||||
// L.tileLayer.grayscale('https://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
|
||||||
// {
|
|
||||||
// subdomains: '1234',
|
|
||||||
// detectRetina: true,
|
|
||||||
// attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
|
||||||
//}).addTo(map);
|
|
||||||
//break;
|
|
||||||
case 'mapquest': // add MapQuestOSM tile layer
|
|
||||||
null;
|
null;
|
||||||
default:
|
default:
|
||||||
var mapLayer = MQ.mapLayer();
|
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||||
map = L.map('map', {
|
L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
||||||
zoomControl: false,
|
{
|
||||||
worldCopyJump: true,
|
attribution: '© <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
|
||||||
layers: mapLayer,
|
}).addTo(map);
|
||||||
}).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
|
||||||
//L.tileLayer('https://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
|
||||||
//{
|
|
||||||
//subdomains: '1234',
|
|
||||||
//detectRetina: true,
|
|
||||||
//attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
|
||||||
//}).addTo(map);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// add controls
|
// add controls
|
||||||
new L.Control.Zoom({ position: 'topright' }).addTo(map);
|
new L.Control.Zoom({ position: 'topright' }).addTo(map);
|
||||||
new L.control.scale({position: 'bottomright', imperial: false}).addTo(map);
|
new L.control.scale({position: 'bottomright', imperial: false}).addTo(map);
|
||||||
|
|||||||
+8
-7
@@ -25,7 +25,7 @@
|
|||||||
/* calculate marker radius from magnitude
|
/* calculate marker radius from magnitude
|
||||||
* both formulas have equal radii at mag=1.2 */
|
* both formulas have equal radii at mag=1.2 */
|
||||||
function mag2radius(mag) {
|
function mag2radius(mag) {
|
||||||
return 3*mag; // radius proportional to magagnitude
|
return 3*mag; // radius proportional to magnitude
|
||||||
// return 8.104*Math.pow(30,mag) // radius proportional to energy
|
// return 8.104*Math.pow(30,mag) // radius proportional to energy
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -67,9 +67,7 @@ function getLocation(lat, lng) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* window resize */
|
/* window resize */
|
||||||
$( window ).resize(function() {
|
$( window ).on('resize', function() { setInfoHeight(); });
|
||||||
setInfoHeight();
|
|
||||||
});
|
|
||||||
|
|
||||||
/* parseQueryString */
|
/* parseQueryString */
|
||||||
function parseQueryString() {
|
function parseQueryString() {
|
||||||
@@ -169,9 +167,12 @@ if (typeof console == "undefined") var console = { log: function() {} };
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// parse query string
|
// parse query string
|
||||||
var parameters = parseQueryString();
|
var parameters = parseQueryString();
|
||||||
if ( parameters['baselayer'] ) {
|
if ( parameters['baselayer']) {
|
||||||
config['map']['baselayer'] = parameters['baselayer'][0];
|
config['map']['baselayer'] = parameters['baselayer'][0];
|
||||||
};
|
};
|
||||||
|
if ( parameters['basemap'] ) {
|
||||||
|
config['map']['baselayer'] = parameters['basemap'][0];
|
||||||
|
};
|
||||||
if ( Number(parameters['lat']) && Number(parameters['lon']) ) {
|
if ( Number(parameters['lat']) && Number(parameters['lon']) ) {
|
||||||
config['map']['centerDefault'] = [Number(parameters['lat']), Number(parameters['lon'])];
|
config['map']['centerDefault'] = [Number(parameters['lat']), Number(parameters['lon'])];
|
||||||
};
|
};
|
||||||
@@ -216,9 +217,9 @@ $(document).ready(function() {
|
|||||||
animate: 200,
|
animate: 200,
|
||||||
});
|
});
|
||||||
// spinner
|
// spinner
|
||||||
$(document).bind("ajaxSend", function() {
|
$(document).on("ajaxSend", function() {
|
||||||
$("#spinner").show();
|
$("#spinner").show();
|
||||||
}).bind("ajaxStop", function() {
|
}).on("ajaxStop", function() {
|
||||||
$("#spinner").hide();
|
$("#spinner").hide();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
+2
-2
@@ -213,7 +213,7 @@ function initStationTable() {
|
|||||||
// hide child rows
|
// hide child rows
|
||||||
$('#stationstable > tbody > tr.tablesorter-childRow > td').hide();
|
$('#stationstable > tbody > tr.tablesorter-childRow > td').hide();
|
||||||
// update map after filtering
|
// update map after filtering
|
||||||
// $('#stationsstable').bind('filterEnd', function(){
|
// $('#stationsstable').on('filterEnd', function(){
|
||||||
// toggleFilteredMarkers();
|
// toggleFilteredMarkers();
|
||||||
// });
|
// });
|
||||||
};
|
};
|
||||||
@@ -238,7 +238,7 @@ $(document).ready(function() {
|
|||||||
// loadStations('KERA');
|
// loadStations('KERA');
|
||||||
// loadStations('KARP');
|
// loadStations('KARP');
|
||||||
// show / hide station info
|
// show / hide station info
|
||||||
$('#stationstable').delegate('.toggle', 'click' , function(){
|
$('#stationstable').on('click', '.toggle' , function(){
|
||||||
// toggle visibility of selected row
|
// toggle visibility of selected row
|
||||||
$(this).closest('tr').nextUntil('tr.tablesorter-hasChildRow').find('td').toggle('slow');
|
$(this).closest('tr').nextUntil('tr.tablesorter-hasChildRow').find('td').toggle('slow');
|
||||||
// mark currently selected row and remove class selected from all other rows
|
// mark currently selected row and remove class selected from all other rows
|
||||||
|
|||||||
+2
-2
@@ -213,7 +213,7 @@ function initStationTable() {
|
|||||||
// hide child rows
|
// hide child rows
|
||||||
$('#stationstable > tbody > tr.tablesorter-childRow > td').hide();
|
$('#stationstable > tbody > tr.tablesorter-childRow > td').hide();
|
||||||
// update map after filtering
|
// update map after filtering
|
||||||
// $('#stationsstable').bind('filterEnd', function(){
|
// $('#stationsstable').on('filterEnd', function(){
|
||||||
// toggleFilteredMarkers();
|
// toggleFilteredMarkers();
|
||||||
// });
|
// });
|
||||||
};
|
};
|
||||||
@@ -238,7 +238,7 @@ $(document).ready(function() {
|
|||||||
// loadStations('KERA');
|
// loadStations('KERA');
|
||||||
// loadStations('KARP');
|
// loadStations('KARP');
|
||||||
// show / hide station info
|
// show / hide station info
|
||||||
$('#stationstable').delegate('.toggle', 'click' , function(){
|
$('#stationstable').on('click', '.toggle' , function(){
|
||||||
// toggle visibility of selected row
|
// toggle visibility of selected row
|
||||||
$(this).closest('tr').nextUntil('tr.tablesorter-hasChildRow').find('td').toggle('slow');
|
$(this).closest('tr').nextUntil('tr.tablesorter-hasChildRow').find('td').toggle('slow');
|
||||||
// mark currently selected row and remove class selected from all other rows
|
// mark currently selected row and remove class selected from all other rows
|
||||||
|
|||||||
Reference in new issue
Block a user