From 9e4fce4b7d3bf9c120a96ecd6e3c9af009f1306a Mon Sep 17 00:00:00 2001 From: "Kasper D. Fischer" Date: Tue, 14 Jul 2020 22:17:49 +0200 Subject: [PATCH 1/5] change jquery to version 3.0.0 and adding jquery-migrate script --- .gitignore | 2 ++ www/index.html.de | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 43b91ee..21ddca3 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ www/geolocationTable.js www/stations.xml .vscode/settings.json + +www/index.html diff --git a/www/index.html.de b/www/index.html.de index 0943ff0..ea89fa1 100755 --- a/www/index.html.de +++ b/www/index.html.de @@ -8,8 +8,8 @@ - - + + @@ -18,8 +18,9 @@ - - + + + From ca3b5731c187f31721a22579a571b8558e4fe47a Mon Sep 17 00:00:00 2001 From: "Kasper D. Fischer" Date: Wed, 15 Jul 2020 13:57:51 +0200 Subject: [PATCH 2/5] update of jQuery to version 3.0.0 --- www/events.js | 8 +- www/external/{ => css}/easyPrint.css | 40 +- www/external/{ => css}/print.png | Bin www/external/jQuery.print.js | 161 ---- www/external/jQuery.print.min.js | 6 + www/external/jquery.tablesorter.min.js | 5 - www/external/jquery.tablesorter.pager.css | 42 - www/external/jquery.tablesorter.pager.min.js | 2 - .../jquery.tablesorter.widgets.min.js | 17 - www/external/sprintf.min.js | 4 +- www/external/sprintf.min.js.map | 1 + www/external/widget-pager.js | 863 ------------------ www/index.html.de | 23 +- www/misc.js | 13 +- www/stations.js | 4 +- 15 files changed, 54 insertions(+), 1135 deletions(-) rename www/external/{ => css}/easyPrint.css (93%) rename www/external/{ => css}/print.png (100%) delete mode 100644 www/external/jQuery.print.js create mode 100644 www/external/jQuery.print.min.js delete mode 100644 www/external/jquery.tablesorter.min.js delete mode 100644 www/external/jquery.tablesorter.pager.css delete mode 100644 www/external/jquery.tablesorter.pager.min.js delete mode 100644 www/external/jquery.tablesorter.widgets.min.js create mode 100644 www/external/sprintf.min.js.map delete mode 100644 www/external/widget-pager.js 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/external/easyPrint.css b/www/external/css/easyPrint.css similarity index 93% rename from www/external/easyPrint.css rename to www/external/css/easyPrint.css index 1b1189a..177e148 100644 --- a/www/external/easyPrint.css +++ b/www/external/css/easyPrint.css @@ -1,20 +1,20 @@ - -.leaflet-control-easyPrint a { - background:#fff url(print.png) no-repeat 5px; - background-size:16px 16px; - display: block; - } - - - -@media print { - - html {padding: 0px!important;} - .leaflet-control-easyPrint-button{display: none!important;} - -} - -#map { - width: 1200; - height: 800; -} + +.leaflet-control-easyPrint a { + background:#fff url(print.png) no-repeat 5px; + background-size:16px 16px; + display: block; + } + + + +@media print { + + html {padding: 0px!important;} + .leaflet-control-easyPrint-button{display: none!important;} + +} + +#map { + width: 1200; + height: 800; +} diff --git a/www/external/print.png b/www/external/css/print.png similarity index 100% rename from www/external/print.png rename to www/external/css/print.png diff --git a/www/external/jQuery.print.js b/www/external/jQuery.print.js deleted file mode 100644 index 8942ab9..0000000 --- a/www/external/jQuery.print.js +++ /dev/null @@ -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 = $("").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, $('')); - } - - // Create a copy of the element to print - var copy = $this.clone(); - // Wrap it in a span to get the HTML markup string - copy = $("").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 = $('