add Scale

This commit is contained in:
Bengt Brodersen 2015-11-27 08:32:10 +01:00
parent daf433b27f
commit 9aa4dd132d
2 changed files with 4 additions and 3 deletions

View File

@ -326,14 +326,14 @@
var printWindow = printFrame[0].contentWindow; var printWindow = printFrame[0].contentWindow;
var printDocument = printWindow.document; var printDocument = printWindow.document;
var scaleRoot = 1.0;//global.settings.scale; var scaleRoot = global.settings.scale;
var rowCount = global.settings.rowCount; var rowCount = global.settings.rowCount;
var columnCount = global.settings.colCount; var columnCount = global.settings.colCount;
// scale // scale
// reset scale // reset scale
jQuery("html", printDocument).css("font-size", scaleRoot +"cm"); jQuery("html", printDocument).css("font-size", "1cm");
jQuery("#styleColumnCount", printDocument).remove(); jQuery("#styleColumnCount", printDocument).remove();
jQuery("#styleRowCount", printDocument).remove(); jQuery("#styleRowCount", printDocument).remove();
@ -458,6 +458,7 @@
writeCookie("card_printer_font_scale", jQuery(this).val()); writeCookie("card_printer_font_scale", jQuery(this).val());
global.settings.scale = jQuery(this).val(); global.settings.scale = jQuery(this).val();
console.log("global.settings.scale: " +global.settings.scale);
redrawCards(); redrawCards();
}); });

View File

@ -13,7 +13,7 @@
</div> </div>
<div id="card-print-dialog-footer"> <div id="card-print-dialog-footer">
<div class="buttons"> <div class="buttons">
<label style="display: none; margin-right:10px; padding-right: 3px;"><input id="font-scale-range" type="range" min="0.5" max="2.0" step="0.01" style="width: 100px; position: relative; top: 2px; margin-right:5px;" value="1.0" />Scale</label> <label style="margin-right:10px; padding-right: 3px;"><input id="font-scale-range" type="range" min="0.5" max="1.0" step="0.01" value="1.0" style="width: 100px; position: relative; top: 2px; margin-right:5px;" />Scale</label>
<label style="margin-right:0px;"><input id="rowCount" type="text" class="text" maxlength="1" style="width: 10px;" value="2"/>x</label> <label style="margin-right:0px;"><input id="rowCount" type="text" class="text" maxlength="1" style="width: 10px;" value="2"/>x</label>
<label style="margin-right:10px;"><input id="columnCount" type="text" class="text" maxlength="1" style="width: 10px; margin-right:5px;" value="1"/>Page Grid</label> <label style="margin-right:10px;"><input id="columnCount" type="text" class="text" maxlength="1" style="width: 10px; margin-right:5px;" value="1"/>Page Grid</label>
<label style="margin-right:10px"><input id="single-card-page-checkbox" type="checkbox"/>Single Card Per Page</label> <label style="margin-right:10px"><input id="single-card-page-checkbox" type="checkbox"/>Single Card Per Page</label>