[portals-list] bugfix
This commit is contained in:
parent
b7d17991b7
commit
999149895a
@ -356,20 +356,21 @@ window.plugin.portalslist.getPortalLink = function(portal) {
|
|||||||
var coord = portal.getLatLng();
|
var coord = portal.getLatLng();
|
||||||
var perma = '/intel?ll='+coord.lat+','+coord.lng+'&z=17&pll='+coord.lat+','+coord.lng;
|
var perma = '/intel?ll='+coord.lat+','+coord.lng+'&z=17&pll='+coord.lat+','+coord.lng;
|
||||||
|
|
||||||
//Use Jquery to create the link, which escape characters in TITLE of portal
|
// jQuery's event handlers seem to be removed when the nodes are remove from the DOM
|
||||||
return $('<a>')
|
var link = document.createElement("a");
|
||||||
.text(portal.options.data.title)
|
link.textContent = portal.options.data.title;
|
||||||
.attr('href', perma)
|
link.href = perma;
|
||||||
.click(function(ev) {
|
link.addEventListener("click", function(ev) {
|
||||||
renderPortalDetails(portal.options.guid);
|
renderPortalDetails(portal.options.guid);
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
})
|
}, false);
|
||||||
.dblclick(function(ev) {
|
link.addEventListener("dblclick", function(ev) {
|
||||||
zoomToAndShowPortal(portal.options.guid, [coord.lat, coord.lng]);
|
zoomToAndShowPortal(portal.options.guid, [coord.lat, coord.lng]);
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
return link;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.plugin.portalslist.onPaneChanged = function(pane) {
|
window.plugin.portalslist.onPaneChanged = function(pane) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user