Merged r3581-3616 from 1.0 branch, plus some report tweaks
This commit is contained in:
parent
01edde493f
commit
310e233480
2 changed files with 33 additions and 3 deletions
|
@ -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';
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue