Merge pull request #759 from Fragger/portal-detail-display-fix

Fix details display showing outdated level/faction
This commit is contained in:
Jon Atkins 2014-02-03 09:09:12 -08:00
commit 5ae432d8fc

View File

@ -83,9 +83,8 @@ window.renderPortalDetails = function(guid) {
} }
// portal level. start with basic data - then extend with fractional info in tooltip if available // portal level. start with basic data - then extend with fractional info in tooltip if available
//FIXME: use details or data if possible, to avoid ambiguity var levelInt = (teamStringToId(data.team) == TEAM_NONE) ? 0 : data.level;
var levelInt = portal.options.level; var levelDetails = levelInt;
var levelDetails = portal.options.level;
if (details) { if (details) {
levelDetails = getPortalLevel(details); levelDetails = getPortalLevel(details);
if(levelDetails != 8) { if(levelDetails != 8) {
@ -126,7 +125,7 @@ window.renderPortalDetails = function(guid) {
$('#portaldetails') $('#portaldetails')
.html('') //to ensure it's clear .html('') //to ensure it's clear
.attr('class', TEAM_TO_CSS[portal.options.team]) //FIXME: use details/data if possible, to avoid ambiguity .attr('class', TEAM_TO_CSS[teamStringToId(data.team)])
.append( .append(
$('<h3>').attr({class:'title'}).text(data.title), $('<h3>').attr({class:'title'}).text(data.title),