Fix notes printing

This commit is contained in:
Thomas Bruederli 2014-06-26 10:26:14 +02:00
parent 645d06be5e
commit 25a6882a15
3 changed files with 12 additions and 6 deletions

View file

@ -905,9 +905,19 @@ function rcube_kolab_notes_ui(settings)
*/
function print_note()
{
var printwin, data;
var printwin, data, list;
if (me.selected_note && (printwin = rcmail.open_window(settings.print_template))) {
list = me.notebooks[me.selected_note.list] || me.notebooks[me.selected_list] || {};
data = get_save_data();
// for read-only notes, get_save_data() won't return the content
if (me.selected_note.readonly || !list.editable) {
data.description = me.selected_note.html || me.selected_note.description;
if (!me.selected_note.html || !data.description.match(/<(html|body)/)) {
data.description = text2html(data.description);
}
}
$(printwin).load(function(){
printwin.document.title = data.title;
$('#notetitle', printwin.document).html(Q(data.title));

View file

@ -1,14 +1,11 @@
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
}
body {
background-color: #FFF;
margin: 1em;
}
#notebody {
#notebody * {
font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
}

View file

@ -2,7 +2,6 @@
<html>
<head>
<title>Print</title>
<link rel="stylesheet" type="text/css" href="/this/editor.css" />
<link rel="stylesheet" type="text/css" href="/this/print.css" />
</head>
<body class="notesprint">