www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 310e233480f8a8582635df8a25242b1170e49a79
parent 01edde493f5e669bb1a1f83efe13e7a04496e906
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat, 25 Oct 2008 08:01:43 +0000

Merged r3581-3616 from 1.0 branch, plus some report tweaks


Diffstat:
Mchrome/content/zotero/xpcom/report.js | 16++++++++++++++--
Mchrome/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 @@ -93,13 +93,12 @@ Zotero.Report = new function() { for each(var note in arr.reportChildren.notes) { content += '<li id="i' + note.itemID + '">\n'; - content += note.note + '\n'; if (note.note.substr(0, 1024).match(/<p[^>]*>/)) { content += note.note + '\n'; } // Wrap plaintext notes in <p> else { - content += '<p class="plaintext">' + note.note + '</p>\n'; + content += '<p class="plaintext">' + escapeXML(note.note) + '</p>\n'; } // Child note tags @@ -336,6 +335,19 @@ Zotero.Report = new function() { // Attachment tags content += _generateTagsList(attachment); + // Attachment note + if (attachment.note) { + content += '<div class="note">'; + if (attachment.note.substr(0, 1024).match(/<p[^>]*>/)) { + content += attachment.note + '\n'; + } + // Wrap plaintext notes in <p> + else { + content += '<p class="plaintext">' + escapeXML(attachment.note) + '</p>\n'; + } + content += '</div>'; + } + content += '</li>\n'; } content += '</ul>\n'; diff --git 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; +}