#60

parent 59354aa6
......@@ -29,7 +29,7 @@ module.exports = function(grunt) {
'bower_components/lodash/dist/lodash.min.js',
'bower_components/moment/moment.js' ],
'min/doi.min.js': [
'src/*js']
'src/*js', 'src/doi/*.js']
}
}
},
......
......@@ -25,6 +25,8 @@
<script src="src/doicontroller.js"></script>
<script src="src/doiData.js"></script>
<script src="src/doiview.js"></script>
<script src="src/ESRF-DC-142893590.js"></script>
<script src="src/ESRF-DC-142915526.js"></script>
<script src="src/event.js"></script>
<script src="src/experimentalreportcontroller.js"></script>
<script src="src/jsonextractor.js"></script>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
function Author(){}function Citation(e){this.isBuildable=!!(e&&e.creator&&0!==e.creator.length&&e.date_registered&&e.title&&e.publisher&&e.doi)}function DOIController(e){var t=this;this.doiServer="https://data.datacite.org/",this.acceptedPrefix=["10.5072","10.15151"],this.view=e,this.experimentalReportController=new ExperimentalReportController,this.experimentalReportController.onSuccess.attach(function(e,r){t.view.renderExperimentalReportData(r)}),this.experimentalReportController.onError.attach(function(e,r){console.log("Error when retrieving fileList from SMIS."),t.view.renderErrorForExperimentalReport()})}function DoiData(e,t,r,n,i,a){this.title=e,this.doi=t,this.dataciteLink=r,this.publisher=n,this.creator=i,this.publiclyAccessibleYear=a}function DOIView(){this.mainPanelId="main",this.reportPanelId="expReport",this.badgePanelId="badges",this.metadataDivId="metadata",this.reportExperimentFileNames=null,this.failedRecievingExpReport=!1,this.isDOIAlreadyRendered=!1,this.onDOIRendered=new Event(this)}function Event(e){this._sender=e,this._listeners=[]}function ExperimentalReportController(){this.server="https://wwws.esrf.fr/misapps/SMISServer/rest/reports/fileNames",this.timeout=5e3,this.onSuccess=new Event(this),this.onError=new Event(this)}function JsonExtractor(e){}function proposalBeamlineTable(e,t,r,n){var i=n.mergedProposalBeamlines;if(e.write('<table class="table table-striped">'),e.write("<thead>"),e.write("<tr>"),e.write('<th scope="col">Proposals</th>'),e.write('<th scope="col">Beamlines</th>'),e.write("</tr>"),e.write("</thead>"),e.write("<tbody>"),i){for(var a=0;a<i.length;a++)if(i[a]){var o=i[a].proposal||"unknown",s=i[a].beamline||"unknown",l=i[a].beamlineUrl;e.write("<tr>"),e.write("<td>"+o+"</td>"),"noLink"===l?e.write("<td>"+s+"</td>"):e.write('<td> <a href="'+l+'" target="_blank">'+s+" </a> </td>"),e.write("</tr>")}else e.write("<tr>"),chunck.write("<td> unknown </td>"),chunck.write("<td> unknown </td>"),e.write("</tr>");return e.write("</tbody>"),e.write("</table>"),e.render(r.block,t)}}function abstract(e,t,r,n){var i=n.abstract;return e.write('<div class="myBorder-left">'),e.write("<label> Abstract </label>"),e.write('<div class="padding-left-15">'),i?e.write(i):e.write("There is no abstract for this session."),e.write("</div >"),e.write("</div >"),e.render(r.block,t)}Author.prototype.setFirstName=function(e){this.firstName=e},Author.prototype.setFamilyName=function(e){this.familyName=e},Author.prototype.setSingleName=function(e){this.singleName=e},Author.prototype.getRawFamilyName=function(){if(this.familyName)return this.familyName;if(this.singleName){var e=new RegExp(/(\S+)/g),t=this.singleName.match(e);if(2===t.length)return this.familyName=t[1],this.familyName;var r=new RegExp(/\s([^a-z]+$)/).exec(this.singleName);return r&&(this.familyName=r[1]),this.familyName}},Author.prototype.getRawFirstName=function(){if(this.firstName)return this.firstName;if(this.singleName){var e=new RegExp(/(\S+)/g),t=this.singleName.match(e);if(2===t.length)return this.firstName=t[0],this.firstName;var r=new RegExp(/^(.[^A-Z]+)+\b/).exec(this.singleName);return r&&(this.firstName=r[0]),r}},Author.prototype.getTitleCaseFamilyName=function(){if(this.familyName){allLowerCase=this.familyName.toLowerCase();var e=new RegExp(/^./);return allLowerCase.replace(e,function(e){return e.toUpperCase()})}return console.log("family name is undefined"),null},Author.prototype.getFirstNameInitials=function(){var e=new RegExp(/(\S+)/g);return this.firstName?this.firstName.replace(e,function(e){return e.charAt(0)+"."}):(console.log("first name is undefined"),null)};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"}];Citation.prototype.getAuthorsForCitation=function(e){if(this.isBuildable){var t=_.transform(e,function(e,t,r,n){n instanceof Array||(t=n);var i=null;if(t.givenName?((i=new Author).setFamilyName(t.familyName),i.setFirstName(t.givenName),e.push(i.getTitleCaseFamilyName()+" "+i.getFirstNameInitials())):((i=new Author).setSingleName(t.name),i.getRawFamilyName()&&i.getRawFirstName()?e.push(i.getTitleCaseFamilyName()+" "+i.getFirstNameInitials()):e.push(t.name)),!(n instanceof Array))return!1},[]);return _.join(t,", ")}return console.log("the author list for the citation could not be generated."),""};var CONSTANTS={ES_RESOURCE_TYPE:"experimental session resource type",DC_RESOURCE_TYPE:"dataset collection resource type"};DOIController.prototype.isValidDOIData=function(e){return _.keysIn(e).length>3&&_.find(_.keysIn(e),function(e){return"title"===e}).length>0},DOIController.prototype.getData=function(e){var t=this;this.view.setDOIInTopBanner(e),this.hasAcceptedPrefix(e)?$.ajax({headers:{Accept:"application/vnd.datacite.datacite+json"},type:"GET",timeout:15e3,url:this.doiServer+e,beforeSend:function(){t.view.setLoading("Retrieving data from Server")},complete:function(){t.view.setLoading(!1)}}).done(function(r){if(r)if(t.isValidDOIData(r)){var n=new DoiData(r.title,r.doi.toUpperCase(),t.doiServer+e,r.publisher,r.creator,r.publication_year),i=new JsonExtractor;n.abstract=i.getAbstract(r),n.investigationId=i.getInvestigationId(r),n.mintingYear=i.getMintingYear(r),n.proposalType=i.getFieldFromSubject(r.subject,"Proposal Type Description"),n.resourceType=i.getResourceType(r),n.resourceTypeGeneral=i.getResourceTypeGeneral(r),n.sessionDate=i.getSessionDate(r);var a=i.getFieldFromSubject(r.subject,"Proposal"),o=i.getFieldFromSubject(r.subject,"Instrument");t.experimentalReportController.requestFilenameList(a[0]),n.accessibility=n.getAccessibilityStatus(n.resourceType,n.sessionDate,n.publiclyAccessibleYear),n.accessMessage=t.view.setDataAccessMessage(n),n.citation=t.createCitation(r),n.resourceType===CONSTANTS.ES_RESOURCE_TYPE&&(n.beamlineUrls=t.getBeamlineUrl(o,r.date_collected,n.resourceType)),n.resourceType===CONSTANTS.DC_RESOURCE_TYPE&&(n.beamlineUrls=t.getBeamlineUrl(o,r.publication_year,n.resourceType)),n.mergedProposalBeamlines=i.getMergedProposalAndBeamline(a,o,n.beamlineUrls),t.view.renderDOIData(n)}else t.view.renderError("Not Found",t.origin)}).fail(function(e,r,n){t.view.renderError(e,n,t.origin),t.view.setLoading(!1)}):t.view.renderError("Bad Prefix",t.origin)},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_tpl",{},function(e,t){$("#main").html(t)}),"index"===this.origin&&this.getData(e)},DOIController.prototype.setOrigin=function(e){this.origin=e},DOIController.prototype.getBeamlineUrl=function(e,t,r){var n=[];return e.forEach(function(e){if(t){r===CONSTANTS.ES_RESOURCE_TYPE&&(t=moment(t)),r===CONSTANTS.DC_RESOURCE_TYPE&&(t=moment(t,"YYYY"));for(var i="",a=0;a<BEAMLINEURL.length;a++){var o=moment(BEAMLINEURL[a].startDate),s=moment(BEAMLINEURL[a].endDate);if(BEAMLINEURL[a].name.toLowerCase()===e.toLowerCase()&&t>=o&&t<=s){i=BEAMLINEURL[a].url;break}}""===i?n.push("noLink"):n.push(i)}else n.push("noLink")}),n},DOIController.prototype.createCitation=function(e){var t=new Citation(e);if(t.isBuildable){return t.getAuthorsForCitation(e.creator)+" ("+moment(e.date_registered).year()+"). "+e.title+". "+e.publisher+" (ESRF). <a href='https://doi.esrf.fr/"+e.doi+"'> doi:"+e.doi.toUpperCase()+"</a>"}return"The citation could not be generated."},DoiData.prototype.getAccessibilityStatus=function(e,t,r){if(e)if(e===CONSTANTS.ES_RESOURCE_TYPE){if(r&&t){var n=moment(r,"YYYY"),i=moment();if(i>n)return"Open access";if(i<=n)return"Restricted access"}}else if(e===CONSTANTS.DC_RESOURCE_TYPE)return"Open access";return console.log("Failed to determine whether the accessibility of the DOI."),"Accessibility status could not be determined"},DOIView.prototype.setLoading=function(e){0!=e?$("body").addClass("loading"):$("body").removeClass("loading")},DOIView.prototype.setDOIInTopBanner=function(e){$("#doiValue").text("DOI > "+e.toUpperCase())},DOIView.prototype.renderExperimentalReportData=function(e){if(e){var t=this;this.isDOIAlreadyRendered?dust.render("experimentalreport_tpl",{data:e},function(e,r){$("#"+t.reportPanelId).html(r)}):this.reportExperimentFileNames=e}},DOIView.prototype.renderDOIData=function(e){var t=this;dust.render("landingpage_tpl",{data:e,constants:CONSTANTS},function(r,n){$("#"+t.mainPanelId).html(n),t.isDOIAlreadyRendered=!0,t.renderBadges(e),t.renderMetadata(e),t.failedRecievingExpReport?t.renderErrorForExperimentalReport():t.reportExperimentFileNames&&t.renderExperimentalReportData(t.reportExperimentFileNames)})},DOIView.prototype.renderError=function(e,t,r){var n="welcome-page"===r?"doinotfound2_tpl":"doinotfound_tpl",i="";i="Bad Prefix"===t?"welcome-page"===r?'<h3> Not found ! </h3> <p> The DOI 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>':'<h2> Not found ! </h2> <p> The DOI 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>':"Not Found"===t?"welcome-page"===r?"<h3> Not found ! </h3> <p> Sorry, the requested DOI was not found. </p>":"<h2> Not found ! </h2> <p> Sorry, the requested DOI was not found. </p>":"timeout"===t?"welcome-page"===r?"<h3> Not found ! </h3> <p> Sorry, the server took too long to reply. Try again later. </p>":"<h2> Not found ! </h2> <p> Sorry, the server took too long to reply. Try again later. </p>":""===t&&"The resource you are looking for doesn't exist."===e.responseText?"welcome-page"===r?"<h3> Not found ! </h3> <p>It may take up to 24 hours for a newly generated DOI to become available. Please try again later.</p>":"<h2> Not found ! </h2> <p>It may take up to 24 hours for a newly generated DOI to become available. Please try again later.</p>":"welcome-page"===r?"<h3> Not found ! </h3> <p> Connexion problem to the datacite server. Please try again later.</p>":"<h2> Not found ! </h2> <p> Connexion problem to the datacite server. Please try again later.</p>",dust.render(n,{message:i},function(e,t){$("#error").html(t)})},DOIView.prototype.renderErrorForExperimentalReport=function(){this.failedRecievingExpReport=!0;$("#"+this.reportPanelId).html('<div class="card-header text-center"> <label>Experimental report </label> </div> <div class="card-body padding10"> <p> The filename list is not available. </p> </div>')},DOIView.prototype.renderBadges=function(e){if(e){var t=this;dust.render("badges_tpl",{data:e,constants:CONSTANTS},function(e,r){$("#"+t.badgePanelId).html(r)})}},DOIView.prototype.renderMetadata=function(e){if(e){var t=this;dust.render("metadata_tpl",{data:e,constants:CONSTANTS},function(e,r){$("#"+t.metadataDivId).html(r)})}},DOIView.prototype.setDataAccessMessage=function(e){return"Open access"===e.accessibility?"The data can be accessed by clicking on the link below":"Restricted access"===e.accessibility?"The data are under embargo until <b>"+e.publiclyAccessibleYear+"</b> but could be released earlier. Currently, they are only accessible to proposal team members.":void 0},Event.prototype={attach:function(e){this._listeners.push(e)},notify:function(e){for(var t=0;t<this._listeners.length;t++)this._listeners[t](this._sender,e)}},ExperimentalReportController.prototype.requestFilenameList=function(e){var t=this;if(e){var r=new RegExp(/^(.*)-(.*)/),n=r.exec(e)[1],i=r.exec(e)[2];n&&i&&$.ajax({type:"GET",timeout:this.timeout,url:this.server,data:{categoryCode:n,categoryCounter:i},dataType:"json",success:function(e){t.onSuccess.notify(e)},error:function(e){t.onError.notify(e)}})}else t.onError.notify("Proposal is null")},ExperimentalReportController.prototype.openFileInNewTab=function(e){if(e)try{window.open("ftp://www.esrf.eu/pub/UserReports/"+e,"_blank")}catch(t){alert("The requested file "+e+" could not be downloaded.")}},JsonExtractor.prototype.getInvestigationId=function(e){var t=RegExp(/\/\w*-*[Ee][Ss][Rr][Ff]-[Ee][Ss]-(\d+)$/);return t.exec(e.doi)?t.exec(e.doi)[1]:null},JsonExtractor.prototype.getFieldFromSubject=function(e,t){if(e&&e[0])for(var r=new RegExp("^"+t+"$","i"),n=0;n<e[0].length;n++)if(r.test(e[0][n].subject_scheme)&&e[0][n].text)return _.split(e[0][n].text,",");return null},JsonExtractor.prototype.getMintingYear=function(e){return e&&e.date_registered&&null!=e.date_registered?moment(e.date_registered).year():null},JsonExtractor.prototype.getSessionDate=function(e){return e&&e.date_collected&&null!=e.date_collected?moment(e.date_collected).format("YYYY-M-D"):null},JsonExtractor.prototype.getResourceTypeGeneral=function(e){return e&&e.resource_type_general?e.resource_type_general:null},JsonExtractor.prototype.getResourceType=function(e){if(e&&e.resource_type){if("Experiment Session"===e.resource_type)return CONSTANTS.ES_RESOURCE_TYPE;if("Datacollection"===e.resource_type)return CONSTANTS.DC_RESOURCE_TYPE}return null},JsonExtractor.prototype.getAbstract=function(e){if(e&&e.description){var t=e.description;if(t.type&&"Abstract"===t.type)return t.text}return null},JsonExtractor.prototype.getMergedProposalAndBeamline=function(e,t,r){if(e&&t&&r&&e.length===t.length&&e.length===r.length){for(var n=[],i=0;i<e.length;i++)n.push({proposal:e[i],beamline:t[i],beamlineUrl:r[i]});return _.uniqBy(n,function(e){return JSON.stringify(e)})}return null},dust.helpers.proposalBeamlineTable=proposalBeamlineTable,dust.helpers.abstract=abstract;
\ No newline at end of file
function Author(){}Author.prototype.setFirstName=function(e){this.firstName=e},Author.prototype.setFamilyName=function(e){this.familyName=e},Author.prototype.setSingleName=function(e){this.singleName=e},Author.prototype.getRawFamilyName=function(){if(this.familyName)return this.familyName;if(this.singleName){var e=new RegExp(/(\S+)/g),t=this.singleName.match(e);if(2===t.length)return this.familyName=t[1],this.familyName;var r=new RegExp(/\s([^a-z]+$)/).exec(this.singleName);return r&&(this.familyName=r[1]),this.familyName}},Author.prototype.getRawFirstName=function(){if(this.firstName)return this.firstName;if(this.singleName){var e=new RegExp(/(\S+)/g),t=this.singleName.match(e);if(2===t.length)return this.firstName=t[0],this.firstName;var r=new RegExp(/^(.[^A-Z]+)+\b/).exec(this.singleName);return r&&(this.firstName=r[0]),r}},Author.prototype.getTitleCaseFamilyName=function(){if(this.familyName){allLowerCase=this.familyName.toLowerCase();var e=new RegExp(/^./);return allLowerCase.replace(e,function(e){return e.toUpperCase()})}return console.log("family name is undefined"),null},Author.prototype.getFirstNameInitials=function(){var e=new RegExp(/(\S+)/g);return this.firstName?this.firstName.replace(e,function(e){return e.charAt(0)+"."}):(console.log("first name is undefined"),null)};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"}];function Citation(e){this.isBuildable=!!(e&&e.creator&&0!==e.creator.length&&e.date_registered&&e.title&&e.publisher&&e.doi)}Citation.prototype.getAuthorsForCitation=function(e){if(this.isBuildable){var t=_.transform(e,function(e,t,r,n){n instanceof Array||(t=n);var i=null;if(t.givenName?((i=new Author).setFamilyName(t.familyName),i.setFirstName(t.givenName),e.push(i.getTitleCaseFamilyName()+" "+i.getFirstNameInitials())):((i=new Author).setSingleName(t.name),i.getRawFamilyName()&&i.getRawFirstName()?e.push(i.getTitleCaseFamilyName()+" "+i.getFirstNameInitials()):e.push(t.name)),!(n instanceof Array))return!1},[]);return _.join(t,", ")}return console.log("the author list for the citation could not be generated."),""};var CONSTANTS={ES_RESOURCE_TYPE:"experimental session resource type",DC_RESOURCE_TYPE:"dataset collection resource type"};function DOIController(e){var r=this;this.doiServer="https://data.datacite.org/",this.acceptedPrefix=["10.5072","10.15151"],this.view=e,this.experimentalReportController=new ExperimentalReportController,this.experimentalReportController.onSuccess.attach(function(e,t){r.view.renderExperimentalReportData(t)}),this.experimentalReportController.onError.attach(function(e,t){console.log("Error when retrieving fileList from SMIS."),r.view.renderErrorForExperimentalReport()})}function DoiData(e,t,r,n,i,a){this.title=e,this.doi=t,this.dataciteLink=r,this.publisher=n,this.creator=i,this.publiclyAccessibleYear=a}function DOIView(){this.mainPanelId="main",this.reportPanelId="expReport",this.badgePanelId="badges",this.metadataDivId="metadata",this.reportExperimentFileNames=null,this.failedRecievingExpReport=!1,this.isDOIAlreadyRendered=!1,this.onDOIRendered=new Event(this)}function Event(e){this._sender=e,this._listeners=[]}function ExperimentalReportController(){this.server="https://wwws.esrf.fr/misapps/SMISServer/rest/reports/fileNames",this.timeout=5e3,this.onSuccess=new Event(this),this.onError=new Event(this)}function JsonExtractor(e){}function proposalBeamlineTable(e,t,r,n){var i=n.mergedProposalBeamlines;if(e.write('<table class="table table-striped">'),e.write("<thead>"),e.write("<tr>"),e.write('<th scope="col">Proposals</th>'),e.write('<th scope="col">Beamlines</th>'),e.write("</tr>"),e.write("</thead>"),e.write("<tbody>"),i){for(var a=0;a<i.length;a++)if(i[a]){var o=i[a].proposal||"unknown",s=i[a].beamline||"unknown",l=i[a].beamlineUrl;e.write("<tr>"),e.write("<td>"+o+"</td>"),"noLink"===l?e.write("<td>"+s+"</td>"):e.write('<td> <a href="'+l+'" target="_blank">'+s+" </a> </td>"),e.write("</tr>")}else e.write("<tr>"),chunck.write("<td> unknown </td>"),chunck.write("<td> unknown </td>"),e.write("</tr>");return e.write("</tbody>"),e.write("</table>"),e.render(r.block,t)}}function abstract(e,t,r,n){var i=n.abstract;return e.write('<div class="myBorder-left">'),e.write("<label> Abstract </label>"),e.write('<div class="padding-left-15">'),i?e.write(i):e.write("There is no abstract for this session."),e.write("</div >"),e.write("</div >"),e.render(r.block,t)}DOIController.prototype.isValidDOIData=function(e){return 3<_.keysIn(e).length&&0<_.find(_.keysIn(e),function(e){return"title"===e}).length},DOIController.prototype.getData=function(a){var o=this;this.view.setDOIInTopBanner(a),this.hasAcceptedPrefix(a)?$.ajax({headers:{Accept:"application/vnd.datacite.datacite+json"},type:"GET",timeout:15e3,url:this.doiServer+a,beforeSend:function(){o.view.setLoading("Retrieving data from Server")},complete:function(){o.view.setLoading(!1)}}).done(function(e){if(e)if(o.isValidDOIData(e)){var t=new DoiData(e.title,e.doi.toUpperCase(),o.doiServer+a,e.publisher,e.creator,e.publication_year),r=new JsonExtractor;t.abstract=r.getAbstract(e),t.investigationId=r.getInvestigationId(e),t.mintingYear=r.getMintingYear(e),t.proposalType=r.getFieldFromSubject(e.subject,"Proposal Type Description"),t.resourceType=r.getResourceType(e),t.resourceTypeGeneral=r.getResourceTypeGeneral(e),t.sessionDate=r.getSessionDate(e);var n=r.getFieldFromSubject(e.subject,"Proposal"),i=r.getFieldFromSubject(e.subject,"Instrument");o.experimentalReportController.requestFilenameList(n[0]),t.accessibility=t.getAccessibilityStatus(t.resourceType,t.sessionDate,t.publiclyAccessibleYear),t.accessMessage=o.view.setDataAccessMessage(t),t.citation=o.createCitation(e),t.resourceType===CONSTANTS.ES_RESOURCE_TYPE&&(t.beamlineUrls=o.getBeamlineUrl(i,e.date_collected,t.resourceType)),t.resourceType===CONSTANTS.DC_RESOURCE_TYPE&&(t.beamlineUrls=o.getBeamlineUrl(i,e.publication_year,t.resourceType)),t.mergedProposalBeamlines=r.getMergedProposalAndBeamline(n,i,t.beamlineUrls),o.view.renderDOIData(t)}else o.view.renderError("Not Found",o.origin)}).fail(function(e,t,r){o.view.renderError(e,r,o.origin),o.view.setLoading(!1)}):o.view.renderError("Bad Prefix",o.origin)},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_tpl",{},function(e,t){$("#main").html(t)}),"index"===this.origin&&this.getData(e)},DOIController.prototype.setOrigin=function(e){this.origin=e},DOIController.prototype.getBeamlineUrl=function(e,a,o){var s=[];return e.forEach(function(e){if(a){o===CONSTANTS.ES_RESOURCE_TYPE&&(a=moment(a)),o===CONSTANTS.DC_RESOURCE_TYPE&&(a=moment(a,"YYYY"));for(var t="",r=0;r<BEAMLINEURL.length;r++){var n=moment(BEAMLINEURL[r].startDate),i=moment(BEAMLINEURL[r].endDate);if(BEAMLINEURL[r].name.toLowerCase()===e.toLowerCase()&&n<=a&&a<=i){t=BEAMLINEURL[r].url;break}}""===t?s.push("noLink"):s.push(t)}else s.push("noLink")}),s},DOIController.prototype.createCitation=function(e){var t=new Citation(e);return t.isBuildable?t.getAuthorsForCitation(e.creator)+" ("+moment(e.date_registered).year()+"). "+e.title+". "+e.publisher+" (ESRF). <a href='https://doi.esrf.fr/"+e.doi+"'> doi:"+e.doi.toUpperCase()+"</a>":"The citation could not be generated."},DoiData.prototype.getAccessibilityStatus=function(e,t,r){if(e)if(e===CONSTANTS.ES_RESOURCE_TYPE){if(r&&t){var n=moment(r,"YYYY"),i=moment();if(n<i)return"Open access";if(i<=n)return"Restricted access"}}else if(e===CONSTANTS.DC_RESOURCE_TYPE)return"Open access";return console.log("Failed to determine whether the accessibility of the DOI."),"Accessibility status could not be determined"},DOIView.prototype.setLoading=function(e){0!=e?$("body").addClass("loading"):$("body").removeClass("loading")},DOIView.prototype.setDOIInTopBanner=function(e){$("#doiValue").text("DOI > "+e.toUpperCase())},DOIView.prototype.renderExperimentalReportData=function(e){if(e){var r=this;this.isDOIAlreadyRendered?dust.render("experimentalreport_tpl",{data:e},function(e,t){$("#"+r.reportPanelId).html(t)}):this.reportExperimentFileNames=e}},DOIView.prototype.renderDOIData=function(r){var n=this;dust.render("landingpage_tpl",{data:r,constants:CONSTANTS},function(e,t){$("#"+n.mainPanelId).html(t),n.isDOIAlreadyRendered=!0,n.renderBadges(r),n.renderMetadata(r),n.failedRecievingExpReport?n.renderErrorForExperimentalReport():n.reportExperimentFileNames&&n.renderExperimentalReportData(n.reportExperimentFileNames)})},DOIView.prototype.renderError=function(e,t,r){var n="welcome-page"===r?"doinotfound2_tpl":"doinotfound_tpl",i="";i="Bad Prefix"===t?"welcome-page"===r?'<h3> Not found ! </h3> <p> The DOI 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>':'<h2> Not found ! </h2> <p> The DOI 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>':"Not Found"===t?"welcome-page"===r?"<h3> Not found ! </h3> <p> Sorry, the requested DOI was not found. </p>":"<h2> Not found ! </h2> <p> Sorry, the requested DOI was not found. </p>":"timeout"===t?"welcome-page"===r?"<h3> Not found ! </h3> <p> Sorry, the server took too long to reply. Try again later. </p>":"<h2> Not found ! </h2> <p> Sorry, the server took too long to reply. Try again later. </p>":""===t&&"The resource you are looking for doesn't exist."===e.responseText?"welcome-page"===r?"<h3> Not found ! </h3> <p>It may take up to 24 hours for a newly generated DOI to become available. Please try again later.</p>":"<h2> Not found ! </h2> <p>It may take up to 24 hours for a newly generated DOI to become available. Please try again later.</p>":"welcome-page"===r?"<h3> Not found ! </h3> <p> Connexion problem to the datacite server. Please try again later.</p>":"<h2> Not found ! </h2> <p> Connexion problem to the datacite server. Please try again later.</p>",dust.render(n,{message:i},function(e,t){$("#error").html(t)})},DOIView.prototype.renderErrorForExperimentalReport=function(){this.failedRecievingExpReport=!0;$("#"+this.reportPanelId).html('<div class="card-header text-center"> <label>Experimental report </label> </div> <div class="card-body padding10"> <p> The filename list is not available. </p> </div>')},DOIView.prototype.renderBadges=function(e){if(e){var r=this;dust.render("badges_tpl",{data:e,constants:CONSTANTS},function(e,t){$("#"+r.badgePanelId).html(t)})}},DOIView.prototype.renderMetadata=function(e){if(e){var r=this;dust.render("metadata_tpl",{data:e,constants:CONSTANTS},function(e,t){$("#"+r.metadataDivId).html(t)})}},DOIView.prototype.setDataAccessMessage=function(e){return"Open access"===e.accessibility?"The data can be accessed by clicking on the link below":"Restricted access"===e.accessibility?"The data are under embargo until <b>"+e.publiclyAccessibleYear+"</b> but could be released earlier. Currently, they are only accessible to proposal team members.":void 0},Event.prototype={attach:function(e){this._listeners.push(e)},notify:function(e){for(var t=0;t<this._listeners.length;t++)this._listeners[t](this._sender,e)}},ExperimentalReportController.prototype.requestFilenameList=function(e){var t=this;if(e){var r=new RegExp(/^(.*)-(.*)/),n=r.exec(e)[1],i=r.exec(e)[2];n&&i&&$.ajax({type:"GET",timeout:this.timeout,url:this.server,data:{categoryCode:n,categoryCounter:i},dataType:"json",success:function(e){t.onSuccess.notify(e)},error:function(e){t.onError.notify(e)}})}else t.onError.notify("Proposal is null")},ExperimentalReportController.prototype.openFileInNewTab=function(t){if(t)try{window.open("ftp://www.esrf.eu/pub/UserReports/"+t,"_blank")}catch(e){alert("The requested file "+t+" could not be downloaded.")}},JsonExtractor.prototype.getInvestigationId=function(e){var t=RegExp(/\/\w*-*[Ee][Ss][Rr][Ff]-[Ee][Ss]-(\d+)$/);return t.exec(e.doi)?t.exec(e.doi)[1]:null},JsonExtractor.prototype.getFieldFromSubject=function(e,t){if(e&&e[0])for(var r=new RegExp("^"+t+"$","i"),n=0;n<e[0].length;n++)if(r.test(e[0][n].subject_scheme)&&e[0][n].text)return _.split(e[0][n].text,",");return null},JsonExtractor.prototype.getMintingYear=function(e){return e&&e.date_registered&&null!=e.date_registered?moment(e.date_registered).year():null},JsonExtractor.prototype.getSessionDate=function(e){return e&&e.date_collected&&null!=e.date_collected?moment(e.date_collected).format("YYYY-M-D"):null},JsonExtractor.prototype.getResourceTypeGeneral=function(e){return e&&e.resource_type_general?e.resource_type_general:null},JsonExtractor.prototype.getResourceType=function(e){if(e&&e.resource_type){if("Experiment Session"===e.resource_type)return CONSTANTS.ES_RESOURCE_TYPE;if("Datacollection"===e.resource_type)return CONSTANTS.DC_RESOURCE_TYPE}return null},JsonExtractor.prototype.getAbstract=function(e){if(e&&e.description){var t=e.description;if(t.type&&"Abstract"===t.type)return t.text}return null},JsonExtractor.prototype.getMergedProposalAndBeamline=function(e,t,r){if(e&&t&&r&&e.length===t.length&&e.length===r.length){for(var n=[],i=0;i<e.length;i++)n.push({proposal:e[i],beamline:t[i],beamlineUrl:r[i]});return _.uniqBy(n,function(e){return JSON.stringify(e)})}return null},dust.helpers.proposalBeamlineTable=proposalBeamlineTable,dust.helpers.abstract=abstract;
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
var ESRF_DC_142893590 = {
"id": "https://doi.org/10.15151/ESRF-DC-142893590",
"doi": "10.15151/ESRF-DC-142893590",
"creator": [
{
"type": "Person",
"name": "Naschberger, Andreas",
"givenName": "Andreas",
"familyName": "Naschberger"
},
{
"type": "Person",
"name": "Bowler, Matthew W.",
"givenName": "Matthew W.",
"familyName": "Bowler"
},
{
"type": "Person",
"name": "Rupp, Bernhard",
"givenName": "Bernhard",
"familyName": "Rupp"
}
],
"title": "Structural Evidence for a Role of the Multi-functional Human Glycoprotein Afamin in Wnt Transport",
"publisher": "European Synchrotron Radiation Facility",
"resource_type_general": "Dataset",
"resource_type": "Datacollection",
"subject": [
[
{
"subject_scheme": "Proposal",
"text": "OPID-30A1"
},
{
"subject_scheme": "instrument",
"text": "ID30A1"
}
]
],
"description": {
"type": "Abstract",
"text": "Afamin, a human plasma glycoprotein and putative transporter of hydrophobic molecules, has been shown to act as extracellular chaperone for poorly soluble, acylated Wnt proteins, forming a stable, soluble complex with functioning Wnt proteins. The 2.1-Å crystal structure of glycosylated human afamin reveals an almost exclusively hydrophobic binding cleft capable of harboring large hydrophobic moieties. Lipid analysis confirms the presence of lipids, and density in the primary binding pocket of afamin was modeled as palmitoleic acid, presenting the native O-acylation on serine 209 in human Wnt3a. The modeled complex between the experimental afamin structure and a Wnt3a homology model based on the XWnt8-Fz8-CRD fragment complex crystal structure is compelling, with favorable interactions comparable with the crystal structure complex. Afamin readily accommodates the conserved palmitoylated serine 209 of Wnt3a, providing a structural basis how afamin solubilizes hydrophobic and poorly soluble Wnt proteins."
},
"date_collected": "2018-03-07",
"date_published": "2018",
"date_registered": "2018-03-07T14:37:09Z",
"date_updated": "2018-03-08T16:30:22Z",
"publication_year": 2018,
"language": "eng",
"schemaVersion": "http://datacite.org/schema/kernel-3",
"provider_id": "INIST",
"client_id": "INIST.ESRF"
}
\ No newline at end of file
var ESRF_DC_142915526 = {
"id": "https://doi.org/10.15151/esrf-dc-142915526",
"doi": "10.15151/ESRF-DC-142915526",
"creator": [
{
"type": "Person",
"name": "Naschberger, Andreas",
"givenName": "Andreas",
"familyName": "Naschberger"
},
{
"type": "Person",
"name": "Bowler, Matthew W.",
"givenName": "Matthew W.",
"familyName": "Bowler"
},
{
"type": "Person",
"name": "Rupp, Bernhard",
"givenName": "Bernhard",
"familyName": "Rupp"
}
],
"title": "Controlled dehydration, structural flexibility, and Gadolinium MRI contrast compound binding in human plasma glycoprotein afamin",
"publisher": "European Synchrotron Radiation Facility",
"resource_type_general": "Dataset",
"resource_type": "Datacollection",
"subject": [
[
{
"subject_scheme": "Proposal",
"text": "OPID-30A1"
},
{
"subject_scheme": "instrument",
"text": "ID30A1"
}
]
],
"description": {
"type": "Abstract",
"text": "Afamin, a human blood plasma glycoprotein, a putative multi-functional transporter of hydrophobic molecules and a marker for metabolic syndrome, poses multiple challenges for crystallographic structure determination, both practically and in analysis of the models. Several hundred crystals were analysed, and unusual variability in cell volume and difficulty solving the structure despite a ~34% sequence identity with non-glycosylated human serum albumin indicated that the molecule exhibits variable and context-sensitive packing, despite greatly simplified glycosylation in insect cell expressed recombinant afamin. Controlled dehydration of the crystals was able to stabilise the orthorhombic crystal form reducing the number of molecules in the asymmetric unit from the monoclinic form and changing the conformational states of the protein. An iterative strategy using fully automatic experiments available on MASSIF-1 was used to quickly determine the optimal protocol to achieve the phase transition that should be readily applicable to many types of sample. The study also highlights the drawback of using a single crystallographic structure model for computation modelling purposes given that conformational state of the binding sites and electron density in the binding site, likely resulting from PEGs, greatly varies between models. This also holds for the analysis of unspecific low-affinity ligands, where often a variety fragments with similar uncertainty can be modelled, inviting interpretative bias. As a promiscuous transporter, afamin can also bind Gadoteridol, a magnetic resonance imaging contrast compound in two sites, one near the human albumin Sudlow-site and a second hitherto unknown binding site."
},
"date_collected": "2018-03-07",
"date_published": "2018",
"date_registered": "2018-03-07T14:37:09Z",
"date_updated": "2018-03-08T16:30:22Z",
"publication_year": 2018,
"language": "eng",
"schemaVersion": "http://datacite.org/schema/kernel-3",
"provider_id": "INIST",
"client_id": "INIST.ESRF"
}
\ No newline at end of file
......@@ -35,10 +35,62 @@ DOIController.prototype.isValidDOIData = function (doiData) {
return false;
};
DOIController.prototype.render = function (doi, data) {
var _this = this;
// Test abnormal length of the json object
if (!_this.isValidDOIData(data)) {
_this.view.renderError("Not Found", _this.origin);
} else {
// Extract data and fill doiData with it
var doiData = new DoiData(data.title, data.doi.toUpperCase(), _this.doiServer + doi, data.publisher, data.creator, data.publication_year);
var jsonExtractor = new JsonExtractor();
doiData.abstract = jsonExtractor.getAbstract(data);
doiData.investigationId = jsonExtractor.getInvestigationId(data);
doiData.mintingYear = jsonExtractor.getMintingYear(data);
doiData.proposalType = jsonExtractor.getFieldFromSubject(data.subject, "Proposal Type Description");
doiData.resourceType = jsonExtractor.getResourceType(data);
doiData.resourceTypeGeneral = jsonExtractor.getResourceTypeGeneral(data);
doiData.sessionDate = jsonExtractor.getSessionDate(data);
var proposalNames = jsonExtractor.getFieldFromSubject(data.subject, "Proposal");
var beamlines = jsonExtractor.getFieldFromSubject(data.subject, "Instrument");
_this.experimentalReportController.requestFilenameList(proposalNames[0]);
doiData.accessibility = doiData.getAccessibilityStatus(doiData.resourceType, doiData.sessionDate, doiData.publiclyAccessibleYear);
doiData.accessMessage = _this.view.setDataAccessMessage(doiData);
doiData.citation = _this.createCitation(data);
if (doiData.resourceType === CONSTANTS.ES_RESOURCE_TYPE) {
doiData.beamlineUrls = _this.getBeamlineUrl(beamlines, data.date_collected, doiData.resourceType);
}
if (doiData.resourceType === CONSTANTS.DC_RESOURCE_TYPE) {
doiData.beamlineUrls = _this.getBeamlineUrl(beamlines, data.publication_year, doiData.resourceType);
}
// Create a table containing unique tuples [proposal, beamline, beamlineUrl]
doiData.mergedProposalBeamlines = jsonExtractor.getMergedProposalAndBeamline(proposalNames, beamlines, doiData.beamlineUrls);
// send to dust render
_this.view.renderDOIData(doiData);
}
};
DOIController.prototype.getData = function (doi) {
var _this = this;
this.view.setDOIInTopBanner(doi);
if (doi.toUpperCase() == "10.15151/ESRF-DC-142893590"){
this.render(doi, ESRF_DC_142893590);
return;
}
if (doi.toUpperCase() == "10.15151/ESRF-DC-142915526"){
this.render(doi, ESRF_DC_142915526);
return;
}
if (this.hasAcceptedPrefix(doi)) {
$.ajax({
headers: {
......@@ -58,43 +110,7 @@ DOIController.prototype.getData = function (doi) {
.done(function (data) {
if (data) {
// Test abnormal length of the json object
if (!_this.isValidDOIData(data)) {
_this.view.renderError("Not Found", _this.origin);
} else {
// Extract data and fill doiData with it
var doiData = new DoiData(data.title, data.doi.toUpperCase(), _this.doiServer + doi, data.publisher, data.creator, data.publication_year);
var jsonExtractor = new JsonExtractor();
doiData.abstract = jsonExtractor.getAbstract(data);
doiData.investigationId = jsonExtractor.getInvestigationId(data);
doiData.mintingYear = jsonExtractor.getMintingYear(data);
doiData.proposalType = jsonExtractor.getFieldFromSubject(data.subject, "Proposal Type Description");
doiData.resourceType = jsonExtractor.getResourceType(data);
doiData.resourceTypeGeneral = jsonExtractor.getResourceTypeGeneral(data);
doiData.sessionDate = jsonExtractor.getSessionDate(data);
var proposalNames = jsonExtractor.getFieldFromSubject(data.subject, "Proposal");
var beamlines = jsonExtractor.getFieldFromSubject(data.subject, "Instrument");
_this.experimentalReportController.requestFilenameList(proposalNames[0]);
doiData.accessibility = doiData.getAccessibilityStatus(doiData.resourceType, doiData.sessionDate, doiData.publiclyAccessibleYear);
doiData.accessMessage = _this.view.setDataAccessMessage(doiData);
doiData.citation = _this.createCitation(data);
if (doiData.resourceType === CONSTANTS.ES_RESOURCE_TYPE) {
doiData.beamlineUrls = _this.getBeamlineUrl(beamlines, data.date_collected, doiData.resourceType);
}
if (doiData.resourceType === CONSTANTS.DC_RESOURCE_TYPE) {
doiData.beamlineUrls = _this.getBeamlineUrl(beamlines, data.publication_year, doiData.resourceType);
}
// Create a table containing unique tuples [proposal, beamline, beamlineUrl]
doiData.mergedProposalBeamlines = jsonExtractor.getMergedProposalAndBeamline(proposalNames, beamlines, doiData.beamlineUrls);
// send to dust render
_this.view.renderDOIData(doiData);
}
_this.render(doi, data);
}
}).fail(function (jqXHR, textStatus, errorThrown) {
_this.view.renderError(jqXHR, errorThrown, _this.origin);
......
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