diff --git a/controllets/dataset-table-controllet/dataset-table-controllet.html b/controllets/dataset-table-controllet/dataset-table-controllet.html
index 197f29f..6ab8d72 100644
--- a/controllets/dataset-table-controllet/dataset-table-controllet.html
+++ b/controllets/dataset-table-controllet/dataset-table-controllet.html
@@ -239,7 +239,7 @@
@@ -248,12 +248,12 @@
- {{item.name}}
+ {{_tr(item.name)}}
|
- TOOLS
+ {{_tr("TOOLS")}}
|
@@ -275,10 +275,10 @@
-
-
-
-
+
+
+
+
|
@@ -341,12 +341,18 @@
type : String,
value : undefined,
observer : '_filter'
+ },
+
+ localization : {
+ type : String,
+ value : "en"
}
},
ready : function() {
this.step = 10;
+ ln["localization"] = this.attributes["localization"].value;
},
attached : function(){
@@ -373,6 +379,10 @@
this.$.filter.setAttribute("label", ln["search_" + ln["localization"]]);
},
+ _tr: function(key) {
+ return ln[key +"_"+ this.attributes["localization"].value];
+ },
+
_type : function() {return ln["type_" + ln["localization"]];},
_warning : function() {return ln["warning_" + ln["localization"]];},
diff --git a/controllets/document-card-controllet/spreadsheet-card-controllet.html b/controllets/document-card-controllet/spreadsheet-card-controllet.html
index 78fec9a..b19a7f9 100644
--- a/controllets/document-card-controllet/spreadsheet-card-controllet.html
+++ b/controllets/document-card-controllet/spreadsheet-card-controllet.html
@@ -109,6 +109,10 @@
min-width: 30px;
padding: 5px;
}
+
+ div#es-function-icon{
+ display: none;
+ }
diff --git a/datalets/base-datalet/base-datalet.html b/datalets/base-datalet/base-datalet.html
index 4bc2c2e..de493ce 100755
--- a/datalets/base-datalet/base-datalet.html
+++ b/datalets/base-datalet/base-datalet.html
@@ -348,16 +348,75 @@ Example :
},
exportRTF: function () {
+
+ var t = this;
var parent = this.parentElement;
while(!parent.hasAttribute("data-url"))
parent = parent.parentElement;
+ var post_id = parent.parentElement.id.match(/\d+/); post_id = post_id ? post_id[0] : "";
+ var datalet_id = $(parent).parents().eq(3).attr("datalet-id") ? $(parent).parents().eq(3).attr("datalet-id") : "";
+ var isPublicRoom = (typeof SPODPUBLICROOM != 'undefined') ? true : false;
var svg = $(parent).find(".highcharts-container");
svg = $(svg[0]).html();
var xhr = new XMLHttpRequest();
+ $.ajax({
+ url: ODE.get_datalet_info,
+ data: {"post_id" : post_id, "datalet_id" : datalet_id, "is_public_room" : isPublicRoom},
+ dataType: "json",
+ success: function(e){
+ xhr.open('POST', 'http://172.16.15.77/DEEalerProvider/DEEP/export/export-datalet-as-rtf', true);
+ //xhr.open('POST', 'http://stage.routetopa.eu/deep/DEEP/export/export-datalet-as-rtf', true);
+ //xhr.open('POST', 'http://deep.routetopa.eu/deep_1_5/DEEP/export/export-datalet-as-rtf', true);
+ xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+
+ var post = 'svg_data=' + window.encodeURIComponent(svg) + '&datalet=' + parent.is + '&dataset=' + t.$.base_datalet_link.getAttribute("href");
+ post += '&user=' + e.user + '×tamp=' + e.timestamp + '&comment=' + (e.comment ? e.comment : "");
+
+ xhr.responseType = 'blob';
+
+ //OpenDataSoft check
+ if(t.dataUrl.indexOf("/records/") > -1)
+ {
+ var urlSource = t.dataUrl.split("/")[0] + "//" + t.dataUrl.split("/")[2];
+
+ var i;
+ if(t.dataUrl.indexOf("&") > -1)
+ i = t.dataUrl.indexOf("&");
+ else
+ i = t.dataUrl.length;
+
+ $.ajax({
+ url: urlSource + "/api/dataset/1.0/" + t.dataUrl.substring(t.dataUrl.indexOf("=")+1, i),
+ dataType: "json",
+ success: function(e){
+ post += '&name=' + e.metas.title + '&description=' + e.metas.description + '&created=' + e.metas.data_processed + '&lastModified=' + e.metas.modified;
+ xhr.send(post);
+ }
+ });
+ }
+ else if(t.dataUrl.indexOf("datastore_search?resource_id") > -1 )
+ {
+ $.ajax({
+ url: t.dataUrl.replace("datastore_search?resource_id", "resource_show?id"),
+ dataType: "json",
+ success: function(e){
+ post += '&name=' + e.result.name + '&description=' + e.result.description + '&created=' + e.result.created + '&format=' + e.result.format + '&lastModified=' + e.result.last_modified;
+ xhr.send(post);
+ }
+ });
+ }
+ else
+ {
+ xhr.send(post);
+ }
+
+ }
+ });
+
xhr.onreadystatechange = function(){
if (this.readyState == 4 && this.status == 200){
var blob = new Blob([this.response], {type:'octet/stream'});
@@ -370,51 +429,6 @@ Example :
//window.URL.revokeObjectURL(downloadUrl);
}
};
-
- //xhr.open('POST', 'http://172.16.15.77/DEEalerProvider/DEEP/export/export-datalet-as-rtf', true);
- //xhr.open('POST', 'http://stage.routetopa.eu/deep/DEEP/export/export-datalet-as-rtf', true);
- xhr.open('POST', 'http://deep.routetopa.eu/deep_1_5/DEEP/export/export-datalet-as-rtf', true);
- xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
-
- var post = 'svg_data=' + window.encodeURIComponent(svg) + '&datalet=' + parent.is + '&dataset=' + this.$.base_datalet_link.getAttribute("href");
- xhr.responseType = 'blob';
-
- //OpenDataSoft check
- if(this.dataUrl.indexOf("/records/") > -1 )
- {
- var urlSource = this.dataUrl.split("/")[0] + "//" + this.dataUrl.split("/")[2];
-
- var i;
- if(this.dataUrl.indexOf("&") > -1)
- i = this.dataUrl.indexOf("&");
- else
- i = this.dataUrl.length;
-
- $.ajax({
- url: urlSource + "/api/dataset/1.0/" + this.dataUrl.substring(this.dataUrl.indexOf("=")+1, i),
- dataType: "json",
- success: function(e){
- post += '&name=' + e.metas.title + '&description=' + e.metas.description + '&created=' + e.metas.data_processed + '&lastModified=' + e.metas.modified;
- xhr.send(post);
- }
- });
- }
- else if(this.dataUrl.indexOf("datastore_search?resource_id") > -1 )
- {
- $.ajax({
- url: this.dataUrl.replace("datastore_search?resource_id", "resource_show?id"),
- dataType: "json",
- success: function(e){
- post += '&name=' + e.result.name + '&description=' + e.result.description + '&created=' + e.result.created + '&format=' + e.result.format + '&lastModified=' + e.result.last_modified;
- xhr.send(post);
- }
- });
- }
- else
- {
- xhr.send(post);
- }
-
},
importToMySpace: function() {
diff --git a/locales/dataset_table_ln.js b/locales/dataset_table_ln.js
new file mode 100644
index 0000000..66495af
--- /dev/null
+++ b/locales/dataset_table_ln.js
@@ -0,0 +1,94 @@
+var ln = [];
+
+ln["localization"] = "en";
+
+/******** EN ********/
+
+//data-table
+ln["selectedData_en"] = "DATASET";
+ln["rows_en"] = "rows";
+ln["type_en"] = "TYPE";
+ln["warning_en"] = "WARNING";
+ln["showing_en"] = "Showing";
+ln["to_en"] = "to";
+ln["of_en"] = "of";
+ln["search_en"] = "Search";
+ln["VER_en"] = "VER";
+ln["USER_en"] = "USER";
+ln["NAME_en"] = "NAME";
+ln["DATA_en"] = "DATA";
+ln["DESCRIPTION_en"] = "DESCRIPTION";
+ln["TOOLS_en"] = "TOOLS";
+ln["last_version_en"] = "Last version";
+ln["open_en"] = "Open";
+ln["download_csv_en"] = "Download as CSV";
+ln["copy_link_en"] = "Copy link";
+ln["download_docs_en"] = "Download docs";
+
+/******** IT ********/
+
+ln["selectedData_it"] = "DATASET";
+ln["rows_it"] = "righe";
+ln["type_it"] = "TIPO";
+ln["warning_it"] = "ATTENZIONE";
+ln["showing_it"] = "Visualizzati";
+ln["to_it"] = "a";
+ln["of_it"] = "di";
+ln["search_it"] = "Cerca";
+ln["VER_it"] = "VER";
+ln["USER_it"] = "UTENTI";
+ln["NAME_it"] = "NOME";
+ln["DATA_it"] = "DATA";
+ln["DESCRIPTION_it"] = "DESCRIZIONE";
+ln["TOOLS_it"] = "STRUMENTI";
+ln["last_version_it"] = "Ultima versione";
+ln["open_it"] = "Apri";
+ln["download_csv_it"] = "Scarica CSV";
+ln["copy_link_it"] = "Copia link";
+ln["download_docs_it"] = "Download documento";
+
+/******** fr ********/
+
+//data-table
+ln["selectedData_fr"] = "DATASET";
+ln["rows_fr"] = "rows";
+ln["type_fr"] = "TYPE";
+ln["warning_fr"] = "WARNING";
+ln["showing_fr"] = "Showing";
+ln["to_fr"] = "to";
+ln["of_fr"] = "of";
+ln["search_fr"] = "Search";
+ln["VER_fr"] = "VER";
+ln["USER_fr"] = "USER";
+ln["NAME_fr"] = "NAME";
+ln["DATA_fr"] = "DATA";
+ln["DESCRIPTION_fr"] = "DESCRIPTION";
+ln["TOOLS_fr"] = "TOOLS";
+ln["last_version_fr"] = "Last version";
+ln["open_fr"] = "Open";
+ln["download_csv_fr"] = "Download as CSV";
+ln["copy_link_fr"] = "Copy link";
+ln["download_docs_fr"] = "Download docs";
+
+/******** nl ********/
+
+//data-table
+ln["selectedData_nl"] = "DATASET";
+ln["rows_nl"] = "rows";
+ln["type_nl"] = "TYPE";
+ln["warning_nl"] = "WARNING";
+ln["showing_nl"] = "Showing";
+ln["to_nl"] = "to";
+ln["of_nl"] = "of";
+ln["search_nl"] = "Search";
+ln["VER_nl"] = "VER";
+ln["USER_nl"] = "USER";
+ln["NAME_nl"] = "NAME";
+ln["DATA_nl"] = "DATA";
+ln["DESCRIPTION_nl"] = "DESCRIPTION";
+ln["TOOLS_nl"] = "TOOLS";
+ln["last_version_nl"] = "Last version";
+ln["open_nl"] = "Open";
+ln["download_csv_nl"] = "Download as CSV";
+ln["copy_link_nl"] = "Copy link";
+ln["download_docs_nl"] = "Download docs";
\ No newline at end of file