Only in zotero-trunk/chrome/content/zotero: addCitationDialog.js.orig
Only in zotero-trunk/chrome/content/zotero: addCitationDialog.js.rej
diff -r -u zotero-trunk.orig/chrome/content/zotero/xpcom/csl.js zotero-trunk/chrome/content/zotero/xpcom/csl.js
|
old
|
new
|
|
| 1120 | 1120 | exists = citationItem && citationItem.locator && |
| 1121 | 1121 | (citationItem.locatorType == variables[j] |
| 1122 | 1122 | || (!citationItem.locatorType && variables[j] == "page")); |
| | 1123 | } else if (attribute == "reset-first" ) { |
| | 1124 | // weird register adjustments here, not sure why |
| | 1125 | // it needs to be set this way, but this works, and |
| | 1126 | // every other arrangement didn't. |
| | 1127 | if ( !Zotero.CSL.Global.lastFirstRef[citationItem.itemID] || citationItem.thisRef - Zotero.CSL.Global.lastFirstRef[citationItem.itemID] < 0 ) { |
| | 1128 | Zotero.CSL.Global.lastFirstRef[citationItem.itemID] = citationItem.thisRef-1; |
| | 1129 | } |
| | 1130 | if ( citationItem.thisRef - Zotero.CSL.Global.lastFirstRef[citationItem.itemID] >= variables[j] ) { |
| | 1131 | Zotero.CSL.Global.lastFirstRef[citationItem.itemID] = citationItem.thisRef; |
| | 1132 | exists = true; |
| | 1133 | } else { |
| | 1134 | exists = false; |
| | 1135 | } |
| 1123 | 1136 | } else if (attribute == "context") { |
| 1124 | 1137 | |
| 1125 | 1138 | if(variables[j] == "prefix-punctuation") { |
| 1126 | | exists = citationItem && citationItem.prefixPunctuation; |
| 1127 | | } |
| | 1139 | exists = citationItem && citationItem.prefixPunctuation; |
| | 1140 | } else if(variables[j] == "same-note") { |
| | 1141 | exists = citationItem && citationItem.distanceToLastRef == 0; |
| | 1142 | } |
| 1128 | 1143 | } else { // attribute == "position" |
| 1129 | 1144 | if(variables[j] == "first") { |
| 1130 | 1145 | exists = !citationItem |
| … |
… |
|
| 1357 | 1372 | this.cleanXML = cleanXML; |
| 1358 | 1373 | this.parseLocales = parseLocales; |
| 1359 | 1374 | |
| | 1375 | /* |
| | 1376 | * Mutable register for tracking most recent full citation |
| | 1377 | * (for op cit, Bluebook statutory references) |
| | 1378 | * |
| | 1379 | */ |
| | 1380 | this.lastFirstRef = new Object(); |
| | 1381 | |
| 1360 | 1382 | default xml namespace = "http://purl.org/net/xbiblio/csl"; with({}); |
| 1361 | 1383 | this.ns = "http://purl.org/net/xbiblio/csl"; |
| 1362 | 1384 | |
| … |
… |
|
| 1378 | 1400 | * initializes CSL interpreter |
| 1379 | 1401 | */ |
| 1380 | 1402 | function init() { |
| | 1403 | |
| 1381 | 1404 | if(!Zotero.CSL.Global._xmlLang) { |
| 1382 | 1405 | var prefix = "chrome://zotero/content/locale/csl/locales-"; |
| 1383 | 1406 | var ext = ".xml"; |