From 83a223e96e7e5e658d763b98736dc10a766e550d Mon Sep 17 00:00:00 2001 From: SJ Date: Fri, 15 Nov 2013 22:02:44 +0100 Subject: [PATCH] added printing support --- webui/language/de/messages.php | 1 + webui/language/en/messages.php | 1 + webui/language/es/messages.php | 1 + webui/language/hu/messages.iso-8859-2.php | 1 + webui/language/hu/messages.php | 1 + webui/language/pt/messages.php | 1 + webui/view/javascript/piler-in.js | 13 ++++ .../theme/default/templates/message/view.tpl | 20 ++++-- .../theme/mobile/stylesheet/style-mobile.css | 2 + .../theme/mobile/templates/message/view.tpl | 69 +++++++++++-------- 10 files changed, 76 insertions(+), 34 deletions(-) diff --git a/webui/language/de/messages.php b/webui/language/de/messages.php index fef02fb7..27904095 100644 --- a/webui/language/de/messages.php +++ b/webui/language/de/messages.php @@ -468,5 +468,6 @@ $_['text_google_authenticator_settings'] = "Google Authenticator settings"; $_['text_invalid_pin_code'] = "Invalid pin code"; $_['text_qr_code'] = "QR"; $_['text_refresh_qr_code'] = "Refresh QR code"; +$_['text_print_message'] = "Print"; ?> diff --git a/webui/language/en/messages.php b/webui/language/en/messages.php index 24cb8024..fdce1167 100644 --- a/webui/language/en/messages.php +++ b/webui/language/en/messages.php @@ -253,6 +253,7 @@ $_['text_policy'] = "Policy"; $_['text_policy_group'] = "Policy group"; $_['text_policy_name'] = "Policy name"; $_['text_previous'] = "Previous"; +$_['text_print_message'] = "Print"; $_['text_processed_emails'] = "Processed emails"; $_['text_progress'] = "Progress"; $_['text_purge_all_messages_from_quarantine'] = "Purge all your own messages from quarantine"; diff --git a/webui/language/es/messages.php b/webui/language/es/messages.php index 88eb6600..3bc10768 100644 --- a/webui/language/es/messages.php +++ b/webui/language/es/messages.php @@ -467,5 +467,6 @@ $_['text_google_authenticator_settings'] = "Google Authenticator settings"; $_['text_invalid_pin_code'] = "Invalid pin code"; $_['text_qr_code'] = "QR"; $_['text_refresh_qr_code'] = "Refresh QR code"; +$_['text_print_message'] = "Print"; ?> diff --git a/webui/language/hu/messages.iso-8859-2.php b/webui/language/hu/messages.iso-8859-2.php index 5a8aa3bd..d3921400 100644 --- a/webui/language/hu/messages.iso-8859-2.php +++ b/webui/language/hu/messages.iso-8859-2.php @@ -254,6 +254,7 @@ $_['text_policy'] = "H $_['text_policy_group'] = "Házirend azonosító"; $_['text_policy_name'] = "Házirend neve"; $_['text_previous'] = "Előző"; +$_['text_print_message'] = "Nyomtatás"; $_['text_processed_emails'] = "Feldolgozott levelek"; $_['text_progress'] = "Státusz"; $_['text_purge_all_messages_from_quarantine'] = "Összes saját üzenet törlése a karanténból"; diff --git a/webui/language/hu/messages.php b/webui/language/hu/messages.php index 6c6634b8..bed67262 100644 --- a/webui/language/hu/messages.php +++ b/webui/language/hu/messages.php @@ -254,6 +254,7 @@ $_['text_policy'] = "Házirend"; $_['text_policy_group'] = "Házirend azonosĂ­tĂł"; $_['text_policy_name'] = "Házirend neve"; $_['text_previous'] = "ElĹ‘zĹ‘"; +$_['text_print_message'] = "Nyomtatás"; $_['text_processed_emails'] = "Feldolgozott levelek"; $_['text_progress'] = "Státusz"; $_['text_purge_all_messages_from_quarantine'] = "Ă–sszes saját ĂĽzenet törlĂ©se a karantĂ©nbĂłl"; diff --git a/webui/language/pt/messages.php b/webui/language/pt/messages.php index 43de59f0..5dedd1df 100644 --- a/webui/language/pt/messages.php +++ b/webui/language/pt/messages.php @@ -460,5 +460,6 @@ $_['text_google_authenticator_settings'] = "Google Authenticator settings"; $_['text_invalid_pin_code'] = "Invalid pin code"; $_['text_qr_code'] = "QR"; $_['text_refresh_qr_code'] = "Refresh QR code"; +$_['text_print_message'] = "Print"; ?> diff --git a/webui/view/javascript/piler-in.js b/webui/view/javascript/piler-in.js index 90a13c49..0609685e 100644 --- a/webui/view/javascript/piler-in.js +++ b/webui/view/javascript/piler-in.js @@ -1077,8 +1077,21 @@ var Piler = $('#mainscreen').css('top', '60px'); + }, + + + print_div: function(divID) { + var divElements = document.getElementById(divID).innerHTML; + var oldPage = document.body.innerHTML; + + document.body.innerHTML = "" + divElements + ""; + + window.print(); + + document.body.innerHTML = oldPage; } + } diff --git a/webui/view/theme/default/templates/message/view.tpl b/webui/view/theme/default/templates/message/view.tpl index d876d58d..cd284aca 100644 --- a/webui/view/theme/default/templates/message/view.tpl +++ b/webui/view/theme/default/templates/message/view.tpl @@ -23,13 +23,25 @@ |   + |  

+ +
+  : + " /> + +
+ + +
+ +



@@ -37,12 +49,10 @@  
-
-  : - " /> - -
+ +
+ diff --git a/webui/view/theme/mobile/stylesheet/style-mobile.css b/webui/view/theme/mobile/stylesheet/style-mobile.css index 539bfd2d..4cd1b9bf 100644 --- a/webui/view/theme/mobile/stylesheet/style-mobile.css +++ b/webui/view/theme/mobile/stylesheet/style-mobile.css @@ -144,6 +144,8 @@ .sleek { margin:0; padding:0; } .with20margin{ margin-left:20%; margin-right:20%; } + #notesbox { position:absolute; top:8px; right:8px; } + .messagecontents {background-color:#fff; padding:8px; font-size:14px; font-family: "Trebuchet MS", Arial, Verdana; } diff --git a/webui/view/theme/mobile/templates/message/view.tpl b/webui/view/theme/mobile/templates/message/view.tpl index ea074861..206f802e 100644 --- a/webui/view/theme/mobile/templates/message/view.tpl +++ b/webui/view/theme/mobile/templates/message/view.tpl @@ -1,47 +1,58 @@ -
+
0) { ?>

- - + +
-

- | - - | - - | - - - - |   - +

- +   | + +   | + +   | + +   + + |   + + |   + + -

+

+
-
-
-
-
+
+  : + " /> + +
-
-: " /> +
- +
+
+
+
+
+ +   +
+
+
+ +
- - - +
-
-