diff --git a/openslides/core/static/js/core/pdf.js b/openslides/core/static/js/core/pdf.js index 2f3b95749..8fd307930 100644 --- a/openslides/core/static/js/core/pdf.js +++ b/openslides/core/static/js/core/pdf.js @@ -116,10 +116,9 @@ angular.module('OpenSlidesApp.core.pdf', []) .factory('PdfMakeDocumentProvider', [ - 'gettextCatalog', 'Config', 'PDFLayout', - function(gettextCatalog, Config, PDFLayout) { + function(Config, PDFLayout) { /** * Provides the global document * @constructor @@ -783,9 +782,10 @@ angular.module('OpenSlidesApp.core.pdf', []) .factory('PdfCreate', [ '$timeout', + 'gettextCatalog', 'FileSaver', 'Messaging', - function ($timeout, FileSaver, Messaging) { + function ($timeout, gettextCatalog, FileSaver, Messaging) { var filenameMessageMap = {}; var b64toBlob = function(b64Data) { var byteCharacters = atob(b64Data); @@ -802,17 +802,17 @@ angular.module('OpenSlidesApp.core.pdf', []) switch (state) { case 'info': text = '' + - 'Generating PDF file ' + filename + ' ...'; + gettextCatalog.getString('Generating PDF file') + ' (' + filename + ') ...'; break; case 'success': text = '' + - 'PDF successfully generated.'; + gettextCatalog.getString('PDF successfully generated.'); timeout = 3000; break; case 'error': text = '' + - 'Error while generating PDF file ' + filename + ':' + - '{{ pdf.errorMessage | translate }}' ; + gettextCatalog.getString('Error while generating PDF file') + + ' (' + filename + '): ' + error + ''; break; } $timeout(function () { diff --git a/openslides/core/static/templates/pdf-status.html b/openslides/core/static/templates/pdf-status.html deleted file mode 100644 index 0d13d6e30..000000000 --- a/openslides/core/static/templates/pdf-status.html +++ /dev/null @@ -1,24 +0,0 @@ -
-
-
- - - - - Generating PDF file {{ filename }} ... - - - - - PDF successfully generated. - - - - - Error while generating PDF file {{ filename }}: - {{ pdf.errorMessage | translate }} - - -
-
-
diff --git a/openslides/motions/static/js/motions/pdf.js b/openslides/motions/static/js/motions/pdf.js index 218a9d7fd..b559a593a 100644 --- a/openslides/motions/static/js/motions/pdf.js +++ b/openslides/motions/static/js/motions/pdf.js @@ -475,7 +475,7 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf']) { text: identifier, style: 'tableofcontent', - width: 30 + width: 70 }, { text: motion.getTitle(), @@ -495,21 +495,21 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf']) // function to create the table of catergories (if any) var createTOCategories = function() { - if (Category.getAll().length > 0) { + if (Category.getAll().length > 1) { var heading = { text: gettextCatalog.getString("Categories"), style: "heading2" }; var toc = []; - angular.forEach(Category.getAll(), function(cat) { + angular.forEach(Category.filter({orderBy: 'prefix'}) , function(cat) { toc.push( { columns: [ { text: cat.prefix, style: 'tableofcontent', - width: 30 + width: 50 }, { text: cat.name,