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>
|
||||
<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>
|
||||
</body>
|
||||
|
@ -9,16 +9,14 @@ var schweinchen = null;
|
||||
$(document).ready(function() {
|
||||
$( "#fragenListe" ).sortable();
|
||||
|
||||
$("#closePrintScreenIcon").click(function() {
|
||||
$("#printScreen").hide();
|
||||
$("#allContent").show();
|
||||
});
|
||||
|
||||
$("#printQuestions").click(function() {
|
||||
$("#printDiv").empty();
|
||||
showQuestionsAsPrint();
|
||||
$("#printScreen").show();
|
||||
$("#allContent").hide();
|
||||
window.print();
|
||||
$("#printScreen").hide();
|
||||
$("#allContent").show();
|
||||
});
|
||||
|
||||
$("#blackScreenCheck").change(function() {
|
||||
@ -126,7 +124,7 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
function showQuestionsAsPrint() {
|
||||
var ges = '<ol>';
|
||||
var ges = '<h2 style="margin-left:30px;">Familienduell Fragen</h2><ol>';
|
||||
for(var i=0;i<fragen.length;i++) {
|
||||
ges += '<li>'+fragen[i]["frage"]+'</li>';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user