diff --git a/views/labeldesigner.jinja2 b/views/labeldesigner.jinja2 index f1576c7..c4a5a17 100644 --- a/views/labeldesigner.jinja2 +++ b/views/labeldesigner.jinja2 @@ -79,14 +79,21 @@
- +
+ % +
- +
+ % +
- +
+ % +
- - (margins in % of font size) +
+ % +
@@ -142,18 +149,12 @@ function formData() { } function preview() { - // http://stackoverflow.com/a/16284355 - // http://stackoverflow.com/a/7697455 if ($('input[name=orientation]:checked').val() == 'standard') { - $('#marginTop').prop('disabled', false).removeAttr('title'); - $('#marginBottom').prop('disabled',false).removeAttr('title'); - $('#marginLeft').prop('disabled', true).prop('title', 'Only relevant if rotated orientation is selected.'); - $('#marginRight').prop('disabled', true).prop('title', 'Only relevant if rotated orientation is selected.'); + $('.marginsTopBottom').prop('disabled', false).removeAttr('title'); + $('.marginsLeftRight').prop('disabled', true).prop('title', 'Only relevant if rotated orientation is selected.'); } else { - $('#marginTop').prop('disabled', true).prop('title', 'Only relevant if standard orientation is selected.'); - $('#marginBottom').prop('disabled',true).prop('title', 'Only relevant if standard orientation is selected.'); - $('#marginLeft').prop('disabled', false).removeAttr('title'); - $('#marginRight').prop('disabled', false).removeAttr('title'); + $('.marginsTopBottom').prop('disabled', true).prop('title', 'Only relevant if standard orientation is selected.'); + $('.marginsLeftRight').prop('disabled', false).removeAttr('title'); } $.ajax({ type: 'POST',