This commit is contained in:
kasper committed 2014-05-15 10:17:06 +00:00
commit 6b3c421ba8
6 files changed
+86 -23
Notes: subgit 2018-03-07 17:58:55 +01:00
r653 www/branches/life

No files matched your search

+2
View File
@@ -1,6 +1,7 @@
* text=auto !eol
www/external/TileLayer.Grayscale.js -text
www/external/css/dvf.css -text
www/external/css/leaflet.label.css -text
www/external/first.png -text
www/external/jquery.localtime-0.9.1.min.js -text
www/external/jquery.tablesorter.min.js -text
@@ -11,6 +12,7 @@ www/external/last.png -text
www/external/leaflet-dvf.markers.min.js -text
www/external/leaflet.css -text
www/external/leaflet.js -text
www/external/leaflet.label.js -text
www/external/next.png -text
www/external/prev.png -text
www/external/sprintf.min.js -text
+1
View File
@@ -145,6 +145,7 @@ function ajaxLoadEvents(stime, etime) {
$("#eventstable").trigger("sorton", [sort]);
initMapLink();
eventLayer.bringToBack();
highlightFirstEvent();
},
error: function( jqxhr, textStatus, error ) {
var err = textStatus + ", " + error;
+54
View File
@@ -0,0 +1,54 @@
.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: "";
}
+9
View File
@@ -0,0 +1,9 @@
/*
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
+19 -21
View File
@@ -8,42 +8,40 @@
<!-- Style definitions -->
<link rel="stylesheet" href="main.css" />
<!-- jQuery & jQueryUI -->
<!-- link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" / -->
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/cupertino/jquery-ui.css" />
<link rel="stylesheet" href="external/theme.blue.css"/>
<link rel="stylesheet" href="external/jquery.tablesorter.pager.css" />
<link rel="stylesheet" href="external/leaflet.css" />
<!-- link rel="stylesheet" href="external/css/dvf.css" type="text/css" media="screen" / -->
<link rel="stylesheet" href="external/css/leaflet.label.css" type="text/css" media="screen" />
<!-- jQuery & jQueryUI -->
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<!-- Localtime -->
<!-- Localtime & sprintf -->
<script type="text/javascript" src="external/jquery.localtime-0.9.1.min.js"></script>
<!-- Tablesorter: required -->
<link rel="stylesheet" href="external/theme.blue.css"/>
<script type="text/javascript" src="external/jquery.tablesorter.min.js"></script>
<!-- script type="text/javascript" src="external/widget-scroller.js"></script -->
<script type="text/javascript" src="external/jquery.tablesorter.widgets.min.js"></script>
<script type="text/javascript" src="external/jquery.tablesorter.pager.min.js"></script>
<!-- misc functions -->
<script type="text/javascript" src="misc.js"></script>
<script type="text/javascript" src="geolocation.js"></script>
<script type="text/javascript" src="external/sprintf.min.js"></script>
<!-- Tablesorter: pager -->
<link rel="stylesheet" href="external/jquery.tablesorter.pager.css" />
<!-- Tablesorter: required -->
<script type="text/javascript" src="external/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="external/jquery.tablesorter.widgets.min.js"></script>
<script type="text/javascript" src="external/widget-pager.js"></script>
<script type="text/javascript" src="events.js"></script>
<!-- script type="text/javascript" src="external/jquery.tablesorter.pager.min.js"></script -->
<!-- script type="text/javascript" src="external/widget-scroller.js"></script -->
<!-- Leaflet -->
<link rel="stylesheet" href="external/leaflet.css" />
<script type="text/javascript" src="external/leaflet.js"></script>
<script type="text/javascript" src="external/TileLayer.Grayscale.js"></script>
<script type="text/javascript" src="map.js"></script>
<link rel="stylesheet" href="external/css/dvf.css" type="text/css" media="screen" />
<script type="text/javascript" src="external/leaflet-dvf.markers.min.js"></script>
<script type="text/javascript" src="external/leaflet.label.js"></script>
<!-- Stations -->
<!-- Map, Events & Stations -->
<script type="text/javascript" src="misc.js"></script>
<script type="text/javascript" src="geolocation.js"></script>
<script type="text/javascript" src="map.js"></script>
<script type="text/javascript" src="events.js"></script>
<script type="text/javascript" src="stations.js"></script>
</head>
+1 -2
View File
@@ -34,9 +34,8 @@ function addStationMarker(id, lat, lng, station) {
opacity: 1,
radius: config['station']['markerSize'][id] || config['station']['markerSize']['default'],
className: id+' stationMarker',
title: station,
alt: station,
});
marker.bindLabel('Station '+station);
stationLayer.addLayer(marker);
stationTable[id] = marker;
};