no message

This commit is contained in:
Bengt Brodersen 2015-11-27 17:59:38 +01:00
parent 2797ad6638
commit ac2d6c8498
2 changed files with 11 additions and 6 deletions

View File

@ -353,7 +353,14 @@
var printDocument = printWindow.document;
var settings = global.settings;
var scaleRoot = settings.scale;
var scaleRoot;
if(settings.scale < 0) {
scaleRoot = 1.0 / (1.0 - (settings.scale * 2.0));
} else {
scaleRoot = 1.0 * (1.0 + (settings.scale * 2.0));
}
var rowCount = settings.rowCount;
var columnCount = settings.colCount;
@ -381,25 +388,23 @@
console.log("scaleRoot: " + scaleRoot + " scale: " + scale);
console.log("scaleWidth: " + scaleWidth + " scaleHeight: " + scaleHeight);
// scale
jQuery("html", printDocument).css("font-size", ( scaleRoot * scale ) + "cm");
// size
// size horizontal
var style = document.createElement('style');
style.id = 'styleColumnCount';
style.type = 'text/css';
style.innerHTML = ".card { width: calc( 100% / " + columnCount + " - 0.001px ); }"
style.innerHTML = ".card { width: calc( 100% / " + columnCount + " ); }"
jQuery("head", printDocument).append(style);
// size horizontal
var style = document.createElement('style');
style.id = 'styleRowCount';
style.type = 'text/css';
style.innerHTML = ".card { height: calc( 100% / " + rowCount + " - 0.001px ); }"
style.innerHTML = ".card { height: calc( 100% / " + rowCount + " ); }"
jQuery("head", printDocument).append(style);
}

View File

@ -18,7 +18,7 @@
<div style="float: left; margin-left: 5px; margin-right: 5px;">x</div>
<div style="float: left; display: inline;"><input id="rowCount" type="text" class="text" maxlength="1" style="width: 10px; margin-right:5px;" value="2"/>Page Grid</div>
</div>
<div style="float: left; margin-right:10px; padding-right: 3px; display: inline; -webkit-appearance: default"><input id="font-scale-range" type="range" min="0.5" max="2.0" step="0.01" value="1.0" style="width: 80px; position: relative; top: 2px; margin-right:5px;" />Scale</div>
<div style="float: left; margin-right:10px; padding-right: 3px; display: inline; -webkit-appearance: default"><input id="font-scale-range" type="range" min="-1.0" max="1.0" step="0.01" value="0.0" style="width: 80px; position: relative; top: 2px; margin-right:5px;" />Scale</div>
<div style="float: left; margin-right:10px"><input id="single-card-page-checkbox" type="checkbox"/>Single Card Per Page</div>
<div style="float: left; margin-right:10px"><input id="hide-description-checkbox" type="checkbox"/>Hide Description</div>
<div style="float: left; margin-right:10px"><input id="hide-assignee-checkbox" type="checkbox"/>Hide Assignee</div>