"+data.phraseAvailableFrom+": "+formatDate(new Date(data.DateOnSale) )+"
"; } if(data.Title) { titleHTML+=""+data.Title+"
"; } if(data.SubTitle) { titleHTML+=""+data.SubTitle+"
"; } // shop link var shopHTML = ""; if(data.isOnShop=="yes" && data.ShopURL && data.issueStatus!='future') { var shopText = data.phraseBuyOnline; if(data.soldOut=="yes") { shopText = data.phraseSoldOut; } shopHTML = ''+shopText+''; } // online content // console.log( data.onlineContentUploaded ); // console.log( data.onlineContentLive ); // NOTE: add this to phrases system if(data.onlineContentUploaded=="yes" && data.onlineContentLive=="yes") { if(shopHTML) { shopHTML+=" "; } var contentURL = '/online-content/?ID='+issueID; if(isMaggie) { contentURL='issue_onlineContent.asp?IssueID='+issueID; } shopHTML+='Online Content'; } if(shopHTML) { shopHTML = ''+shopHTML+'
Read online: "+onlineHTML+"
"; } // put the html on the page (technically should only be one panel, but loop through just in case) $(issuePanels).each(function() { $(this).html( "" + coverHTML + "
");
});
});
return issuePanels;
};
})( jQuery );
jQuery(document).ready(function($) {
var issueID = getQuerystring("issueID",0)
$('#issueDetail').issueDetail(12, issueID, 'no');
});
// this should be put in a central functions area
function getQuerystring(key, default_)
{
if (default_==null) default_="";
key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regex = new RegExp("[\\?&]"+key+"=([^]*)");
var qs = regex.exec(window.location.href);
if(qs == null)
return default_;
else
return qs[1];
}
" + titleHTML + shopHTML + onlineHTML + bodyHTML + onlineHTML + shopHTML + "