Skip to content

Commit c9c9200

Browse files
committed
in thulbMode the newLineAfter char is no longer printed
1 parent a493a59 commit c9c9200

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

signaturenDruck/js/printRenderer.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ const ipc = require('electron').ipcRenderer
1616

1717
const XRegExp = require('xregexp')
1818

19+
// requires the electron-store module and initializes it
20+
const Store = require('electron-store')
21+
const config = new Store({cwd: 'C:\\Export\\SignaturenDruck'})
22+
1923
let formats = []
2024

2125
window.onload = function () {
@@ -66,7 +70,11 @@ function createPage (format, data, dataMan, file) {
6670
if (Number(formats[format].lines) === 1) {
6771
let p = document.createElement('p')
6872
p.className = 'line_1'
69-
p.innerHTML = linesData[0]
73+
if (config.get('thulbMode')) {
74+
p.innerHTML = linesData[0].split(config.get('newLineAfter')).join(' ')
75+
} else {
76+
p.innerHTML = linesData[0]
77+
}
7078
div.appendChild(p)
7179
document.getElementById('toPrint').appendChild(div)
7280
} else {
@@ -83,7 +91,11 @@ function createPage (format, data, dataMan, file) {
8391
})
8492
} else {
8593
let line = document.getElementById(value.id + '_line_' + i)
86-
line.innerHTML = linesData
94+
if (config.get('thulbMode')) {
95+
line.innerHTML = linesData.split(config.get('newLineAfter')).join(' ')
96+
} else {
97+
line.innerHTML = linesData
98+
}
8799
}
88100
}
89101
}

signaturenDruck/js/renderer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,11 @@ function showData (shelfmark, formatLines) {
804804
})
805805
} else {
806806
line = document.getElementById('line_' + i)
807-
line.innerHTML = shelfmark
807+
if (config.get('thulbMode')) {
808+
line.innerHTML = shelfmark.split(config.get('newLineAfter')).join(' ')
809+
} else {
810+
line.innerHTML = shelfmark
811+
}
808812
}
809813

810814
function createLines (innerBox, formatLines) {

0 commit comments

Comments
 (0)