var trialTitle =ZU.xpathText(doc, '//div[@class="sessionsPaper"]/div[@class="sessions-paper-main-title"]'); // updated @class name
newItem.url= url;
var sessDate =ZU.xpathText(doc, '//div[@class="sessionsPaper"]/div[@class="sessions-paper-date"]'); // add session date, as the date is now in a gettable node
newItem.date=ZU.strToISO(sessDate);
newItem.date=ZU.strToISO(sessDate);
if (newItem.itemType=="case"&&newItem.title&&newItem.title==newItem.title.toUpperCase()) {
newItem.title=ZU.capitalizeTitle(trialTitle, true); // todo tidying this up - sometimes no name, messy punctuation
var referenceNo =ZU.xpathText(doc, '//div[@class="ob-panel"][1]/table[@class="ob-info-table"][1]/tbody/tr[th[contains(text(),"Reference")]]/td').trim(); // changed fetching Reference number
newItem.extra="Reference Number: "+ referenceNo; // putting the ref number in the Extra field had a particular function, was it for Voyant? or the defunct DMCI plugin? retain it at least for now (non trials will want it anyway)
if (newItem.itemType=="case") {
newItem.docketNumber= referenceNo;
newItem.docketNumber= referenceNo;
}
if (newItem.itemType=="book") {
@@ -143,7 +153,7 @@ if (newItem.itemType == "case") {
// use print-friendly URLs for snapshots
var attachmentUrl ="https://www.oldbaileyonline.org/print.jsp?div="+ referenceNo;
var attachmentUrl ="https://www.oldbaileyonline.org/print.jsp?div="+ referenceNo;
newItem.attachments.push({ url : attachmentUrl, title :"OBO Snapshot", mimeType :"text/html" });
0 comments on commit
cf1f2a4