summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/leaflet-soton.css14
-rw-r--r--src/leaflet-soton.js25
2 files changed, 21 insertions, 18 deletions
diff --git a/src/leaflet-soton.css b/src/leaflet-soton.css
index f529f60..1baa2f4 100644
--- a/src/leaflet-soton.css
+++ b/src/leaflet-soton.css
@@ -5,6 +5,15 @@
.ls-popup-title {
font: 25px/16px Arial, Helvetica, sans-serif;
}
+
+.ls-popup-title-name {
+ text-decoration: none;
+}
+
+.ls-popup-title-name:hover {
+ text-decoration: underline;
+}
+
.ls-popup-title-ref {
background-color: black;
color: white;
@@ -12,11 +21,6 @@
border-radius: 3px;
}
-.ls-popup-uri {
- text-align: right;
- text-decoration: none;
-}
-
.ls-levelselector {
line-height: 18px;
color: #555;
diff --git a/src/leaflet-soton.js b/src/leaflet-soton.js
index 6116704..238a921 100644
--- a/src/leaflet-soton.js
+++ b/src/leaflet-soton.js
@@ -1638,23 +1638,22 @@ SELECT * WHERE {\
}
if ('name' in properties) {
- var span = document.createElement( "span" );
- span.classList.add("ls-popup-title-name");
- span.textContent = properties.name;
- title.appendChild( span );
- }
+ if ('uri' in properties) {
+ var link = document.createElement('a');
+ link.setAttribute('href', properties.uri);
+ link.className = 'ls-popup-title-name';
- if ('uri' in properties) {
- var link = document.createElement('a');
- link.setAttribute('href', properties.uri);
- link.setAttribute('target', '_blank');
- link.className = 'ls-popup-uri';
- link.textContent = "(Full Information)";
+ link.textContent = properties.name;
- documentFragment.appendChild(link);
+ title.appendChild(link);
+ } else {
+ var span = document.createElement( "span" );
+ span.classList.add("ls-popup-title-name");
+ span.textContent = properties.name;
+ title.appendChild( span );
+ }
}
-
var div_inner = document.createElement("div");
div_inner.classList.add("ls-popup-content");
contentFunction(div_inner);