diff --git a/app/views/csvfiles/new.html.erb b/app/views/csvfiles/new.html.erb index 884e938a4f..3d9edee0b4 100644 --- a/app/views/csvfiles/new.html.erb +++ b/app/views/csvfiles/new.html.erb @@ -1,17 +1,11 @@ - - - - - - <%= javascript_include_tag('/lib/simple-data-grapher/dist/PublicLab.Grapher.js')%> <%= stylesheet_link_tag '/lib/simple-data-grapher/examples/upload_file.css'%>
@@ -40,10 +34,10 @@ $.ajax({ url: '/graph/object', type: 'post', - data: { object: JSON.stringify(arr), - uid: <%= current_user.id %>, - filetitle: SimpleDataGrapherObject.view.fileTitle, - filedescription: SimpleDataGrapherObject.view.fileDescription, + data: { object: JSON.stringify(arr), + uid: <%= current_user.id %>, + filetitle: SimpleDataGrapherObject.view.fileTitle, + filedescription: SimpleDataGrapherObject.view.fileDescription, filestring: csvStringForDownload }, success: function(data){ let divAlert = document.createElement('div'); @@ -113,7 +107,7 @@ SimpleDataGrapherObject.view.csvParser.csvValidForYAxis = allfiles['csvValidForYAxis']; SimpleDataGrapherObject.view.csvParser.completeCsvMatrixTranspose = allfiles['completeCsvMatrixTranspose']; SimpleDataGrapherObject.view.continueViewManipulation('prevfile'); - }); + }); } $('#' + SimpleDataGrapherObject.view.elementId + '_publish').click(function(){ var arr = {}; @@ -131,10 +125,10 @@ $.ajax({ url: '/graph/note/graphobject', type: 'post', - data: { object: JSON.stringify(arr), - uid: <%= current_user.id %>, - filetitle: SimpleDataGrapherObject.view.fileTitle, - filedescription: SimpleDataGrapherObject.view.fileDescription, + data: { object: JSON.stringify(arr), + uid: <%= current_user.id %>, + filetitle: SimpleDataGrapherObject.view.fileTitle, + filedescription: SimpleDataGrapherObject.view.fileDescription, filestring: csvStringForDownload, graphobject: JSON.stringify(dataObject) }, success: function(data){ @@ -149,4 +143,3 @@ <% end %> setTimeout("$('.alert-success .alert-danger').fadeOut('slow')", 7000) -