|
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 668-727
Link Here
|
| 668 |
<div class="panel-body"> |
655 |
<div class="panel-body"> |
| 669 |
<fieldset class="rows"> |
656 |
<fieldset class="rows"> |
| 670 |
<div class="dialog message">These format settings apply when a notice is printed.</div> |
657 |
<div class="dialog message">These format settings apply when a notice is printed.</div> |
| 671 |
[% SET param = letters.$lang.params %] |
658 |
<div class="col-md-12"> |
| 672 |
<div class="col-md-6"> |
659 |
<ol> |
| 673 |
<ol> |
660 |
<li id="css-helpers"> |
| 674 |
<li> |
661 |
<label>Insert selectors to apply styles to: </label> |
| 675 |
<label for="text_justify">Text justification: </label> |
662 |
<a class="css-helper" id="headings">Headings</a> |
| 676 |
<select name="text_justify" id="text_justify"> |
663 |
<a class="css-helper" id="tables">Tables</a> |
| 677 |
[% FOREACH text_justification_type IN text_justification_types %] |
664 |
<a class="css-helper" id="text">All text</a> |
| 678 |
[% IF ( text_justification_type == param.text_justify ) %] |
665 |
</li> |
| 679 |
<option value="[% text_justification_type | html %]" selected="selected">[% PROCESS translate_justification_types type=text_justification_type %]</option> |
666 |
<li> |
| 680 |
[% ELSE %] |
667 |
<label for="style">Style (CSS): </label> |
| 681 |
<option value="[% text_justification_type | html %]">[% PROCESS translate_justification_types type=text_justification_type %]</option> |
668 |
<textarea id="style" name="style" rows="15" cols="80">[% letters.$lang.params.style | $raw %]</textarea> |
| 682 |
[% END %] |
669 |
</li> |
| 683 |
[% END %] |
670 |
<li> |
| 684 |
</select> |
671 |
<label for="format_all">Apply format settings to all notices:</label> |
| 685 |
</li> |
672 |
<input type="checkbox" name="format_all" id="format_all" value="1" /> |
| 686 |
<li> |
673 |
<span class="hint">Existing format settings will be overwritten.</span> |
| 687 |
<label for="font_size">Font size: </label> |
674 |
</li> |
| 688 |
<input type="text" name="font_size" id="font_size" size="2" value="[% param.font_size | html %]" /> |
675 |
</ol> |
| 689 |
</li> |
676 |
</div> |
| 690 |
<li> |
|
|
| 691 |
<label for="format_all">Apply format settings to all notices:</label> |
| 692 |
<input type="checkbox" name="format_all" id="format_all" value="1" /> |
| 693 |
<span class="hint">Existing format settings will be overwritten.</span> |
| 694 |
</li> |
| 695 |
</ol> |
| 696 |
</div> |
| 697 |
<div class="col-md-6"> |
| 698 |
<ol> |
| 699 |
<li> |
| 700 |
<label for="units">Units:</label> |
| 701 |
<select id="units" name="units"> |
| 702 |
[% FOREACH unit IN units %] |
| 703 |
[% IF ( unit == param.units ) %] |
| 704 |
<option value="[% unit | html %]" selected="selected">[% PROCESS translate_unit_types type=unit %]</option> |
| 705 |
[% ELSE %] |
| 706 |
<option value="[% unit | html %]">[% PROCESS translate_unit_types type=unit %]</option> |
| 707 |
[% END %] |
| 708 |
[% END %] |
| 709 |
</select> |
| 710 |
</li> |
| 711 |
<li> |
| 712 |
<label for="notice_width">Notice width:</label> |
| 713 |
<input type="text" size="4" name="notice_width" id="notice_width" value="[% param.notice_width | html %]" /> |
| 714 |
</li> |
| 715 |
<li> |
| 716 |
<label for="top_margin">Top margin:</label> |
| 717 |
<input type="text" size="4" name="top_margin" id="top_margin" value="[% param.top_margin | html %]" /> |
| 718 |
</li> |
| 719 |
<li> |
| 720 |
<label for="left_margin">Left margin:</label> |
| 721 |
<input type="text" size="4" name="left_margin" id="left_margin" value="[% param.left_margin | html %]" /> |
| 722 |
</li> |
| 723 |
</ol> |
| 724 |
</div> |
| 725 |
</fieldset> <!-- /.rows.mtt --> |
677 |
</fieldset> <!-- /.rows.mtt --> |
| 726 |
</div> <!-- /.panel-body --> |
678 |
</div> <!-- /.panel-body --> |
| 727 |
</div> <!-- /.panel-collapse --> |
679 |
</div> <!-- /.panel-collapse --> |
|
Lines 746-751
Link Here
|
| 746 |
var new_lettercode = '[% new_lettercode | html %]'; |
698 |
var new_lettercode = '[% new_lettercode | html %]'; |
| 747 |
var new_branchcode = '[% new_branchcode | html %]'; |
699 |
var new_branchcode = '[% new_branchcode | html %]'; |
| 748 |
var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'notices', 'lettert', 'json' ) | $raw %]; |
700 |
var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'notices', 'lettert', 'json' ) | $raw %]; |
|
|
701 |
$(document).ready(function(){ |
| 702 |
$("#headings").click(function(){ |
| 703 |
$("#style").val(function(i, text) { |
| 704 |
return text + '\nh1, h2, h3, h4, h5, h6 {\n' + |
| 705 |
'// insert CSS here\n' + |
| 706 |
'}'; |
| 707 |
}); |
| 708 |
}); |
| 709 |
$("#tables").click(function(){ |
| 710 |
$("#style").val(function(i, text) { |
| 711 |
return text + '\ntable, th, td, th:last-child, td:last-child {\n' + |
| 712 |
'// insert CSS here\n' + |
| 713 |
'}'; |
| 714 |
}); |
| 715 |
}); |
| 716 |
$("#text").click(function(){ |
| 717 |
$("#style").val(function(i, text) { |
| 718 |
return text + '\nh1, h2, h3, h4, h5, h6,\n' + |
| 719 |
'table, th, td, th:last-child, td:last-child {\n' + |
| 720 |
'// insert CSS here\n' + |
| 721 |
'}'; |
| 722 |
}); |
| 723 |
}); |
| 724 |
}); |
| 749 |
</script> |
725 |
</script> |
| 750 |
[% Asset.js("js/letter.js") | $raw %] |
726 |
[% Asset.js("js/letter.js") | $raw %] |
| 751 |
[% END %] |
727 |
[% END %] |