better print questions function
This commit is contained in:
parent
91c31a0b0b
commit
6818645273
@ -133,7 +133,6 @@
|
|||||||
<div id="blackScreen" style="display:none; position:absolute; left:0px; top:0px; width:100%; height:100%; background:black;"></div>
|
<div id="blackScreen" style="display:none; position:absolute; left:0px; top:0px; width:100%; height:100%; background:black;"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="printScreen" style="display:none; position:absolute; left:0px; top:0px; width:100%; height:100%; background:white;">
|
<div id="printScreen" style="display:none; position:absolute; left:0px; top:0px; width:100%; height:100%; background:white;">
|
||||||
<i id="closePrintScreenIcon" style="position: fixed; right: 30px; top: 10px; font-size: 1.2em; cursor:pointer;" class="fa fa-caret-square-o-down"></i>
|
|
||||||
<div id="printDiv"></div>
|
<div id="printDiv"></div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -9,16 +9,14 @@ var schweinchen = null;
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$( "#fragenListe" ).sortable();
|
$( "#fragenListe" ).sortable();
|
||||||
|
|
||||||
$("#closePrintScreenIcon").click(function() {
|
|
||||||
$("#printScreen").hide();
|
|
||||||
$("#allContent").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#printQuestions").click(function() {
|
$("#printQuestions").click(function() {
|
||||||
$("#printDiv").empty();
|
$("#printDiv").empty();
|
||||||
showQuestionsAsPrint();
|
showQuestionsAsPrint();
|
||||||
$("#printScreen").show();
|
$("#printScreen").show();
|
||||||
$("#allContent").hide();
|
$("#allContent").hide();
|
||||||
|
window.print();
|
||||||
|
$("#printScreen").hide();
|
||||||
|
$("#allContent").show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#blackScreenCheck").change(function() {
|
$("#blackScreenCheck").change(function() {
|
||||||
@ -126,7 +124,7 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function showQuestionsAsPrint() {
|
function showQuestionsAsPrint() {
|
||||||
var ges = '<ol>';
|
var ges = '<h2 style="margin-left:30px;">Familienduell Fragen</h2><ol>';
|
||||||
for(var i=0;i<fragen.length;i++) {
|
for(var i=0;i<fragen.length;i++) {
|
||||||
ges += '<li>'+fragen[i]["frage"]+'</li>';
|
ges += '<li>'+fragen[i]["frage"]+'</li>';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user