Commit 252c4086 authored by Maxime Chaillet's avatar Maxime Chaillet

use comma instead of semi colon to separate authors.

parent cb24e106
function DOIController(e){this.doiServer="https://data.datacite.org/",this.acceptedPrefix=["10.5072","10.15151"],this.view=e}function findRegExpInText(e,t){return t.search(e)}function extractDates(e){e.mintingYear=new Date(e.date_registered).getFullYear();var t=new Date(e.date_collected);e.sessionDate=t.getFullYear()+"-"+t.getMonth()+"-"+t.getDate();var a=new Date(e.publication_year+"-01-01T00:00+00:00"),n=new Date;e.accessMessage=n>a?"The data can be downloaded by clicking on the link below":"The data is under embargo until <b>"+e.publication_year+"</b> but could be released earlier. It is currently only available to download if you are a member of the proposal team."}function extractFields(e){_.forEach(e.subject[0],function(t){switch(t.subject_scheme){case"Proposal Type Description":e.proposalType=t.text;break;case"Proposal":e.proposalNumber=t.text;break;case"instrument":e.beamline=t.text}})}function extractFieldsFromDoi(e){var t=RegExp(/\/\w*-*[Ee][Ss][Rr][Ff]-[Ee][Ss]-(\d+)$/);e.investigationId=t.exec(e.doi)[1]}function createCitation(e){var t=_.transform(e.creator,function(e,t){if(t.givenName)e.push(t.familyName+" "+t.givenName);else{var a=new RegExp(/\s([^a-z]+$)/),n=new RegExp(/^(.[^A-Z]+)+\b/),r=a.exec(t.name),i=n.exec(t.name);if(r&&i)e.push(r[1]+" "+i[0].trim());else{var s=new RegExp(/(\S+)/g),o=t.name.match(s);2===o.length?e.push(o[1]+" "+o[0]):e.push(t.name)}}},[]),a=_.join(t,"; ")+". ("+new Date(e.date_registered).getFullYear()+"). "+e.title+". "+e.publisher+" (ESRF). <a href='https://doi.esrf.fr/"+e.DOI+"'> doi:"+e.doi+"</a>";e.citation=a}function DOIView(){}var BEAMLINEURL=[{name:"BM05",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/BM05"},{name:"BM29",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/BM29"},{name:"CM01",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MX/About_our_beamlines/CM01.html"},{name:"ID01",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/XNP/ID01"},{name:"ID06",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MEx/id06-large-volume-press.html"},{name:"ID11",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/StructMaterials/ID11"},{name:"ID16A",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/ID16A"},{name:"ID16B",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/ID16B"},{name:"ID17",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/CBS/ID17"},{name:"ID19",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/home/UsersAndScience/Experiments/StructMaterials/ID19.html"},{name:"ID21",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/XNP/ID21"},{name:"ID22",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/id22"},{name:"ID23-1",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/ID23-1"},{name:"ID23-2",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/ID23-2"},{name:"ID29",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/Beamlines/content/content/id29.html"},{name:"ID30A1",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/MASSIF1"},{name:"ID30A3",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MX/About_our_beamlines/id30a-3--massif-3.html"},{name:"ID30B",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/id30b"},{name:"ID32",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/ID32"}];DOIController.prototype.getData=function(e){var t=this;this.view.setDOI(e),this.hasAcceptedPrefix(e)?$.ajax({headers:{Accept:"application/vnd.datacite.datacite+json"},type:"GET",url:this.doiServer+e,beforeSend:function(){t.view.setLoading("Retrieving data from Server")},complete:function(){t.view.setLoading(!1)},success:function(e){if(e){extractDates(e),extractFields(e),extractFieldsFromDoi(e),createCitation(e);var a=new Date(e.date_collected+"T00:00+00:00");e.beamlineUrl=t.findsUrl(e.beamline,a),dust.render("esrf-landing-page",{data:e},function(e,t){$("#main").html(t)})}else"welcome-page"===t.origin?t.view.displayMessage("doi-not-found-page2","Sorry, the requested DOI was not found.","error"):t.view.displayMessage("doi-not-found-page","Sorry, the requested DOI was not found.","main")},error:function(e,a,n){"welcome-page"===t.origin?t.view.displayMessage("doi-not-found-page2","<h3> Not found ! </h3> <p> Sorry, there was a connexion problem with the datacite server. </p>","error"):t.view.displayMessage("doi-not-found-page","<h2> Not found ! </h2> <p> Sorry, there was a connexion problem with the datacite server. </p>","main"),t.view.setLoading(!1)}}):"welcome-page"===t.origin?t.view.displayMessage("doi-not-found-page2","<h3> Not found ! </h3> <p> The DOI <b>"+e+'</b> was not found at ESRF because its prefix is not ESRF specific. Please use the DOI search engine at <a href="https://www.doi.org"> doi.org</a>. </p>',"error"):t.view.displayMessage("doi-not-found-page","<h2> Not found ! </h2> <p> The DOI <b>"+e+'</b> was not found at ESRF because its prefix is not ESRF specific. </br> Please use the DOI search engine at <a href="https://www.doi.org"> doi.org</a>.</p>',"main")},DOIController.prototype.hasAcceptedPrefix=function(e){var t=e.split("/")[0];return-1!=_.findIndex(this.acceptedPrefix,function(e){return t==e})},DOIController.prototype.displayMainContent=function(e){"welcome-page"===this.origin&&dust.render("welcome-page",{},function(e,t){$("#main").html(t)}),"index"===this.origin&&this.getData(e)},DOIController.prototype.setOrigin=function(e){this.origin=e},DOIController.prototype.findsUrl=function(e,t){for(var a="noLink",n=0;BEAMLINEURL[n]&&"noLink"===a;){var r=new Date(BEAMLINEURL[n].startDate),i=new Date(BEAMLINEURL[n].endDate);BEAMLINEURL[n].name.toLowerCase()===e.toLowerCase()&&t>r&&t<i&&(a=BEAMLINEURL[n].url),n++}return a},DOIView.prototype.setLoading=function(e){0!=e?$("body").addClass("loading"):$("body").removeClass("loading")},DOIView.prototype.setDOI=function(e){$("#doiPanel").html(e)},DOIView.prototype.displayMessage=function(e,t,a){dust.render(e,{message:t},function(e,t){$("#"+a).html(t)})};
\ No newline at end of file
function DOIController(e){this.doiServer="https://data.datacite.org/",this.acceptedPrefix=["10.5072","10.15151"],this.view=e}function findRegExpInText(e,t){return t.search(e)}function extractDates(e){e.mintingYear=new Date(e.date_registered).getFullYear();var t=new Date(e.date_collected);e.sessionDate=t.getFullYear()+"-"+t.getMonth()+"-"+t.getDate();var a=new Date(e.publication_year+"-01-01T00:00+00:00"),n=new Date;e.accessMessage=n>a?"The data can be downloaded by clicking on the link below":"The data is under embargo until <b>"+e.publication_year+"</b> but could be released earlier. It is currently only available to download if you are a member of the proposal team."}function extractFields(e){_.forEach(e.subject[0],function(t){switch(t.subject_scheme){case"Proposal Type Description":e.proposalType=t.text;break;case"Proposal":e.proposalNumber=t.text;break;case"instrument":e.beamline=t.text}})}function extractFieldsFromDoi(e){var t=RegExp(/\/\w*-*[Ee][Ss][Rr][Ff]-[Ee][Ss]-(\d+)$/);e.investigationId=t.exec(e.doi)[1]}function createCitation(e){var t=_.transform(e.creator,function(e,t){if(t.givenName)e.push(t.familyName+" "+t.givenName);else{var a=new RegExp(/\s([^a-z]+$)/),n=new RegExp(/^(.[^A-Z]+)+\b/),r=a.exec(t.name),i=n.exec(t.name);if(r&&i)e.push(r[1]+" "+i[0].trim());else{var s=new RegExp(/(\S+)/g),o=t.name.match(s);2===o.length?e.push(o[1]+" "+o[0]):e.push(t.name)}}},[]),a=_.join(t,", ")+". ("+new Date(e.date_registered).getFullYear()+"). "+e.title+". "+e.publisher+" (ESRF). <a href='https://doi.esrf.fr/"+e.DOI+"'> doi:"+e.doi+"</a>";e.citation=a}function DOIView(){}var BEAMLINEURL=[{name:"BM05",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/BM05"},{name:"BM29",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/BM29"},{name:"CM01",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MX/About_our_beamlines/CM01.html"},{name:"ID01",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/XNP/ID01"},{name:"ID06",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MEx/id06-large-volume-press.html"},{name:"ID11",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/StructMaterials/ID11"},{name:"ID16A",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/ID16A"},{name:"ID16B",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/ID16B"},{name:"ID17",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/CBS/ID17"},{name:"ID19",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/home/UsersAndScience/Experiments/StructMaterials/ID19.html"},{name:"ID21",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/XNP/ID21"},{name:"ID22",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/id22"},{name:"ID23-1",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/ID23-1"},{name:"ID23-2",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/ID23-2"},{name:"ID29",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/Beamlines/content/content/id29.html"},{name:"ID30A1",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/MASSIF1"},{name:"ID30A3",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MX/About_our_beamlines/id30a-3--massif-3.html"},{name:"ID30B",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/id30b"},{name:"ID32",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/ID32"}];DOIController.prototype.getData=function(e){var t=this;this.view.setDOI(e),this.hasAcceptedPrefix(e)?$.ajax({headers:{Accept:"application/vnd.datacite.datacite+json"},type:"GET",url:this.doiServer+e,beforeSend:function(){t.view.setLoading("Retrieving data from Server")},complete:function(){t.view.setLoading(!1)},success:function(e){if(e){extractDates(e),extractFields(e),extractFieldsFromDoi(e),createCitation(e);var a=new Date(e.date_collected+"T00:00+00:00");e.beamlineUrl=t.findsUrl(e.beamline,a),dust.render("esrf-landing-page",{data:e},function(e,t){$("#main").html(t)})}else"welcome-page"===t.origin?t.view.displayMessage("doi-not-found-page2","Sorry, the requested DOI was not found.","error"):t.view.displayMessage("doi-not-found-page","Sorry, the requested DOI was not found.","main")},error:function(e,a,n){"welcome-page"===t.origin?t.view.displayMessage("doi-not-found-page2","<h3> Not found ! </h3> <p> Sorry, there was a connexion problem with the datacite server. </p>","error"):t.view.displayMessage("doi-not-found-page","<h2> Not found ! </h2> <p> Sorry, there was a connexion problem with the datacite server. </p>","main"),t.view.setLoading(!1)}}):"welcome-page"===t.origin?t.view.displayMessage("doi-not-found-page2","<h3> Not found ! </h3> <p> The DOI <b>"+e+'</b> was not found at ESRF because its prefix is not ESRF specific. Please use the DOI search engine at <a href="https://www.doi.org"> doi.org</a>. </p>',"error"):t.view.displayMessage("doi-not-found-page","<h2> Not found ! </h2> <p> The DOI <b>"+e+'</b> was not found at ESRF because its prefix is not ESRF specific. </br> Please use the DOI search engine at <a href="https://www.doi.org"> doi.org</a>.</p>',"main")},DOIController.prototype.hasAcceptedPrefix=function(e){var t=e.split("/")[0];return-1!=_.findIndex(this.acceptedPrefix,function(e){return t==e})},DOIController.prototype.displayMainContent=function(e){"welcome-page"===this.origin&&dust.render("welcome-page",{},function(e,t){$("#main").html(t)}),"index"===this.origin&&this.getData(e)},DOIController.prototype.setOrigin=function(e){this.origin=e},DOIController.prototype.findsUrl=function(e,t){for(var a="noLink",n=0;BEAMLINEURL[n]&&"noLink"===a;){var r=new Date(BEAMLINEURL[n].startDate),i=new Date(BEAMLINEURL[n].endDate);BEAMLINEURL[n].name.toLowerCase()===e.toLowerCase()&&t>r&&t<i&&(a=BEAMLINEURL[n].url),n++}return a},DOIView.prototype.setLoading=function(e){0!=e?$("body").addClass("loading"):$("body").removeClass("loading")},DOIView.prototype.setDOI=function(e){$("#doiPanel").html(e)},DOIView.prototype.displayMessage=function(e,t,a){dust.render(e,{message:t},function(e,t){$("#"+a).html(t)})};
\ No newline at end of file
......@@ -223,7 +223,7 @@ function createCitation(data) {
}
}
},[]);
var authorString = _.join(authorList,'; ');
var authorString = _.join(authorList,', ');
var citation = authorString +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment