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
|
|
| 759 | 759 | if(variables[j] == "locator") { |
| 760 | 760 | // special case for locator |
| 761 | 761 | var text = citationItem && citationItem.locator ? citationItem.locator : ""; |
| | 762 | } else if(variables[j] == "firstref") { |
| | 763 | // note number of first reference to this citation |
| | 764 | var text = citationItem && citationItem.firstref ? citationItem.firstref : 0; |
| 762 | 765 | } else if(citationItem && citationItem._csl && citationItem._csl[variables[j]]) { |
| 763 | 766 | // override if requested |
| 764 | 767 | var text = citationItem._csl[variables[j]]; |
| … |
… |
|
| 1037 | 1040 | |
| 1038 | 1041 | // inspect variables |
| 1039 | 1042 | var done = false; |
| 1040 | | var attributes = ["variable", "is-date", "is-numeric", "is-plural", "type", "disambiguate", "locator", "position"]; |
| | 1043 | var attributes = ["variable", "is-date", "is-numeric", "is-plural", "type", "disambiguate", "locator", "context", "position", "firstref"]; |
| 1041 | 1044 | for(var k=0; !done && k<attributes.length; k++) { |
| 1042 | 1045 | var attribute = attributes[k]; |
| 1043 | 1046 | |
| … |
… |
|
| 1085 | 1088 | exists = (variables[j] == "true" && item.getProperty("disambiguate-condition")) |
| 1086 | 1089 | || (variables[j] == "false" && !item.getProperty("disambiguate-condition")); |
| 1087 | 1090 | } else if(attribute == "locator") { |
| 1088 | | exists = citationItem && citationItem.locator && |
| 1089 | | (citationItem.locatorType == variables[j] |
| 1090 | | || (!citationItem.locatorType && variables[j] == "page")); |
| | 1091 | |
| | 1092 | exists = citationItem && citationItem.locator && |
| | 1093 | (citationItem.locatorType == variables[j] |
| | 1094 | || (!citationItem.locatorType && variables[j] == "page")); |
| | 1095 | } else if (attribute == "context") { |
| | 1096 | |
| | 1097 | if(variables[j] == "prefix-punctuation") { |
| | 1098 | exists = citationItem && citationItem.prefixPunctuation; |
| | 1099 | } |
| 1091 | 1100 | } else { // attribute == "position" |
| 1092 | 1101 | if(variables[j] == "first") { |
| 1093 | 1102 | exists = !citationItem |
| … |
… |
|
| 1570 | 1579 | * itemID |
| 1571 | 1580 | */ |
| 1572 | 1581 | Zotero.CSL.CitationItem = function(item) { |
| | 1582 | var prefixPunctuation; |
| 1573 | 1583 | if(item) { |
| 1574 | 1584 | this.item = item; |
| 1575 | 1585 | this.itemID = item.id; |