commit c612058577d3275ae37a42140b2130e87614f65a
parent 1b2a8d38e6640384b6d68c95b85d51033dfc38da
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 24 Jan 2012 18:42:55 -0500
Add csl-left-margin fix from 0ea6c6acf to client
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js
@@ -319,6 +319,9 @@ Zotero.Cite.makeFormattedBibliography = function(cslEngine, format) {
}
}
+ var leftMarginDivs = xml..div.(@class == "csl-left-margin");
+ var clearEntries = leftMarginDivs.length() > 0;
+
// csl-entry
var divs = xml..div.(@class == "csl-entry");
var num = divs.length();
@@ -327,6 +330,10 @@ Zotero.Cite.makeFormattedBibliography = function(cslEngine, format) {
var first = i == 0;
var last = i == num - 1;
+ if (clearEntries) {
+ div.@style += "clear: left; ";
+ }
+
if(entrySpacing) {
if(!last) {
div.@style += "margin-bottom: " + entrySpacing + "em;";
@@ -341,7 +348,7 @@ Zotero.Cite.makeFormattedBibliography = function(cslEngine, format) {
var rightPadding = .5;
// div.csl-left-margin
- for each(var div in xml..div.(@class == "csl-left-margin")) {
+ for each(var div in leftMarginDivs) {
div.@style = "float: left; padding-right: " + rightPadding + "em;";
// Right-align the labels if aligning second line, since it looks