|
Lines 51-79
Link Here
|
| 51 |
.panel-group { |
51 |
.panel-group { |
| 52 |
margin-top: 3px; |
52 |
margin-top: 3px; |
| 53 |
} |
53 |
} |
|
|
54 |
.css-helper::after { |
| 55 |
content: " | "; |
| 56 |
} |
| 57 |
.css-helper:last-child::after { |
| 58 |
content: none; |
| 59 |
} |
| 54 |
</style> |
60 |
</style> |
| 55 |
[% END %] |
61 |
[% END %] |
| 56 |
</head> |
62 |
</head> |
| 57 |
|
63 |
|
| 58 |
[% text_justification_types = [ 'L','C','R' ] %] |
|
|
| 59 |
[% BLOCK translate_justification_types %] |
| 60 |
[% SWITCH type %] |
| 61 |
[% CASE 'L' %]<span>Left</span> |
| 62 |
[% CASE 'C' %]<span>Center</span> |
| 63 |
[% CASE 'R' %]<span>Right</span> |
| 64 |
[% END %] |
| 65 |
[% END %] |
| 66 |
|
| 67 |
[% units = [ 'POINT','INCH','MM','CM' ] %] |
| 68 |
[% BLOCK translate_unit_types %] |
| 69 |
[% SWITCH type %] |
| 70 |
[% CASE 'POINT' %]<span>PostScript points</span> |
| 71 |
[% CASE 'INCH' %]<span>US Inches</span> |
| 72 |
[% CASE 'MM' %]<span>SI Millimeters</span> |
| 73 |
[% CASE 'CM' %]<span>SI Centimeters</span> |
| 74 |
[% END %] |
| 75 |
[% END %] |
| 76 |
|
| 77 |
<body id="tools_letter" class="tools"> |
64 |
<body id="tools_letter" class="tools"> |
| 78 |
[% WRAPPER 'header.inc' %] |
65 |
[% WRAPPER 'header.inc' %] |
| 79 |
[% INCLUDE 'letters-search.inc' %] |
66 |
[% INCLUDE 'letters-search.inc' %] |
|
Lines 689-748
Link Here
|
| 689 |
<div class="panel-body"> |
676 |
<div class="panel-body"> |
| 690 |
<fieldset class="rows"> |
677 |
<fieldset class="rows"> |
| 691 |
<div class="dialog message">These format settings apply when a notice is printed.</div> |
678 |
<div class="dialog message">These format settings apply when a notice is printed.</div> |
| 692 |
[% SET param = letters.$lang.params %] |
679 |
<div class="col-md-12"> |
| 693 |
<div class="col-md-6"> |
680 |
<ol> |
| 694 |
<ol> |
681 |
<li id="css-helpers"> |
| 695 |
<li> |
682 |
<label>Insert selectors to apply styles to: </label> |
| 696 |
<label for="text_justify">Text justification: </label> |
683 |
<a class="css-helper" id="headings">Headings</a> |
| 697 |
<select name="text_justify" id="text_justify"> |
684 |
<a class="css-helper" id="tables">Tables</a> |
| 698 |
[% FOREACH text_justification_type IN text_justification_types %] |
685 |
<a class="css-helper" id="text">All text</a> |
| 699 |
[% IF ( text_justification_type == param.text_justify ) %] |
686 |
</li> |
| 700 |
<option value="[% text_justification_type | html %]" selected="selected">[% PROCESS translate_justification_types type=text_justification_type %]</option> |
687 |
<li> |
| 701 |
[% ELSE %] |
688 |
<label for="style">Style (CSS): </label> |
| 702 |
<option value="[% text_justification_type | html %]">[% PROCESS translate_justification_types type=text_justification_type %]</option> |
689 |
<textarea id="style" name="style" rows="15" cols="80">[% letters.$lang.params.style | $raw %]</textarea> |
| 703 |
[% END %] |
690 |
</li> |
| 704 |
[% END %] |
691 |
<li> |
| 705 |
</select> |
692 |
<label for="format_all">Apply format settings to all notices:</label> |
| 706 |
</li> |
693 |
<input type="checkbox" name="format_all" id="format_all" value="1" /> |
| 707 |
<li> |
694 |
<span class="hint">Existing format settings will be overwritten.</span> |
| 708 |
<label for="font_size">Font size: </label> |
695 |
</li> |
| 709 |
<input type="text" name="font_size" id="font_size" size="2" value="[% param.font_size | html %]" /> |
696 |
</ol> |
| 710 |
</li> |
697 |
</div> |
| 711 |
<li> |
|
|
| 712 |
<label for="format_all">Apply format settings to all notices:</label> |
| 713 |
<input type="checkbox" name="format_all" id="format_all" value="1" /> |
| 714 |
<span class="hint">Existing format settings will be overwritten.</span> |
| 715 |
</li> |
| 716 |
</ol> |
| 717 |
</div> |
| 718 |
<div class="col-md-6"> |
| 719 |
<ol> |
| 720 |
<li> |
| 721 |
<label for="units">Units:</label> |
| 722 |
<select id="units" name="units"> |
| 723 |
[% FOREACH unit IN units %] |
| 724 |
[% IF ( unit == param.units ) %] |
| 725 |
<option value="[% unit | html %]" selected="selected">[% PROCESS translate_unit_types type=unit %]</option> |
| 726 |
[% ELSE %] |
| 727 |
<option value="[% unit | html %]">[% PROCESS translate_unit_types type=unit %]</option> |
| 728 |
[% END %] |
| 729 |
[% END %] |
| 730 |
</select> |
| 731 |
</li> |
| 732 |
<li> |
| 733 |
<label for="notice_width">Notice width:</label> |
| 734 |
<input type="text" size="4" name="notice_width" id="notice_width" value="[% param.notice_width | html %]" /> |
| 735 |
</li> |
| 736 |
<li> |
| 737 |
<label for="top_margin">Top margin:</label> |
| 738 |
<input type="text" size="4" name="top_margin" id="top_margin" value="[% param.top_margin | html %]" /> |
| 739 |
</li> |
| 740 |
<li> |
| 741 |
<label for="left_margin">Left margin:</label> |
| 742 |
<input type="text" size="4" name="left_margin" id="left_margin" value="[% param.left_margin | html %]" /> |
| 743 |
</li> |
| 744 |
</ol> |
| 745 |
</div> |
| 746 |
</fieldset> <!-- /.rows.mtt --> |
698 |
</fieldset> <!-- /.rows.mtt --> |
| 747 |
</div> <!-- /.panel-body --> |
699 |
</div> <!-- /.panel-body --> |
| 748 |
</div> <!-- /.panel-collapse --> |
700 |
</div> <!-- /.panel-collapse --> |
|
Lines 767-772
Link Here
|
| 767 |
var new_lettercode = '[% new_lettercode | html %]'; |
719 |
var new_lettercode = '[% new_lettercode | html %]'; |
| 768 |
var new_branchcode = '[% new_branchcode | html %]'; |
720 |
var new_branchcode = '[% new_branchcode | html %]'; |
| 769 |
var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'notices', 'lettert', 'json' ) | $raw %]; |
721 |
var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'notices', 'lettert', 'json' ) | $raw %]; |
|
|
722 |
$(document).ready(function(){ |
| 723 |
$("#headings").click(function(){ |
| 724 |
$("#style").val(function(i, text) { |
| 725 |
return text + '\nbody, #slip h1, #slip h2, #slip h3, #slip h4, #slip h5, #slip h6,\n' + |
| 726 |
'#receipt h1, #receipt h2, #receipt h3, #receipt h4, #receipt h5, #receipt h6 {\n' + |
| 727 |
'// insert CSS here\n' + |
| 728 |
'}'; |
| 729 |
}); |
| 730 |
}); |
| 731 |
$("#tables").click(function(){ |
| 732 |
$("#style").val(function(i, text) { |
| 733 |
return text + '\nbody, table, th, td, th:last-child, td:last-child {\n' + |
| 734 |
'// insert CSS here\n' + |
| 735 |
'}'; |
| 736 |
}); |
| 737 |
}); |
| 738 |
$("#text").click(function(){ |
| 739 |
$("#style").val(function(i, text) { |
| 740 |
return text + '\nbody, #slip h1, #slip h2, #slip h3, #slip h4, #slip h5, #slip h6,\n' + |
| 741 |
'#receipt h1, #receipt h2, #receipt h3, #receipt h4, #receipt h5, #receipt h6,\n' + |
| 742 |
'table, th, td, th:last-child, td:last-child {\n' + |
| 743 |
'// insert CSS here\n' + |
| 744 |
'}'; |
| 745 |
}); |
| 746 |
}); |
| 747 |
}); |
| 770 |
</script> |
748 |
</script> |
| 771 |
[% Asset.js("js/letter.js") | $raw %] |
749 |
[% Asset.js("js/letter.js") | $raw %] |
| 772 |
[% END %] |
750 |
[% END %] |