Add csl-left-margin fix from 0ea6c6acf to client

This commit is contained in:
Dan Stillman 2012-01-24 18:42:55 -05:00
parent 1b2a8d38e6
commit c612058577

View file

@ -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