Browse Source

Popup Footer: use a list for links

master
parent
commit
a4cc3b710b
  1. 6
      src/CategoryOverpass.js
  2. 10
      style.css

6
src/CategoryOverpass.js

@ -391,9 +391,9 @@ CategoryOverpass.prototype.updatePopupContent = function (object, popup) {
popupBody.innerHTML = this.popupBodyTemplate.render(data) popupBody.innerHTML = this.popupBodyTemplate.render(data)
} }
var footer = document.createElement('div')
footer.className = 'footer'
var footerContent = '<a class="showDetails" href="#' + this.id + '/' + object.id + '/details">' + lang('show details') + '</a>'
var footer = document.createElement('ul')
footer.className = 'popup-footer'
var footerContent = '<li><a class="showDetails" href="#' + this.id + '/' + object.id + '/details">' + lang('show details') + '</a></li>'
footer.innerHTML = footerContent footer.innerHTML = footerContent
popup._contentNode.appendChild(footer) popup._contentNode.appendChild(footer)

10
style.css

@ -109,11 +109,13 @@ a:active {
margin-left: 0; margin-left: 0;
} }
#content a.showDetails {
display: none;
.leaflet-popup-content ul.popup-footer {
padding: 0;
} }
a.showDetails {
display: block;
.leaflet-popup-content ul.popup-footer li {
display: inline-block;
list-style: none;
padding-right: 1em;
} }
/* Footer */ /* Footer */

Loading…
Cancel
Save