From bfb380a11d0e4e34723c79f0d6a57995f2957891 Mon Sep 17 00:00:00 2001 From: Florian Date: Mon, 17 Feb 2014 20:52:36 +0100 Subject: added print layout --- js/print.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/print.js b/js/print.js index 1dfa576..7375047 100644 --- a/js/print.js +++ b/js/print.js @@ -11,6 +11,9 @@ // // This Software is licensed under the GPL Version 3, 29 June 2007 +var popen = '

', + pclose = '

'; + //create event which is triggered when DOM is ready window.onDomReady = initReady; @@ -28,7 +31,8 @@ function initViewer() { //load contents from localStorage var display = document.getElementById("camImage"), - page = document.getElementById("page"), + meta = document.getElementById("metaContainer"), + text = document.getElementById("textContainer"), formName = localStorage.getItem("formName"), formDate = localStorage.getItem("formDate"), formAnalysis1 = localStorage.getItem("formAnalysis1"), @@ -43,12 +47,12 @@ function initViewer() { //display loaded data if (stor) { display.setAttribute("src", stor); - page.innerHTML += '

' + formName + '

'; - page.innerHTML += '

' + formDate + '

'; - page.innerHTML += '

Kamera ' + camera + '

'; - page.innerHTML += '

' + formAnalysis1 + '

'; - page.innerHTML += '

' + formAnalysis2 + '

'; - page.innerHTML += '

' + formAnalysis3 + '

'; + meta.innerHTML += popen + formName + pclose; + meta.innerHTML += popen + formDate + pclose; + meta.innerHTML += popen + 'Kamera ' + camera + pclose; + text.innerHTML += popen + formAnalysis1 + pclose; + text.innerHTML += popen + formAnalysis2 + pclose; + text.innerHTML += popen + formAnalysis3 + pclose; } //commented out for debugging and layouting purposes -- cgit v1.2.1