diff --git a/src/main/resources/default/wiki.css b/src/main/resources/default/wiki.css index 22bce83..79dd006 100644 --- a/src/main/resources/default/wiki.css +++ b/src/main/resources/default/wiki.css @@ -15,6 +15,7 @@ body { p { line-height: 150% !important; margin: 0px !important; + padding-top: 10px !important; } a,a:link,a:visited { @@ -114,10 +115,6 @@ H6, .heading-1-1-1-1-1-1 { BEGINNING OF COPY'N'PASTE STYLES from wiki.css (lists, tables, code, hint, polarion-Document-workitem...)*/ -p { - padding-top: 10px !important; -} - ul { margin: 1em 0 !important; padding: 0px 0px 0px 40px !important; diff --git a/src/main/resources/webapp/pdf-exporter-admin/pages/localization.jsp b/src/main/resources/webapp/pdf-exporter-admin/pages/localization.jsp index ff21bd2..7c85399 100644 --- a/src/main/resources/webapp/pdf-exporter-admin/pages/localization.jsp +++ b/src/main/resources/webapp/pdf-exporter-admin/pages/localization.jsp @@ -135,7 +135,7 @@

Supported localizations for workitems statuses and severities.

Supported languages are German, French and Italian.

-

Localization for each language can be imported in XLIFF 2.0 format XLIFF 2.0 specification

+

Localization for each language can be imported in XLIFF 2.0 format XLIFF 2.0 specification

diff --git a/src/main/resources/webapp/pdf-exporter/js/export-pdf.js b/src/main/resources/webapp/pdf-exporter/js/export-pdf.js index f76e9c9..b7c4feb 100644 --- a/src/main/resources/webapp/pdf-exporter/js/export-pdf.js +++ b/src/main/resources/webapp/pdf-exporter/js/export-pdf.js @@ -125,6 +125,7 @@ function prepareRequest(projectId, locationPath) { return undefined; } } + let numberedListStyles = null; if (document.getElementById("custom-list-styles").checked) { numberedListStyles = document.getElementById("numbered-list-styles").value; @@ -138,13 +139,14 @@ function prepareRequest(projectId, locationPath) { const selectedRoles = []; if (document.getElementById("selected-roles").checked) { - for (const opt of document.getElementById("roles-selector").options) { - if (opt.selected) { - selectedRoles.push(opt.value); - } - } + const selectedOptions = Array.from(document.getElementById("roles-selector").options).filter(opt => opt.selected); + selectedRoles.push(...selectedOptions.map(opt => opt.value)); } + return buildRequestJson(projectId, locationPath, selectedChapters, numberedListStyles, selectedRoles); +} + +function buildRequestJson(projectId, locationPath, selectedChapters, numberedListStyles, selectedRoles) { return JSON.stringify({ projectId: projectId, locationPath: locationPath, diff --git a/src/main/resources/webapp/pdf-exporter/js/pdf-exporter.js b/src/main/resources/webapp/pdf-exporter/js/pdf-exporter.js index 8bd8388..2c406b1 100644 --- a/src/main/resources/webapp/pdf-exporter/js/pdf-exporter.js +++ b/src/main/resources/webapp/pdf-exporter/js/pdf-exporter.js @@ -516,6 +516,7 @@ const PdfExporter = { return undefined; } } + let numberedListStyles = null; if (document.getElementById("popup-custom-list-styles").checked) { numberedListStyles = document.getElementById("popup-numbered-list-styles").value; @@ -529,13 +530,14 @@ const PdfExporter = { const selectedRoles = []; if (document.getElementById("popup-selected-roles").checked) { - for (const opt of document.getElementById("popup-roles-selector").options) { - if (opt.selected) { - selectedRoles.push(opt.value); - } - } + const selectedOptions = Array.from(document.getElementById("popup-roles-selector").options).filter(opt => opt.selected); + selectedRoles.push(...selectedOptions.map(opt => opt.value)); } + return this.buildRequestJson(selectedChapters, numberedListStyles, selectedRoles); + }, + + buildRequestJson: function (selectedChapters, numberedListStyles, selectedRoles) { const report = this.exportContext.documentType === "report"; return JSON.stringify({ projectId: this.exportContext.getProjectId(), @@ -557,7 +559,7 @@ const PdfExporter = { cutEmptyWIAttributes: !report && document.getElementById('popup-cut-empty-wi-attributes').checked, cutLocalUrls: document.getElementById("popup-cut-urls").checked, followHTMLPresentationalHints: document.getElementById("popup-presentational-hints").checked, - numberedListStyles: document.getElementById("popup-numbered-list-styles").value, + numberedListStyles: numberedListStyles, chapters: selectedChapters, language: !report && document.getElementById('popup-localization').checked ? document.getElementById("popup-language").value : null, liveDocumentLanguage: this.exportContext.liveDocumentLanguage, @@ -605,7 +607,7 @@ const PdfExporter = { }, visibleIf: function (elementId, condition) { - document.getElementById(elementId).style.display = condition ? "visible" : "hidden"; + document.getElementById(elementId).style.visibility = condition ? "visible" : "hidden"; }, setSelector: function (elementId, value) {