Skip to content

Commit

Permalink
Merge pull request #3886 from FinnStutzenstein/export-filename
Browse files Browse the repository at this point in the history
Fixed filenames in motion export dialog
  • Loading branch information
emanuelschuetze committed Sep 18, 2018
2 parents 3481ca5 + 2815d5f commit 7b9d84d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion openslides/motions/static/js/motions/csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ angular.module('OpenSlidesApp.motions.csv', [])
params = {};
}
_.defaults(params, {
filename: gettextCatalog.getString('motions') + '.csv',
changeRecommendationMode: Config.get('motions_recommendation_text_mode').value,
include: {
text: true,
Expand All @@ -51,6 +50,7 @@ angular.module('OpenSlidesApp.motions.csv', [])
recommendation: true,
},
});
params.filename = gettextCatalog.getString('motions') + '.csv';
if (!_.includes(['original', 'changed', 'agreed'], params.changeRecommendationMode)) {
params.changeRecommendationMode = 'original';
}
Expand Down
2 changes: 1 addition & 1 deletion openslides/motions/static/js/motions/docx.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ angular.module('OpenSlidesApp.motions.docx', ['OpenSlidesApp.core.docx'])
converter = Html2DocxConverter.createInstance();
params = _.clone(params || {}); // Clone this to avoid sideeffects.
_.defaults(params, {
filename: gettextCatalog.getString('motions') + '.docx',
changeRecommendationMode: Config.get('motions_recommendation_text_mode').value,
include: {
text: true,
Expand All @@ -194,6 +193,7 @@ angular.module('OpenSlidesApp.motions.docx', ['OpenSlidesApp.core.docx'])
},
includeComments: {},
});
params.filename = gettextCatalog.getString('motions') + '.docx';
if (!_.includes(['original', 'changed', 'agreed'], params.changeRecommendationMode)) {
params.changeRecommendationMode = 'original';
}
Expand Down
4 changes: 1 addition & 3 deletions openslides/motions/static/js/motions/pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -1321,9 +1321,7 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
},
export: function (motions, params, singleMotion) {
params = params || {};
_.defaults(params, {
filename: gettextCatalog.getString('motions') + '.pdf',
});
params.filename = gettextCatalog.getString('motions') + '.pdf';
this.getDocumentProvider(motions, params, singleMotion).then(
function (documentProvider) {
PdfCreate.download(documentProvider, params.filename);
Expand Down

0 comments on commit 7b9d84d

Please sign in to comment.