data format change: portal details 'portalV2.descriptiveText' is now 'descriptiveText.map'. fields within this seem the same
needed to fix things after the stock intel site update of 2014-02-05
This commit is contained in:
parent
6797cf7e8b
commit
77cf149fef
@ -41,7 +41,7 @@ window.renderPortalDetails = function(guid) {
|
|||||||
|
|
||||||
|
|
||||||
var img = fixPortalImageUrl(details ? details.imageByUrl && details.imageByUrl.imageUrl : data.image);
|
var img = fixPortalImageUrl(details ? details.imageByUrl && details.imageByUrl.imageUrl : data.image);
|
||||||
var title = details ? details.portalV2.descriptiveText.TITLE : data.title;
|
var title = data.title;
|
||||||
|
|
||||||
var lat = data.latE6/1E6;
|
var lat = data.latE6/1E6;
|
||||||
var lng = data.lngE6/1E6;
|
var lng = data.lngE6/1E6;
|
||||||
@ -75,8 +75,8 @@ window.renderPortalDetails = function(guid) {
|
|||||||
if(portalDetailObj.description) {
|
if(portalDetailObj.description) {
|
||||||
portalDetailedDescription += '<tr class="padding-top"><th>Description:</th><td>' + escapeHtmlSpecialChars(portalDetailObj.description) + '</td></tr>';
|
portalDetailedDescription += '<tr class="padding-top"><th>Description:</th><td>' + escapeHtmlSpecialChars(portalDetailObj.description) + '</td></tr>';
|
||||||
}
|
}
|
||||||
// if(d.portalV2.descriptiveText.ADDRESS) {
|
// if(d.descriptiveText.map.ADDRESS) {
|
||||||
// portalDetailedDescription += '<tr><th>Address:</th><td>' + escapeHtmlSpecialChars(d.portalV2.descriptiveText.ADDRESS) + '</td></tr>';
|
// portalDetailedDescription += '<tr><th>Address:</th><td>' + escapeHtmlSpecialChars(d.descriptiveText.map.ADDRESS) + '</td></tr>';
|
||||||
// }
|
// }
|
||||||
|
|
||||||
portalDetailedDescription += '</table>';
|
portalDetailedDescription += '</table>';
|
||||||
|
@ -24,7 +24,7 @@ window.getRangeText = function(d) {
|
|||||||
|
|
||||||
// generates description text from details for portal
|
// generates description text from details for portal
|
||||||
window.getPortalDescriptionFromDetails = function(details) {
|
window.getPortalDescriptionFromDetails = function(details) {
|
||||||
var descObj = details.portalV2.descriptiveText;
|
var descObj = details.descriptiveText.map;
|
||||||
// FIXME: also get real description?
|
// FIXME: also get real description?
|
||||||
var desc = descObj.TITLE;
|
var desc = descObj.TITLE;
|
||||||
if(descObj.ADDRESS)
|
if(descObj.ADDRESS)
|
||||||
@ -37,7 +37,7 @@ window.getPortalDescriptionFromDetails = function(details) {
|
|||||||
// Grabs more info, including the submitter name for the current main
|
// Grabs more info, including the submitter name for the current main
|
||||||
// portal image
|
// portal image
|
||||||
window.getPortalDescriptionFromDetailsExtended = function(details) {
|
window.getPortalDescriptionFromDetailsExtended = function(details) {
|
||||||
var descObj = details.portalV2.descriptiveText;
|
var descObj = details.descriptiveText.map;
|
||||||
var photoStreamObj = details.photoStreamInfo;
|
var photoStreamObj = details.photoStreamInfo;
|
||||||
|
|
||||||
var submitterObj = new Object();
|
var submitterObj = new Object();
|
||||||
|
@ -327,7 +327,7 @@ window.getPortalSummaryData = function(d) {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
level: level,
|
level: level,
|
||||||
title: d.portalV2.descriptiveText.TITLE,
|
title: d.descriptiveText.map.TITLE,
|
||||||
image: d.imageByUrl && d.imageByUrl.imageUrl,
|
image: d.imageByUrl && d.imageByUrl.imageUrl,
|
||||||
resCount: resCount,
|
resCount: resCount,
|
||||||
latE6: d.locationE6.latE6,
|
latE6: d.locationE6.latE6,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// @id iitc-plugin-show-address@vita10gy
|
// @id iitc-plugin-show-address@vita10gy
|
||||||
// @name IITC plugin: show portal address in sidebar
|
// @name IITC plugin: show portal address in sidebar
|
||||||
// @category Portal Info
|
// @category Portal Info
|
||||||
// @version 0.2.3.@@DATETIMEVERSION@@
|
// @version 0.2.4.@@DATETIMEVERSION@@
|
||||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||||
// @updateURL @@UPDATEURL@@
|
// @updateURL @@UPDATEURL@@
|
||||||
// @downloadURL @@DOWNLOADURL@@
|
// @downloadURL @@DOWNLOADURL@@
|
||||||
@ -25,8 +25,8 @@ window.plugin.portalAddress.portalDetail = function(data) {
|
|||||||
// If there's 4 sets of comma delimited info the last one is the
|
// If there's 4 sets of comma delimited info the last one is the
|
||||||
// country, so get rid of it. If the country is in the [2] then it
|
// country, so get rid of it. If the country is in the [2] then it
|
||||||
// doesn't matter because address is usually short enough to fit.
|
// doesn't matter because address is usually short enough to fit.
|
||||||
var d = data.portalDetails.portalV2;
|
var d = data.portalDetails;
|
||||||
var address = d.descriptiveText.ADDRESS;
|
var address = d.descriptiveText.map.ADDRESS;
|
||||||
if (address) {
|
if (address) {
|
||||||
address = address.split(',').splice(0,3).join(',');
|
address = address.split(',').splice(0,3).join(',');
|
||||||
$('.imgpreview').append('<div id="address">'+address+'</div>');
|
$('.imgpreview').append('<div id="address">'+address+'</div>');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user