From 2916aed6db57bebef3c807fbb8c8b528e60d3e72 Mon Sep 17 00:00:00 2001 From: juanf <juanf> Date: Tue, 7 Apr 2015 09:39:08 +0000 Subject: [PATCH] SSDM-1648: Removing new lines like in openBIS core SVN: 33789 --- .../1/as/webapps/newbrowser/html/lib/grid/js/Grid.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/lib/grid/js/Grid.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/lib/grid/js/Grid.js index 79903a3c149..4013e799368 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/lib/grid/js/Grid.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/lib/grid/js/Grid.js @@ -99,7 +99,7 @@ $.extend(Grid.prototype, { .append(labelSRSC); itemSRSC.click(function() { - thisGrid.exportCSV(false, false); + thisGrid.exportTSV(false, false); }); columnList.append(itemSRSC); @@ -115,7 +115,7 @@ $.extend(Grid.prototype, { .append(labelSRAC); itemSRAC.click(function() { - thisGrid.exportCSV(false, true); + thisGrid.exportTSV(false, true); }); columnList.append(itemSRAC); @@ -131,7 +131,7 @@ $.extend(Grid.prototype, { .append(labelARSC); itemARSC.click(function() { - thisGrid.exportCSV(true, false); + thisGrid.exportTSV(true, false); }); columnList.append(itemARSC); @@ -147,14 +147,14 @@ $.extend(Grid.prototype, { .append(labelARAC); itemARAC.click(function() { - thisGrid.exportCSV(true, true); + thisGrid.exportTSV(true, true); }); columnList.append(itemARAC); }, - exportCSV : function(isAllRowsOrVisible, isAllColumnsOrVisible) { + exportTSV : function(isAllRowsOrVisible, isAllColumnsOrVisible) { var thisGrid = this; var exportColumnsFromData = function(namePrefix, data, headings) { @@ -167,6 +167,8 @@ $.extend(Grid.prototype, { var rowValue = data[dIdx][headerKey]; if(!rowValue) { rowValue = ""; + } else { + rowValue = rowValue.replace(/\r?\n|\r/g, ""); } rowAsArray.push(rowValue); } -- GitLab