git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-analysis/nlphub@164452 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
2098082241
commit
7bfc647ed8
|
@ -27,6 +27,7 @@
|
|||
var publicLink = null;
|
||||
var pageGreen = "#4CAF50";
|
||||
var pageGray = "#A0A0A0";
|
||||
var savedAnnotations = "";
|
||||
|
||||
$("#execute-button").css("background-color", pageGray);
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
@ -63,6 +64,7 @@
|
|||
onLoad : function(obj) {
|
||||
$("#file-info").remove();
|
||||
$("#fu-container").append("<div id=\"file-info\"></div>");
|
||||
savedAnnotations = "";
|
||||
},
|
||||
onSuccess : function(files, data, xhr) {
|
||||
console.log("files: " + files);
|
||||
|
@ -241,6 +243,7 @@
|
|||
annList += list[i] + ",";
|
||||
}
|
||||
annList = annList.substring(0, annList.length-1);
|
||||
savedAnnotations = annList;
|
||||
|
||||
var algList = "";
|
||||
for(j in algorithms) {
|
||||
|
@ -259,10 +262,10 @@
|
|||
url : "/nlphub/nlphub-servlet?" + parameters,
|
||||
type : "POST",
|
||||
async : true,
|
||||
//contentType : "text/plain; charset=utf-8",
|
||||
success : function(data, stato) {
|
||||
if(typeof(data.response) != 'undefined')
|
||||
alert(data.message);
|
||||
if(typeof(data.response) != 'undefined') {
|
||||
var jsonOut = getOutputJson(data.message);
|
||||
}
|
||||
else if (typeof(data.error) != 'undefined')
|
||||
alert(data.message);
|
||||
else
|
||||
|
@ -273,6 +276,44 @@
|
|||
}
|
||||
});
|
||||
|
||||
//publicLink = null;
|
||||
}
|
||||
|
||||
getOutputJson = function(message) {
|
||||
var tobemap = "";
|
||||
for(var i=0; i<message.length; i++) {
|
||||
tobemap += message[i] + "|";
|
||||
}
|
||||
|
||||
tobemap = tobemap.substring(0, tobemap.length-1);
|
||||
|
||||
var parameters = "annotations=" + savedAnnotations;
|
||||
parameters += "&plink=" + encodeURI(publicLink);
|
||||
parameters += "&lang=" + $("#language-select").val();
|
||||
parameters += "&tobemap=" + encodeURI(tobemap);
|
||||
|
||||
$
|
||||
.ajax({
|
||||
url : "/nlphub/nlphub-mapper-servlet?" + parameters,
|
||||
type : "POST",
|
||||
async : true,
|
||||
success : function(data, stato) {
|
||||
console.log(data);
|
||||
/*
|
||||
if(typeof(data.response) != 'undefined') {
|
||||
var jsonOut = getOutputJson(data.message);
|
||||
}
|
||||
else if (typeof(data.error) != 'undefined')
|
||||
alert(data.message);
|
||||
else
|
||||
alert("Unexpected response");*/
|
||||
},
|
||||
error : function(richiesta, stato, errori) {
|
||||
alert("Unexpected Error");
|
||||
}
|
||||
});
|
||||
|
||||
savedAnnotations = "";
|
||||
publicLink = null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue