diff --git a/.gitignore b/.gitignore
index ebac73f..4d34de5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,7 @@ www/geolocationTable.js
www/stations.xml
.vscode/settings.json
+
+www/index.html
+
+www/favicon.ico
diff --git a/www/events.js b/www/events.js
index 1734a78..a830721 100644
--- a/www/events.js
+++ b/www/events.js
@@ -371,18 +371,18 @@ $(document).ready(function() {
// hide child rows
$('#eventstable > tbody > tr.tablesorter-childRow td').hide();
// update map after filtering
- $('#eventstable').bind('filterEnd', function(){
+ $('#eventstable').on('filterEnd', function(){
toggleFilteredMarkers();
});
// highlight first event
- $('#eventstable').bind('sortEnd', function(){
+ $('#eventstable').on('sortEnd', function(){
highlightFirstEvent();
});
- $('#eventstable').bind('pagerComplete', function(){
+ $('#eventstable').on('pagerComplete', function(){
highlightFirstEvent();
});
// show / hide event info
- $('#eventstable').delegate('.toggle', 'click' , function(){
+ $('#eventstable').on('click', '.toggle', function(){
// load event details
var eventid = $(this).attr('eventid');
( eventDetails[eventid] ) ? null : ajaxLoadEventInfo(eventid);
diff --git a/www/events.js.en b/www/events.js.en
index 1d31dbb..4793bb6 100644
--- a/www/events.js.en
+++ b/www/events.js.en
@@ -371,18 +371,18 @@ $(document).ready(function() {
// hide child rows
$('#eventstable > tbody > tr.tablesorter-childRow td').hide();
// update map after filtering
- $('#eventstable').bind('filterEnd', function(){
+ $('#eventstable').on('filterEnd', function(){
toggleFilteredMarkers();
});
// highlight first event
- $('#eventstable').bind('sortEnd', function(){
+ $('#eventstable').on('sortEnd', function(){
highlightFirstEvent();
});
- $('#eventstable').bind('pagerComplete', function(){
+ $('#eventstable').on('pagerComplete', function(){
highlightFirstEvent();
});
// show / hide event info
- $('#eventstable').delegate('.toggle', 'click' , function(){
+ $('#eventstable').on('click', '.toggle', function(){
// load event details
var eventid = $(this).attr('eventid');
( eventDetails[eventid] ) ? null : ajaxLoadEventInfo(eventid);
diff --git a/www/external/TileLayer.Grayscale.js b/www/external/TileLayer.Grayscale.js
index 7d9e934..1dae67c 100644
--- a/www/external/TileLayer.Grayscale.js
+++ b/www/external/TileLayer.Grayscale.js
@@ -4,45 +4,50 @@
L.TileLayer.Grayscale = L.TileLayer.extend({
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) {
- var canvasEl = document.createElement('canvas');
- if( !(canvasEl.getContext && canvasEl.getContext('2d')) ) {
- options.enableCanvas = false;
- }
-
+ options = options || {}
+ options.crossOrigin = true;
L.TileLayer.prototype.initialize.call(this, url, options);
+
+ this.on('tileload', function(e) {
+ this._makeGrayscale(e.tile);
+ });
},
- _loadTile: function (tile, tilePoint) {
- tile.setAttribute('crossorigin', 'anonymous');
- L.TileLayer.prototype._loadTile.call(this, tile, tilePoint);
+ _createTile: function () {
+ var tile = L.TileLayer.prototype._createTile.call(this);
+ tile.crossOrigin = "Anonymous";
+ return tile;
},
- _tileOnLoad: function () {
- if (this._layer.options.enableCanvas && !this.canvasContext) {
- var canvas = document.createElement("canvas");
- canvas.width = canvas.height = this._layer.options.tileSize;
- this.canvasContext = canvas.getContext("2d");
- }
- var ctx = this.canvasContext;
+ _makeGrayscale: function (img) {
+ if (img.getAttribute('data-grayscaled'))
+ return;
- if (ctx) {
- this.onload = null; // to prevent an infinite loop
- ctx.drawImage(this, 0, 0);
- var imgd = ctx.getImageData(0, 0, this._layer.options.tileSize, this._layer.options.tileSize);
- var pix = imgd.data;
- for (var i = 0, n = pix.length; i < n; i += 4) {
- 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();
- }
+ img.crossOrigin = '';
+ var canvas = document.createElement("canvas");
+ canvas.width = img.width;
+ canvas.height = img.height;
+ var ctx = canvas.getContext("2d");
+ ctx.drawImage(img, 0, 0);
- 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();
}
});
diff --git a/www/external/css/dvf.css b/www/external/css/dvf.css
deleted file mode 100644
index 8964a36..0000000
--- a/www/external/css/dvf.css
+++ /dev/null
@@ -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;
-}
-
diff --git a/www/external/css/leaflet.label.css b/www/external/css/leaflet.label.css
deleted file mode 100644
index 95e6096..0000000
--- a/www/external/css/leaflet.label.css
+++ /dev/null
@@ -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: "";
-}
diff --git a/www/external/easyPrint/bundle.js b/www/external/easyPrint/bundle.js
new file mode 100644
index 0000000..184bb88
--- /dev/null
+++ b/www/external/easyPrint/bundle.js
@@ -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'").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:""};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('')));var s=t(l);if((s=e("").append(s)).find(a.noPrintSelector).remove(),s.append(t(f)),a.title){var p=e("title",s);0===p.length&&(p=e("
= 0\n }\n\n switch (ph.type) {\n case 'b':\n arg = parseInt(arg, 10).toString(2)\n break\n case 'c':\n arg = String.fromCharCode(parseInt(arg, 10))\n break\n case 'd':\n case 'i':\n arg = parseInt(arg, 10)\n break\n case 'j':\n arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)\n break\n case 'e':\n arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()\n break\n case 'f':\n arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)\n break\n case 'g':\n arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)\n break\n case 'o':\n arg = (parseInt(arg, 10) >>> 0).toString(8)\n break\n case 's':\n arg = String(arg)\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n break\n case 't':\n arg = String(!!arg)\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n break\n case 'T':\n arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n break\n case 'u':\n arg = parseInt(arg, 10) >>> 0\n break\n case 'v':\n arg = arg.valueOf()\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n break\n case 'x':\n arg = (parseInt(arg, 10) >>> 0).toString(16)\n break\n case 'X':\n arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\n break\n }\n if (re.json.test(ph.type)) {\n output += arg\n }\n else {\n if (re.number.test(ph.type) && (!is_positive || ph.sign)) {\n sign = is_positive ? '+' : '-'\n arg = arg.toString().replace(re.sign, '')\n }\n else {\n sign = ''\n }\n pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '\n pad_length = ph.width - (sign + arg).length\n pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\n output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\n }\n }\n }\n return output\n }\n\n var sprintf_cache = Object.create(null)\n\n function sprintf_parse(fmt) {\n if (sprintf_cache[fmt]) {\n return sprintf_cache[fmt]\n }\n\n var _fmt = fmt, match, parse_tree = [], arg_names = 0\n while (_fmt) {\n if ((match = re.text.exec(_fmt)) !== null) {\n parse_tree.push(match[0])\n }\n else if ((match = re.modulo.exec(_fmt)) !== null) {\n parse_tree.push('%')\n }\n else if ((match = re.placeholder.exec(_fmt)) !== null) {\n if (match[2]) {\n arg_names |= 1\n var field_list = [], replacement_field = match[2], field_match = []\n if ((field_match = re.key.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\n if ((field_match = re.key_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n }\n else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n }\n else {\n throw new SyntaxError('[sprintf] failed to parse named argument key')\n }\n }\n }\n else {\n throw new SyntaxError('[sprintf] failed to parse named argument key')\n }\n match[2] = field_list\n }\n else {\n arg_names |= 2\n }\n if (arg_names === 3) {\n throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\n }\n\n parse_tree.push(\n {\n placeholder: match[0],\n param_no: match[1],\n keys: match[2],\n sign: match[3],\n pad_char: match[4],\n align: match[5],\n width: match[6],\n precision: match[7],\n type: match[8]\n }\n )\n }\n else {\n throw new SyntaxError('[sprintf] unexpected placeholder')\n }\n _fmt = _fmt.substring(match[0].length)\n }\n return sprintf_cache[fmt] = parse_tree\n }\n\n /**\n * export to either browser or node.js\n */\n /* eslint-disable quote-props */\n if (typeof exports !== 'undefined') {\n exports['sprintf'] = sprintf\n exports['vsprintf'] = vsprintf\n }\n if (typeof window !== 'undefined') {\n window['sprintf'] = sprintf\n window['vsprintf'] = vsprintf\n\n if (typeof define === 'function' && define['amd']) {\n define(function() {\n return {\n 'sprintf': sprintf,\n 'vsprintf': vsprintf\n }\n })\n }\n }\n /* eslint-enable quote-props */\n}(); // eslint-disable-line\n"]} \ No newline at end of file diff --git a/www/external/theme.blue.css b/www/external/theme.blue.css deleted file mode 100644 index 74e9ef2..0000000 --- a/www/external/theme.blue.css +++ /dev/null @@ -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; -} diff --git a/www/external/widget-pager.js b/www/external/widget-pager.js deleted file mode 100644 index 43e879c..0000000 --- a/www/external/widget-pager.js +++ /dev/null @@ -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 += ''; - } - 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('