Commit a994bebc authored by Maxime Chaillet's avatar Maxime Chaillet

fix typo in error message

parent 45507218
# DOI landing page
## Introduction
This project handles the management of the doi landing page at ESRF.
A person is searching for information from a given DOI code. He/she can go to datacyte [search page](https://search.datacite.org/) and will enter the doi code he/she is looking at. In response, from his own database, the datacyte server will redirect the search to the doi landing page which is located on esrf server.
A person is searching for information from a given DOI code. He/she can go to datacite [search page](https://search.datacite.org/) and will enter the doi code he/she is looking at. In response, from his own database, the datacite server will redirect the search to the doi landing page which is located on esrf server.
### Usage
In production, the doi landing page is part of a docker container containing an apache2 server.
......
function DOIController(e){this.server="https://data.datacite.org/",this.sessionId=null,this.view=e}function DOIView(){}DOIController.prototype.getData=function(e){var t=this;this.view.setDOI(e),$.ajax({headers:{Accept:"application/vnd.citationstyles.csl+json"},type:"GET",url:this.server+e,beforeSend:function(){t.view.setLoading("Retrieving data from Server")},complete:function(){t.view.setLoading(!1)},success:function(e){e?dust.render("esrf-landing-page",{data:e},function(e,t){$("#main").html(t)}):dust.render("doi-not-found-page",{message:"Sorry, the requested DOI was not found."},function(e,t){$("#main").html(t)})},error:function(e,n,o){$("#result").text("error: "+n),dust.render("doi-not-found-page",{message:"Sorry, there was a connexion problem with the datacyte server."},function(e,t){$("#main").html(t)}),t.view.setLoading(!1)}})},DOIView.prototype.setLoading=function(e){0!=e?$("body").addClass("loading"):$("body").removeClass("loading")},DOIView.prototype.setDOI=function(e){$("#doiPanel").html(e)};
\ No newline at end of file
function DOIController(e){this.server="https://data.datacite.org/",this.sessionId=null,this.view=e}function DOIView(){}DOIController.prototype.getData=function(e){var t=this;this.view.setDOI(e),$.ajax({headers:{Accept:"application/vnd.citationstyles.csl+json"},type:"GET",url:this.server+e,beforeSend:function(){t.view.setLoading("Retrieving data from Server")},complete:function(){t.view.setLoading(!1)},success:function(e){e?dust.render("esrf-landing-page",{data:e},function(e,t){$("#main").html(t)}):dust.render("doi-not-found-page",{message:"Sorry, the requested DOI was not found."},function(e,t){$("#main").html(t)})},error:function(e,n,o){$("#result").text("error: "+n),dust.render("doi-not-found-page",{message:"Sorry, there was a connexion problem with the datacite server."},function(e,t){$("#main").html(t)}),t.view.setLoading(!1)}})},DOIView.prototype.setLoading=function(e){0!=e?$("body").addClass("loading"):$("body").removeClass("loading")},DOIView.prototype.setDOI=function(e){$("#doiPanel").html(e)};
\ No newline at end of file
......@@ -45,7 +45,7 @@ DOIController.prototype.getData = function (doi) {
$("#result").text("error: "+textStatus);
dust.render('doi-not-found-page',
{
message : "Sorry, there was a connexion problem with the datacyte server."
message : "Sorry, there was a connexion problem with the datacite server."
},
function(err, out) {
$("#main").html(out);
......@@ -53,4 +53,4 @@ DOIController.prototype.getData = function (doi) {
_this.view.setLoading(false);
}
});
};
\ No newline at end of file
};
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