diff --git a/code/boot.js b/code/boot.js
index e0397ebe..d0391cf6 100644
--- a/code/boot.js
+++ b/code/boot.js
@@ -6,21 +6,20 @@
// be run once.
window.setupLargeImagePreview = function() {
- $('#portaldetails').on('click', '.imgpreview img', function() {
+ $('#portaldetails').on('click', '.imgpreview', function() {
var ex = $('#largepreview');
if(ex.length > 0) {
ex.remove();
return;
}
- var img = $(this).parent().html();
- var w = $(this)[0].naturalWidth/2;
- var h = $(this)[0].naturalHeight/2;
+ var img = $(this).html();
+ var w = $(this).find('img')[0].naturalWidth/2;
+ var h = $(this).find('img')[0].naturalHeight/2;
var c = $('#portaldetails').attr('class');
$('body').append(
'
' + img + '
'
);
$('#largepreview').click(function() { $(this).remove() });
- $('#largepreview img').attr('title', '');
});
}
diff --git a/code/portal_detail_display.js b/code/portal_detail_display.js
index 703af772..1645b639 100644
--- a/code/portal_detail_display.js
+++ b/code/portal_detail_display.js
@@ -57,13 +57,16 @@ window.renderPortalDetails = function(guid) {
var lat = d.locationE6.latE6;
var lng = d.locationE6.lngE6;
var perma = 'http://ingress.com/intel?latE6='+lat+'&lngE6='+lng+'&z=17&pguid='+guid;
+ var imgTitle = 'title="'+getPortalDescriptionFromDetails(d)+'\n\nClick to show full image."';
$('#portaldetails')
.attr('class', TEAM_TO_CSS[getTeam(d)])
.html(''
+ ''+d.portalV2.descriptiveText.TITLE+'
'
// help cursor via “.imgpreview img”
- + ''
+ + ''
+ + '

'
+ + '
'
+ ''+Math.floor(getPortalLevel(d))+''
+ ''+getModDetails(d)+'
'
+ ''+randDetails+'
'
diff --git a/style.css b/style.css
index 46ffb18c..dc2a691d 100644
--- a/style.css
+++ b/style.css
@@ -18,6 +18,7 @@ body:after {
html, body, #map {
height: 100%;
+ width: 100%;
}
body {
@@ -411,11 +412,13 @@ h3 {
.imgpreview {
height: 200px;
- overflow: hidden;
+ background: no-repeat center center;
+ background-size: contain;
+ cursor: help;
}
-.imgpreview img {
- cursor: help;
+.imgpreview img.hide {
+ display: none;
}
#level {