Merge pull request #3886 from FinnStutzenstein/export-filename
Fixed filenames in motion export dialog
This commit is contained in:
commit
7b9d84dabd
@ -39,7 +39,6 @@ angular.module('OpenSlidesApp.motions.csv', [])
|
|||||||
params = {};
|
params = {};
|
||||||
}
|
}
|
||||||
_.defaults(params, {
|
_.defaults(params, {
|
||||||
filename: gettextCatalog.getString('motions') + '.csv',
|
|
||||||
changeRecommendationMode: Config.get('motions_recommendation_text_mode').value,
|
changeRecommendationMode: Config.get('motions_recommendation_text_mode').value,
|
||||||
include: {
|
include: {
|
||||||
text: true,
|
text: true,
|
||||||
@ -51,6 +50,7 @@ angular.module('OpenSlidesApp.motions.csv', [])
|
|||||||
recommendation: true,
|
recommendation: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
params.filename = gettextCatalog.getString('motions') + '.csv';
|
||||||
if (!_.includes(['original', 'changed', 'agreed'], params.changeRecommendationMode)) {
|
if (!_.includes(['original', 'changed', 'agreed'], params.changeRecommendationMode)) {
|
||||||
params.changeRecommendationMode = 'original';
|
params.changeRecommendationMode = 'original';
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,6 @@ angular.module('OpenSlidesApp.motions.docx', ['OpenSlidesApp.core.docx'])
|
|||||||
converter = Html2DocxConverter.createInstance();
|
converter = Html2DocxConverter.createInstance();
|
||||||
params = _.clone(params || {}); // Clone this to avoid sideeffects.
|
params = _.clone(params || {}); // Clone this to avoid sideeffects.
|
||||||
_.defaults(params, {
|
_.defaults(params, {
|
||||||
filename: gettextCatalog.getString('motions') + '.docx',
|
|
||||||
changeRecommendationMode: Config.get('motions_recommendation_text_mode').value,
|
changeRecommendationMode: Config.get('motions_recommendation_text_mode').value,
|
||||||
include: {
|
include: {
|
||||||
text: true,
|
text: true,
|
||||||
@ -194,6 +193,7 @@ angular.module('OpenSlidesApp.motions.docx', ['OpenSlidesApp.core.docx'])
|
|||||||
},
|
},
|
||||||
includeComments: {},
|
includeComments: {},
|
||||||
});
|
});
|
||||||
|
params.filename = gettextCatalog.getString('motions') + '.docx';
|
||||||
if (!_.includes(['original', 'changed', 'agreed'], params.changeRecommendationMode)) {
|
if (!_.includes(['original', 'changed', 'agreed'], params.changeRecommendationMode)) {
|
||||||
params.changeRecommendationMode = 'original';
|
params.changeRecommendationMode = 'original';
|
||||||
}
|
}
|
||||||
|
@ -1321,9 +1321,7 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
|
|||||||
},
|
},
|
||||||
export: function (motions, params, singleMotion) {
|
export: function (motions, params, singleMotion) {
|
||||||
params = params || {};
|
params = params || {};
|
||||||
_.defaults(params, {
|
params.filename = gettextCatalog.getString('motions') + '.pdf';
|
||||||
filename: gettextCatalog.getString('motions') + '.pdf',
|
|
||||||
});
|
|
||||||
this.getDocumentProvider(motions, params, singleMotion).then(
|
this.getDocumentProvider(motions, params, singleMotion).then(
|
||||||
function (documentProvider) {
|
function (documentProvider) {
|
||||||
PdfCreate.download(documentProvider, params.filename);
|
PdfCreate.download(documentProvider, params.filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user