File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -303,7 +303,8 @@ const app = new Vue({
303303 this . LZ = this . SugarJournal . LZString ;
304304 if ( metadata . mimetype === "text/csv" ) {
305305 this . isCsvFile = true ;
306- this . csvTitle = this . currentenv . activityName ;
306+ this . csvTitle = metadata . title || ( this . currentenv ? this . currentenv . activityName : "Chart Data.csv" ) ;
307+ this . updateActivityTitle ( this . csvTitle ) ;
307308 this . pref . chartType = "csvMode" ;
308309 const json = CSVParser . csvToJson ( data ) ;
309310 if ( this . $refs . csvView ) {
Original file line number Diff line number Diff line change @@ -858,9 +858,12 @@ var app = new Vue({
858858 }
859859
860860 var vm = this ;
861+ var userName = ( vm . currentenv && vm . currentenv . user && vm . currentenv . user . name ) ? vm . currentenv . user . name : "Unknown" ;
862+ var logTitle = this . SugarL10n . get ( "MeasureLoggingBy" , { name : userName } ) ;
863+ var csvTitle = logTitle ? logTitle + ".csv" : "Measure Data.csv" ;
861864 var metadata = {
862865 mimetype : "text/csv" ,
863- title : this . SugarL10n . get ( "MeasureLoggingBy" , { name : vm . currentenv . user . name } ) + ".csv" ,
866+ title : csvTitle ,
864867 activity : "org.sugarlabs.ChartActivity" ,
865868 timestamp : new Date ( ) . getTime ( ) ,
866869 creation_time : new Date ( ) . getTime ( ) ,
You can’t perform that action at this time.
0 commit comments