diff --git a/plugins/kolab_notes/notes.js b/plugins/kolab_notes/notes.js index 5d903d1a..6f656235 100644 --- a/plugins/kolab_notes/notes.js +++ b/plugins/kolab_notes/notes.js @@ -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)); diff --git a/plugins/kolab_notes/skins/larry/print.css b/plugins/kolab_notes/skins/larry/print.css index 2744aaac..976f2f67 100644 --- a/plugins/kolab_notes/skins/larry/print.css +++ b/plugins/kolab_notes/skins/larry/print.css @@ -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; } diff --git a/plugins/kolab_notes/skins/larry/templates/print.html b/plugins/kolab_notes/skins/larry/templates/print.html index 0387e93c..42d9101f 100644 --- a/plugins/kolab_notes/skins/larry/templates/print.html +++ b/plugins/kolab_notes/skins/larry/templates/print.html @@ -2,7 +2,6 @@