summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2018-10-17 17:03:55 +0200
committerGitHub <noreply@github.com>2018-10-17 17:03:55 +0200
commit5888a8ae108bffd187c6c51a1c3ac72ac6d8ec02 (patch)
tree499d067ca405603011f225bcf1da2e283d5a7b0a
parentfb707ca4a2ae746d962458fdd4577b5fea16f4d9 (diff)
Fix PDF operator notes
use text() not html() (#338)
-rw-r--r--print/resources/inkstitch.js10
-rw-r--r--print/templates/operator_detailedview.html2
2 files changed, 6 insertions, 6 deletions
diff --git a/print/resources/inkstitch.js b/print/resources/inkstitch.js
index 9f67bc90..fcc3cb13 100644
--- a/print/resources/inkstitch.js
+++ b/print/resources/inkstitch.js
@@ -36,9 +36,9 @@ function buildOpd(thumbnail_size = $('#operator-detailedview-thumbnail-size').va
var thumbnail_layout = (thumbnail_size >= 60) ? 'medium' : 'small';
// remove old settings
- $( "div.page.operator-detailedview header" ).remove();
- $( "div.page.operator-detailedview footer" ).remove();
- $( "div.page.operator-detailedview .job-headline" ).remove();
+ $('div.page.operator-detailedview header').remove();
+ $('div.page.operator-detailedview footer').remove();
+ $('div.page.operator-detailedview .job-headline').remove();
$('div.page.operator-detailedview .opd-color-block').parentsUntil('div.page.operator-detailedview').addBack().unwrap();
$('.opd-color-block').removeClass('medium large');
$('.opd-color-block').removeAttr('style');
@@ -242,7 +242,7 @@ $(function() {
$('[contenteditable="true"]').on('focusout', function() {
/* change svg scale */
- var content = $(this).html();
+ var content = $(this).text();
var field_name = $(this).attr('data-field-name');
if(field_name == 'svg-scale') {
var scale = parseInt(content);
@@ -255,7 +255,7 @@ $(function() {
} else {
/* When we focus out from a contenteditable field, we want to
* set the same content to all fields with the same classname */
- $('[data-field-name="' + field_name + '"]').html(content);
+ $('[data-field-name="' + field_name + '"]').text(content);
$.postJSON('/settings/' + field_name, {value: content});
}
});
diff --git a/print/templates/operator_detailedview.html b/print/templates/operator_detailedview.html
index e3c0d441..ae578d9d 100644
--- a/print/templates/operator_detailedview.html
+++ b/print/templates/operator_detailedview.html
@@ -53,7 +53,7 @@
{{ color_block.svg_preview|safe }}
</p>
<p>
- <span data-field-name="color-{{ color_block.color.hex_digits }}" contenteditable="true" data-placeholder="Enter thread name...">{{ color_block.color.name }}</span>
+ <span data-field-name="color-{{ color_block.color.hex_digits }}" contenteditable="true" data-placeholder="{{ _("Enter thread name...") }}">{{ color_block.color.name }}</span>
<span>{{ color_block.color.rgb }}</span>
<span data-field-name="thread-{{ color_block.color.hex_digits }}" contenteditable="true">{{ color_block.color.manufacturer }} {{ "#" + color_block.color.number if color_block.color.number }}</span>
</p>