SVN merge with latest changes in trunk.
This commit is contained in:
commit
2892708399
Notes:
subgit
2018-03-07 17:59:07 +01:00
r768 www/branches/life
4
.gitattributes
vendored
4
.gitattributes
vendored
@ -5,7 +5,9 @@ www/copyright.inc.de -text
|
||||
www/external/TileLayer.Grayscale.js -text
|
||||
www/external/css/dvf.css -text
|
||||
www/external/css/leaflet.label.css -text
|
||||
www/external/easyPrint.css -text
|
||||
www/external/first.png -text
|
||||
www/external/jQuery.print.js -text
|
||||
www/external/jquery.localtime-0.9.1.min.js -text
|
||||
www/external/jquery.tablesorter.min.js -text
|
||||
www/external/jquery.tablesorter.pager.css -text
|
||||
@ -14,10 +16,12 @@ www/external/jquery.tablesorter.widgets.min.js -text
|
||||
www/external/last.png -text
|
||||
www/external/leaflet-dvf.markers.min.js -text
|
||||
www/external/leaflet.css -text
|
||||
www/external/leaflet.easyPrint.js -text
|
||||
www/external/leaflet.js -text
|
||||
www/external/leaflet.label.js -text
|
||||
www/external/next.png -text
|
||||
www/external/prev.png -text
|
||||
www/external/print.png -text
|
||||
www/external/sprintf.min.js -text
|
||||
www/external/theme.blue.css -text
|
||||
www/external/widget-pager.js -text
|
||||
|
20
www/external/easyPrint.css
vendored
Normal file
20
www/external/easyPrint.css
vendored
Normal file
@ -0,0 +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;
|
||||
}
|
161
www/external/jQuery.print.js
vendored
Normal file
161
www/external/jQuery.print.js
vendored
Normal file
@ -0,0 +1,161 @@
|
||||
/* 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);
|
28
www/external/leaflet.easyPrint.js
vendored
Normal file
28
www/external/leaflet.easyPrint.js
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
|
||||
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();
|
||||
};
|
||||
|
BIN
www/external/print.png
vendored
Normal file
BIN
www/external/print.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 219 B |
@ -91,10 +91,10 @@ var stationTable = {};
|
||||
var config = {
|
||||
ajax: {
|
||||
timeout: 10000, // 10 seconds
|
||||
eventURL: 'https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/event/1/query',
|
||||
eventURL: '/fdsnws/event/1/query',
|
||||
dlsvURL: 'dlsv',
|
||||
mseedURL: 'https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/dataselect/1/query',
|
||||
stationURL: 'https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/station/1/query',
|
||||
mseedURL: '/fdsnws/dataselect/1/query',
|
||||
stationURL: '/fdsnws/station/1/query',
|
||||
nominatimURL: '//open.mapquestapi.com/nominatim/v1/reverse.php',
|
||||
// nominatimURL: '//nominatim.openstreetmap.org/reverse',
|
||||
timespan: 60,
|
||||
|
@ -1,11 +1,11 @@
|
||||
/* $Id$ */
|
||||
var specialEvents = [
|
||||
'bug2014ldts', // Darmstadt
|
||||
'bug2014kowj', // Vogtland 5.0
|
||||
'bug2014jptq', // Seeheim-Jugenheim
|
||||
'bug2014infb', // Troisdorf
|
||||
'bug2014ilxd', // Bassum
|
||||
'bug2014gfzw', // Darmstadt
|
||||
'bug2014datb', // Groningen
|
||||
'bug2013yvko', // Haltern 3.4
|
||||
];
|
||||
//'bug2014ldts', // Darmstadt
|
||||
//'bug2014kowj', // Vogtland 5.0
|
||||
//'bug2014jptq', // Seeheim-Jugenheim
|
||||
//'bug2014infb', // Troisdorf
|
||||
//'bug2014ilxd', // Bassum
|
||||
//'bug2014gfzw', // Darmstadt
|
||||
//'bug2014datb', // Groningen
|
||||
//'bug2013yvko', // Haltern 3.4
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user