# HG changeset patch # User casties # Date 1450295592 -3600 # Node ID 954d6200336d82aa179f74b8703d9959a77688ec # Parent 608f5303cb46a44e62867e7844b896c1cd5f222c display live reference from Drupal in edit form (ticket #71). diff -r 608f5303cb46 -r 954d6200336d src/main/webapp/imageServer/resources/js/diva4ismi.js --- a/src/main/webapp/imageServer/resources/js/diva4ismi.js Wed Dec 16 18:26:34 2015 +0100 +++ b/src/main/webapp/imageServer/resources/js/diva4ismi.js Wed Dec 16 20:53:12 2015 +0100 @@ -108,31 +108,32 @@ -function showBibliographyEntryFormatted(bibId, bibInf, bibLoc){ - // extract endnote id number, call formatbiblioNumeric - var numIdPat = /#(\d+)/; - var numIdRes = numIdPat.exec(bibId); - var id = numIdRes[1]; +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+"/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) { - // 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); - } - }, - error: function(data) { - console.error('unable to load formatted bib entry ' + id); - } - }); + console.debug("setting up bib id=" + id + " at loc=" + loc); + $.ajax({ + 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) { + // 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); + } + }, + error : function(data) { + console.error('unable to load formatted bib entry ' + id); + } + }); } function loadWitnessInformation(json, titleId){ diff -r 608f5303cb46 -r 954d6200336d src/main/webapp/resources/components/ismi/refWidget.xhtml --- a/src/main/webapp/resources/components/ismi/refWidget.xhtml Wed Dec 16 18:26:34 2015 +0100 +++ b/src/main/webapp/resources/components/ismi/refWidget.xhtml Wed Dec 16 20:53:12 2015 +0100 @@ -13,6 +13,9 @@ + + + @@ -39,11 +42,19 @@ - + + + + + + + (loading reference...) + + diff -r 608f5303cb46 -r 954d6200336d src/main/webapp/search/displayAuthor.xhtml --- a/src/main/webapp/search/displayAuthor.xhtml Wed Dec 16 18:26:34 2015 +0100 +++ b/src/main/webapp/search/displayAuthor.xhtml Wed Dec 16 20:53:12 2015 +0100 @@ -7,11 +7,15 @@ xmlns:rich="http://richfaces.org/rich"> + + + +
+ rendered="#{!empty Session.displayAuthor.author.referenceList}" + rowKeyVar="cnt"> + - + - - - - - - + + + + + + (loading reference...) + @@ -241,25 +248,29 @@ value="#{Session.displayAuthor.title.tableOfContents}" escape="false" /> - - + + + rendered="#{!empty Session.displayAuthor.title.referenceList}" + rowKeyVar="cnt"> - + - - - - - - + + + + + + (loading reference...) + @@ -272,7 +283,7 @@ - + - + - + - - + + + rendered="#{!empty Session.displayAuthor.witness.referenceList}" + rowKeyVar="cnt"> - + - + - + + (loading reference...) diff -r 608f5303cb46 -r 954d6200336d src/main/webapp/search/displayTitle.xhtml --- a/src/main/webapp/search/displayTitle.xhtml Wed Dec 16 18:26:34 2015 +0100 +++ b/src/main/webapp/search/displayTitle.xhtml Wed Dec 16 20:53:12 2015 +0100 @@ -13,6 +13,9 @@ + + +
@@ -109,25 +112,29 @@ - - + + + rendered="#{!empty Session.displayTitle.title.referenceList}" + rowKeyVar="cnt"> - + - - - - - - + + + + + + (loading reference...) + @@ -216,7 +223,7 @@ - + - + + rendered="#{!empty Session.displayTitle.witness.referenceList}" + rowKeyVar="cnt"> - - - - - - - - - - - - - + + + + + + + + + + + + + (loading reference...) +