From 310e233480f8a8582635df8a25242b1170e49a79 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 25 Oct 2008 08:01:43 +0000 Subject: [PATCH] Merged r3581-3616 from 1.0 branch, plus some report tweaks --- chrome/content/zotero/xpcom/report.js | 16 ++++++++++++++-- chrome/skin/default/zotero/report/detail.css | 20 +++++++++++++++++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/report.js b/chrome/content/zotero/xpcom/report.js index dd23518bbb..8d304af589 100644 --- a/chrome/content/zotero/xpcom/report.js +++ b/chrome/content/zotero/xpcom/report.js @@ -93,13 +93,12 @@ Zotero.Report = new function() { for each(var note in arr.reportChildren.notes) { content += '
  • \n'; - content += note.note + '\n'; if (note.note.substr(0, 1024).match(/]*>/)) { content += note.note + '\n'; } // Wrap plaintext notes in

    else { - content += '

    ' + note.note + '

    \n'; + content += '

    ' + escapeXML(note.note) + '

    \n'; } // Child note tags @@ -336,6 +335,19 @@ Zotero.Report = new function() { // Attachment tags content += _generateTagsList(attachment); + // Attachment note + if (attachment.note) { + content += '
    '; + if (attachment.note.substr(0, 1024).match(/]*>/)) { + content += attachment.note + '\n'; + } + // Wrap plaintext notes in

    + else { + content += '

    ' + escapeXML(attachment.note) + '

    \n'; + } + content += '
    '; + } + content += '
  • \n'; } content += '\n'; diff --git a/chrome/skin/default/zotero/report/detail.css b/chrome/skin/default/zotero/report/detail.css index 4fc0e83620..b4eb9a3d57 100644 --- a/chrome/skin/default/zotero/report/detail.css +++ b/chrome/skin/default/zotero/report/detail.css @@ -123,7 +123,7 @@ li.note blockquote p:not(:empty):last-child:after { } /* Preserve whitespace on plaintext notes */ -ul.notes li p.plaintext, li.note p.plaintext { +ul.notes li p.plaintext, li.note p.plaintext, div.note p.plaintext { white-space: pre-wrap; } @@ -144,3 +144,21 @@ ul.notes ul.tags { ul.notes ul.tags li:not(:last-child):after { content: ', '; } + + +/* Child attachments */ +h3.attachments { + font-size: 1.1em; +} + +ul.attachments li { + padding-top: .5em; +} + +ul.attachments div.note { + margin-left: 2em; +} + +ul.attachments div.note p:first-child { + margin-top: .75em; +}