Commit 67392167 authored by Mikaël Salson's avatar Mikaël Salson

Merge branch 'feature-c/3938-free-comments-in-reports' into 'dev'

js/export.js: free (unsaved) comments at the end of each report

Closes #3938

See merge request !519
parents 5ca1d0f1 cb3fa009
Pipeline #97287 passed with stages
in 6 minutes and 13 seconds
...@@ -160,6 +160,7 @@ Report.prototype = { ...@@ -160,6 +160,7 @@ Report.prototype = {
self.info() self.info()
.contamination() .contamination()
.comments()
self.m.resize() self.m.resize()
self.m.resume() self.m.resume()
...@@ -200,6 +201,7 @@ Report.prototype = { ...@@ -200,6 +201,7 @@ Report.prototype = {
.cloneList() .cloneList()
.contamination() .contamination()
.sampleLog() .sampleLog()
.comments()
.restorestate() .restorestate()
self.m.resize() self.m.resize()
...@@ -244,6 +246,7 @@ Report.prototype = { ...@@ -244,6 +246,7 @@ Report.prototype = {
self.sampleLog() self.sampleLog()
.softwareInfo(self.m.t) .softwareInfo(self.m.t)
.comments()
.restorestate() .restorestate()
self.m.changeGermline(current_system) self.m.changeGermline(current_system)
...@@ -330,13 +333,20 @@ Report.prototype = { ...@@ -330,13 +333,20 @@ Report.prototype = {
return this return this
}, },
comments: function() {
var comments = this.container("Comments")
$('<textarea/>', {'title': "These comments won't be saved.", 'rows': 5, 'style': "width: 100%; display: block; overflow: hidden; resize: vertical;"}).appendTo(comments)
return this
},
info : function() { info : function() {
var info = this.container("Report information") var info = this.container("Report information")
var left = $('<div/>', {'class': 'flex'}).appendTo(info); var left = $('<div/>', {'class': 'flex'}).appendTo(info);
var date = new Date(); var date = new Date();
var report_timestamp = date.getFullYear() + "-" + (date.getMonth()+1) + "-" + date.getDate() var report_timestamp = date.toISOString().split('T')[0]
var analysis_timestamp = "" var analysis_timestamp = ""
if (typeof this.m.analysis.timestamp != "undefined") if (typeof this.m.analysis.timestamp != "undefined")
...@@ -345,8 +355,8 @@ Report.prototype = { ...@@ -345,8 +355,8 @@ Report.prototype = {
analysis_timestamp = report_timestamp + " (not saved)" analysis_timestamp = report_timestamp + " (not saved)"
var content = [ var content = [
{'label': "Filename:" , 'value' : this.m.dataFileName },
{'label': "Report date:" , 'value' : report_timestamp}, {'label': "Report date:" , 'value' : report_timestamp},
{'label': "Filename:" , 'value' : this.m.dataFileName },
{'label': "Updated on:" , 'value' : analysis_timestamp}, {'label': "Updated on:" , 'value' : analysis_timestamp},
{'label': "Software used:" , 'value' : this.m.getSoftVersion()}, {'label': "Software used:" , 'value' : this.m.getSoftVersion()},
{'label': "Analysis date:" , 'value' : "" } {'label': "Analysis date:" , 'value' : "" }
......
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