<link rel="stylesheet" href="<% $fsurl %>elements/jquery-ui.min.css">
<SCRIPT SRC="<% $fsurl %>elements/jquery.js"></SCRIPT>
<SCRIPT SRC="<% $fsurl %>elements/jquery-ui.min.js"></SCRIPT>
+% if ( $FS::CurrentUser::CurrentUser->option('printtofit') ) {
+ <SCRIPT SRC="<% $fsurl %>elements/printtofit.js"></SCRIPT>
+% }
% }
<% include('init_overlib.html') |n %>
<% include('rs_init_object.html') |n %>
<META HTTP-Equiv="Expires" Content="0">
% unless ( $no_jquery ) {
<SCRIPT SRC="<% $fsurl %>elements/jquery.js"></SCRIPT>
+% if ( $FS::CurrentUser::CurrentUser->option('printtofit') ) {
+ <SCRIPT SRC="<% $fsurl %>elements/printtofit.js"></SCRIPT>
+% }
% }
<% $head |n %>
</HEAD>
--- /dev/null
+$().ready(function() {
+ var beforePrint = function() {
+ if ($('body').width() > 0) {
+ // 7.5 inches * 96 DPI; maybe make the width a user pref?
+ var maxwidth = 7.5 * 96;
+ $('body').css('zoom', maxwidth / $('body').width());
+ }
+ };
+ var afterPrint = function() {
+ $('body').css('zoom', 1);
+ }
+
+ if (window.matchMedia) { // chrome, most importantly; also IE10?
+ window.matchMedia('print').addListener(
+ function(mq) {
+ mq.matches ? beforePrint() : afterPrint();
+ }
+ );
+ } else { // other IE
+ $(window).on('beforeprint', beforePrint);
+ $(window).on('afterprint', afterPrint);
+ }
+ // got nothing for firefox
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=774398
+ // but firefox already has "shrink to fit"
+});
disable_html_editor disable_enter_submit_onetimecharge
enable_mask_clipboard_hack dashboard_customers
customer_view_emails
+ printtofit
email_address
snom-ip snom-username snom-password
vonage-fromnumber vonage-username vonage-password
</TR>
<TR>
+ <TH ALIGN="right">Scale documents to fit on a letter-size page</TH>
+ <TD ALIGN="left">
+ <INPUT TYPE="checkbox" NAME="printtofit" VALUE="Y" <% $curuser->option('printtofit') ? 'CHECKED' : '' %>>
+ </TD>
+ </TR>
+
+ <TR>
<TH ALIGN="right">How many recently-modified customers displayed on dashboard</TH>
<TD ALIGN="left" COLSPAN=2>
<INPUT TYPE="text" NAME="dashboard_customers" VALUE="<% $curuser->option('dashboard_customers') %>"></TD>
</TD>
</TR>
-
-
</TABLE>
<BR>