From 68186452737cae8b3988fbd18b42be1c862f0e44 Mon Sep 17 00:00:00 2001 From: rofl256 Date: Wed, 15 Mar 2017 20:12:07 +0100 Subject: [PATCH] better print questions function --- web/duell.html | 1 - web/js/main.js | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/web/duell.html b/web/duell.html index 1c4a576..fb714ee 100644 --- a/web/duell.html +++ b/web/duell.html @@ -133,7 +133,6 @@ diff --git a/web/js/main.js b/web/js/main.js index f3d6d86..dd7bd65 100644 --- a/web/js/main.js +++ b/web/js/main.js @@ -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 = '
    '; + var ges = '

    Familienduell Fragen

      '; for(var i=0;i'; }