Mercurial > hg > ismi-richfaces
changeset 35:3e8493684729
change ajax calls to formatbiblio to new formatbiblioNumeric.
author | casties |
---|---|
date | Fri, 22 May 2015 14:23:14 +0000 |
parents | 9087a4623a08 |
children | 5fdd27200bfd |
files | src/main/webapp/imageServer/resources/js/diva4ismi.js |
diffstat | 1 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/webapp/imageServer/resources/js/diva4ismi.js Thu May 21 22:27:14 2015 +0000 +++ b/src/main/webapp/imageServer/resources/js/diva4ismi.js Fri May 22 14:23:14 2015 +0000 @@ -1,10 +1,10 @@ var divaGlobal = { - rest_url : "http://localhost:8080/ismi-richfaces", + rest_url : "http://localhost:18080/ismi-richfaces", debugModus : false, //rest_url : "https://openmind-ismi-dev.mpiwg-berlin.mpg.de/om4-ismi", //rest_url : "http://ismi-dev.mpiwg-berlin.mpg.de:8080/ismi-richfaces", iipServerURL: "https://images.rasi.mcgill.ca/fcgi-bin/iipsrv.fcgi", - drupal_url: "https://drupal.mpiwg-berlin.mpg.de/ismi" + drupal_url: "https://ismi-dev.mpiwg-berlin.mpg.de/drupal-ismi" } function showTitleDetailsBig(titleId){ @@ -107,19 +107,23 @@ -function showBibliographyEntryFormatted(bibId,bibInf, bibLoc){ - var id=encodeURIComponent(bibId.trim()); +function showBibliographyEntryFormatted(bibId, bibInf, bibLoc){ + // extract endnote id number, call formatbiblioNumeric + var numIdPat = /#(\d+)/; + var numIdRes = numIdPat.exec(bibId); + var id = numIdRes[1]; var loc = bibLoc; console.debug("setting up bib id="+id+" at loc="+loc); $.ajax({ - url: divaGlobal.drupal_url+"/formatbiblio/"+id, + url: divaGlobal.drupal_url+"/formatbiblioNumeric/"+id, type: 'GET', success: function(data){ console.debug("got bib id="+id+" for loc="+loc); //inserting the template in this document //mache rel urls zu absoluten if (data.nodes.length > 0) { - var ref = data.nodes[0].node.citation.replace(new RegExp("/ismi","g"),divaGlobal.drupal_url); + // FIXME: better handling of relative URLs + var ref = data.nodes[0].node.citation.replace(new RegExp("/drupal-ismi","g"),divaGlobal.drupal_url); var bib = $(loc); bib.html(ref); }