Ticket #1278: PATCH.zotero-trunk.patch
| File PATCH.zotero-trunk.patch, 45.9 KB (added by fbennett, 8 years ago) |
|---|
-
chrome/content/zotero/addCitationDialog.js
diff -r -u zotero-trunk.orig/chrome/content/zotero/addCitationDialog.js zotero-trunk/chrome/content/zotero/addCitationDialog.js
old new 26 26 "suffix":"value", 27 27 "locatorType":"selectedIndex", 28 28 "locator":"value", 29 "suppressAuthor":"checked" 29 /* 30 * fbennett: 3 31 * 5 lines 32 */ 33 "suppressAuthor":"checked", 34 "volume-selector":"value", 35 "volume":"value", 36 "issued":"value", 37 "edition":"value" 30 38 }; 31 39 32 40 var _itemData = new Object(); … … 52 60 this.confirmRegenerate = confirmRegenerate; 53 61 this.accept = accept; 54 62 this.cancel = cancel; 55 63 /* 64 * fbennett: 2, 3 65 * 162 lines 66 */ 67 /* 68 * fbennett: Volume number setting 69 * 70 * ------------ 71 * What it does 72 * ------------ 73 * 74 * Some styles (well, Bluebook, anyway) require that the 75 * volume number be supplied for multi-volume works by a 76 * single author -- in back-references. This means that a 77 * single bibliographic entry must be made to work with 78 * multiple volumes, treating the whole set as a single work. 79 * 80 * This patch modifies Zotero to supply a volume selection 81 * widget to the client UI when there is an appropriate value 82 * in the numberOfVolumes field, and the work cited is not a 83 * specific chapter, dictionary entry, or encyclopedia entry. 84 * 85 * The value in numberOfVolumes may be an integer or a 86 * comma-delimited string. In the former case, a list of 87 * volume numbers ranging up from one is presented in the 88 * widget. In the latter case, the literal elements are 89 * presented. 90 * 91 * Selections are persistent, both while editing and after 92 * rendering of the citation. The value will feed through to 93 * CSL stylesheets in the normal way, through both text and 94 * number declarations. 95 * 96 * --------------- 97 * Functions added 98 * --------------- 99 * 100 * volumeNumberInit() hides the volume number widget in 101 * initial popup view. 102 * 103 * volumeNumber() enables the volume number widget with 104 * appropriate values. 105 * 106 * ------------------- 107 * Functions exploited 108 * ------------------- 109 * 110 * load() in the single condition resets screen when editing 111 * singles. (citation is active, so should reset in this 112 * case). 113 * 114 * load() in the multiple condition resets screen when editing 115 * multiples. (should take no action, because nothing is 116 * active on initial display). 117 * 118 * listItemSelected() resets screen upon selection in 119 * right-side multiples box. 120 * 121 * treeItemSelected() resets screen on selection in the 122 * left-side box. 123 * 124 * ---- 125 * Bugs 126 * ---- 127 * 128 * In single-citation entry mode, the selected value is lost 129 * when the user clicks away from the citation and clicks 130 * back. This looks odd because the locator value (which does 131 * not depend on the citation data in any way, and so does not 132 * need to be reset) does not change. 133 * 134 * The handling of the fallback value could maybe use a little 135 * attention. 136 * 137 * In styles that do not require this level of precision, the 138 * additional field might strike some as a nuisance. 139 * Depending on how users react to this feature, it might be 140 * desirable to add a configuration option to suppress the 141 * selection box. 142 */ 143 144 function volumeNumberInit() { 145 document.getElementById("volume-selector").setAttribute("hidden",true); 146 document.getElementById("volume-popup").setAttribute("hidden",true); 147 document.getElementById("volume-label").setAttribute("hidden",true); 148 } 149 150 function volumeNumber(itemID,pos) { 151 152 var itemDataID = (pos ? itemID+"::"+pos : itemID); 153 154 if (itemID) { 155 var item = Zotero.Items.get(itemID); 156 if(item) { 157 158 var volume_title = item.getField("title"); 159 var volume_numberof = item.getField("numberOfVolumes"); 160 var volume_blockers = ["bookTitle","encyclopediaTitle","dictionaryTitle"]; 161 var volume_block = true; 162 if(volume_title && volume_numberof) { 163 volume_block = false; 164 for (i in volume_blockers) { 165 var blocker = volume_blockers[i]; 166 if(item.getField(blocker)) { 167 volume_block = true; 168 break; 169 } 170 } 171 } 172 var volume_range = []; 173 var volume_labels = []; 174 if(!volume_block && volume_numberof) { 175 var numberof = volume_numberof.toString(); 176 if (numberof.match(/^\d+$/)) { 177 for (i = 1; i <= parseInt(numberof); i++) { 178 volume_range.push(i.toString()); 179 volume_labels.push(i.toString()); 180 } 181 } else if (numberof.match(/,/)) { 182 volume_range = numberof.replace(/, ?/g, "|").split("|"); 183 for (i in volume_range) { 184 volume_labels.push(volume_range[i].replace(/\/.*$/, "")); 185 } 186 } else { 187 volume_block = true; 188 } 189 } 190 191 var menu_volume = document.getElementById("volume-selector"); 192 var popup_volume = document.getElementById("volume-popup"); 193 var label_volume = document.getElementById("volume-label"); 194 label_volume.setAttribute("hidden",volume_block); 195 popup_volume.setAttribute("hidden",volume_block); 196 menu_volume.setAttribute("hidden",volume_block); 197 198 while(popup_volume.firstChild) { 199 popup_volume.removeChild(popup_volume.firstChild); 200 } 201 var i = 0; 202 var _volumeIndexArray = {}; 203 for (var value in volume_range) { 204 var volume = volume_range[value]; 205 var label = volume_labels[value]; 206 var child = document.createElement("menuitem"); 207 child.setAttribute("value", volume); 208 child.setAttribute("label", label); 209 popup_volume.appendChild(child); 210 _volumeIndexArray[volume] = i; 211 i++; 212 } 213 if(_itemData && _itemData[itemDataID] && _itemData[itemDataID] && _itemData[itemDataID]["volume-selector"]) { 214 var index = _volumeIndexArray[_itemData[itemDataID]["volume-selector"]]; 215 } else { 216 var index = 0; 217 } 218 menu_volume.selectedIndex = index; 219 220 } 221 } 222 } 223 224 56 225 /* 57 226 * initialize add citation dialog 58 227 */ 59 228 function load() { 229 volumeNumberInit(); 60 230 document.getElementById("multiple-sources-button").label = Zotero.getString("citation.multipleSources"); 61 231 document.getElementById("show-editor-button").label = Zotero.getString("citation.showEditor"); 62 232 … … 70 240 if(io.citation.sortable) { 71 241 _sortCheckbox = document.getElementById("keepSorted"); 72 242 _sortCheckbox.hidden = false; 73 if(io.citation.properties.sort === undefined) io.citation.properties.sort = true; 243 /* 244 * fbennett: n/a 245 * Was ===, which I'd never seen before, and assumed was a typo. 246 */ 247 if(io.citation.properties.sort == undefined) io.citation.properties.sort = true; 74 248 _sortCheckbox.checked = io.citation.properties.sort; 75 249 } 76 250 … … 101 275 if(io.citation.citationItems.length) { 102 276 if(io.citation.citationItems.length == 1) { 103 277 // single citation 278 /* 279 * fbennett: 2, 3 280 * 1 line 281 */ 282 volumeNumber(io.citation.citationItems[0].itemID); 104 283 _suppressNextTreeSelect = true; 105 284 itemsView.selectItem(io.citation.citationItems[0].itemID); // treeview from selectItemsDialog.js 106 285 for(var property in _preserveData) { … … 119 298 var item = Zotero.Items.get(io.citation.citationItems[i].itemID); 120 299 if(item) { 121 300 _addItem(item); 122 _itemData[io.citation.citationItems[i].itemID] = io.citation.citationItems[i]; 301 /* 302 * fbennett: 1 303 * 1 line 304 */ 305 _itemData[io.citation.citationItems[i].itemID+"::"+i] = io.citation.citationItems[i]; 123 306 } 124 307 } 125 308 } … … 149 332 function toggleMultipleSources() { 150 333 _multipleSourcesOn = !_multipleSourcesOn; 151 334 if(_multipleSourcesOn) { 335 var items = itemsView.getSelectedItems(true); 336 var itemID = (items.length ? items[0] : false); 337 var itemDataID = itemID+"::"+0; 152 338 document.getElementById("multiple-sources").hidden = undefined; 153 339 document.getElementById("zotero-add-citation-dialog").width = "750"; 154 340 document.getElementById("multiple-sources-button").label = Zotero.getString("citation.singleSource"); 341 // move user field content to multiple before adding XXXXX 342 if (itemID) { 343 _itemData[itemDataID] = new Object(); 344 for (box in _preserveData) { 345 element = document.getElementById(box); 346 _itemData[itemDataID][box] = element[_preserveData[box]]; 347 } 348 } 155 349 window.sizeToContent(); 156 350 window.moveTo((window.screenX-75), window.screenY); 157 351 treeItemSelected(); 158 352 // disable adding info until citation added 159 353 _itemSelected(false); 354 // add current selection 355 if (itemID) { 356 this.add(); 357 } else { 358 _updateAccept(); 359 _updatePreview(); 360 } 160 361 } else { 161 362 document.getElementById("multiple-sources").hidden = true; 162 363 document.getElementById("zotero-add-citation-dialog").width = "600"; … … 174 375 175 376 // delete all items 176 377 _clearCitationList(); 378 _updateAccept(); 379 _updatePreview(); 177 380 } 178 _updateAccept();179 _updatePreview();180 381 } 181 382 182 383 /* … … 197 398 // disable boxes if item not added; otherwise, enable 198 399 _itemSelected(hasBeenAdded ? itemID : false); 199 400 // disable adding nothing, or things already added 200 document.getElementById("add").disabled = !itemID || hasBeenAdded; 401 document.getElementById("add").disabled = !itemID; 402 /* 403 * fbennett: 1, 2, 3 404 * 6 lines 405 */ 406 document.getElementById("remove").disabled = true; 407 pos = document.getElementById("citation-list").childNodes.length; 408 volumeNumber(itemID,pos); 201 409 } else { 410 volumeNumber(itemID); 202 411 _updateAccept(); 203 412 _updatePreview(); 204 413 } … … 208 417 * called when an item in the selected items list is clicked 209 418 */ 210 419 function listItemSelected() { 211 var selectedListItem = document.getElementById("citation-list").getSelectedItem(0); 420 /* 421 * fbennett: 1, 2, 3 422 * 8 lines 423 */ 424 var selectedListItem = document.getElementById("citation-list").getSelectedItem(0); 212 425 var itemID = (selectedListItem ? selectedListItem.value : false); 213 _itemSelected(itemID); 426 var pos = selectedListItem.parentNode.selectedIndex; 427 _itemSelected(itemID,pos); 214 428 429 volumeNumber(itemID,pos); 215 430 document.getElementById("remove").disabled = !itemID; 431 document.getElementById("add").disabled = true; 216 432 } 217 433 218 434 /* … … 220 436 */ 221 437 function add() { 222 438 var item = itemsView.getSelectedItems()[0]; // treeview from selectItemsDialog.js 223 _itemSelected(item.getID()); 439 /* 440 * fbennett: 1 441 * 7 lines 442 */ 443 var citation_list = document.getElementById("citation-list"); 444 var pos = citation_list.childNodes.length; 224 445 _addItem(item); 446 _itemSelected(item.getID(), pos); 225 447 226 448 // don't let someone select it again 227 document.getElementById("add").disabled = true;449 document.getElementById("add").disabled = false; 228 450 229 451 // allow user to press OK 230 452 _updateAccept(); … … 239 461 var citationList = document.getElementById("citation-list"); 240 462 var selectedListItem = citationList.getSelectedItem(0); 241 463 var itemID = selectedListItem.value; 242 464 /* 465 * fbennett: 1 466 * 20 lines 467 */ 468 var itemParent = selectedListItem.parentNode; 469 var pos = itemParent.selectedIndex; 470 var itemFamily = itemParent.childNodes; 471 var itemDataID = itemID+"::"+pos; 472 243 473 // remove from _itemData 244 delete _itemData[item ID];245 _itemData[item ID] = undefined;474 delete _itemData[itemDataID]; 475 _itemData[itemDataID] = undefined; 246 476 _lastSelected = null; 477 478 // renumber in _itemData 247 479 480 for (i = pos+1; i < itemFamily.length; i++) { 481 var oldID = itemFamily.item(i).value+"::"+i; 482 var newID = itemFamily.item(i).value+"::"+pos; 483 _itemData[newID] = _itemData[oldID]; 484 delete _itemData[oldID]; 485 pos++; 486 } 487 248 488 // re-select currently selected in left pane 249 489 var itemIDs = itemsView.getSelectedItems(true); // treeview from selectItemsDialog.js 250 490 if(itemIDs.length) { … … 287 527 * Ask whether to modfiy the preview 288 528 */ 289 529 function confirmRegenerate(focusShifted) { 530 /* 531 * fbennett: 2, 3 532 * lines: 27 533 */ 534 var selectedListItem = document.getElementById("citation-list").getSelectedItem(0); 535 if (focusShifted && selectedListItem) { 536 var itemID = selectedListItem.value; 537 var pos = selectedListItem.parentNode.selectedIndex; 538 var volume_selector = document.getElementById('volume-selector'); 539 var volume = document.getElementById('volume'); 540 var edition = document.getElementById('edition'); 541 var issued = document.getElementById('issued'); 542 var elements = volume_selector.value.replace(/ ?\/ ?/g, "|").split("|"); 543 544 if (elements.length > 1) { 545 issued.setAttribute("value", elements[1]); 546 } else { 547 issued.removeAttribute("value"); 548 } 549 if (elements.length > 2) { 550 edition.setAttribute("value", elements[2]); 551 } else { 552 edition.removeAttribute("value"); 553 } 554 if (elements.length > 0) { 555 volume.setAttribute("value", elements[0]); 556 } else { 557 volume.removeAttribute("value"); 558 } 559 _itemSelected(itemID,pos); 560 } 561 290 562 if(document.getElementById('editor').value == _originalHTML || _originalHTML === undefined) { 291 563 // no changes; just update without asking 292 564 _updatePreview(); … … 409 681 * called when an item is selected; if itemID is false, disables fields; if 410 682 * itemID is undefined, only updates _itemData array 411 683 */ 412 function _itemSelected(itemID) { 684 /* 685 * fbennett: 1 686 * 3 lines 687 */ 688 function _itemSelected(itemID,pos) { 689 var itemDataID = (itemID ? itemID+"::"+pos : undefined); 690 413 691 if(_lastSelected && !_itemData[_lastSelected]) { 414 692 _itemData[_lastSelected] = new Object(); 415 693 } … … 429 707 // restore previous property 430 708 if(itemID) { 431 709 domBox.disabled = false; 432 if(_itemData[itemID] && _itemData[itemID][box] !== undefined) { 710 /* 711 * fbennett: 1 712 * 9 lines 713 */ 714 if(_itemData[itemDataID] && _itemData[itemDataID][box] !== undefined) { 433 715 if(property == "locatorType") { 434 domBox[property] = _locatorIndexArray[_itemData[item ID][box]];716 domBox[property] = _locatorIndexArray[_itemData[itemDataID][box]]; 435 717 } else { 436 domBox[property] = _itemData[item ID][box];718 domBox[property] = _itemData[itemDataID][box]; 437 719 } 720 } else { 721 domBox[property] = ""; 438 722 } 439 723 } else if(itemID !== undefined) { 440 724 domBox.disabled = true; 441 725 domBox[property] = ""; 442 726 } 443 727 } 444 445 if(itemID !== undefined) _lastSelected = itemID; 728 /* 729 * fbennett: 1 730 * 1 line 731 */ 732 if(itemID !== undefined) _lastSelected = itemDataID; 446 733 } 447 734 448 735 /* … … 464 751 // generate citationItems 465 752 for(var i=0; i<listLength; i++) { 466 753 var itemID = citationList.childNodes[i].value; 467 468 var citationItem = _itemData[itemID]; 754 /* 755 * fbennett: 1 756 * 2 lines 757 */ 758 var itemDataID = itemID+"::"+i; 759 var citationItem = _itemData[itemDataID]; 469 760 citationItem.itemID = itemID; 470 761 io.citation.citationItems.push(citationItem); 471 762 } -
chrome/content/zotero/addCitationDialog.xul
Only in zotero-trunk/chrome/content/zotero: addCitationDialog.js.orig diff -r -u zotero-trunk.orig/chrome/content/zotero/addCitationDialog.xul zotero-trunk/chrome/content/zotero/addCitationDialog.xul
old new 160 160 </vbox> 161 161 <vbox> 162 162 <checkbox id="keepSorted" hidden="true" checked="false" oncommand="Zotero_Citation_Dialog.sortCitation()" label="&zotero.citation.keepSorted.label;"/> 163 <!-- 164 fbennett: n/a 165 onclick seems to work better here. 166 --> 163 167 <listbox id="citation-list" flex="1" align="stretch" seltype="single" 164 on select="Zotero_Citation_Dialog.listItemSelected();"></listbox>168 onclick="Zotero_Citation_Dialog.listItemSelected();"></listbox> 165 169 </vbox> 166 170 </hbox> 167 171 </hbox> … … 181 185 <separator flex="4"/> 182 186 <vbox flex="1"> 183 187 <hbox align="stretch"> 184 <menulist onchange="Zotero_Citation_Dialog.confirmRegenerate(true)" id="locatorType"> 185 <menupopup id="locator-type-popup"/> 188 <!-- 189 fbennett: 2, 3 190 18 lines 191 --> 192 + <menulist onmouseout="Zotero_Citation_Dialog.confirmRegenerate(true)" id="locatorType"> 193 <menupopup id="locator-type-popup"/> 194 </menulist> 195 <textbox oninput="Zotero_Citation_Dialog.confirmRegenerate(false)" onchange="Zotero_Citation_Dialog.confirmRegenerate(true)" id="locator" flex="1"/> 196 </hbox> 197 <separator height="2px" flex="1"/> 198 <hbox align="stretch"> 199 <checkbox oncommand="Zotero_Citation_Dialog.confirmRegenerate(true)" id="suppressAuthor" label="&zotero.citation.suppressAuthor.label;"/> 200 <spacer flex="1"/> 201 <label value="&zotero.citation.volume.label;" id="volume-label"/> 202 <menulist onmouseout="Zotero_Citation_Dialog.confirmRegenerate(true)" id="volume-selector"> 203 <menupopup id="volume-popup"/> 186 204 </menulist> 187 <textbox oninput="Zotero_Citation_Dialog.confirmRegenerate(false)" onchange="Zotero_Citation_Dialog.confirmRegenerate(true)" id="locator" flex="1"/> 205 <label id="edition" value="" hidden="true"/> 206 <label id="issued" value="" hidden="true"/> 207 <label id="volume" value="" hidden="true"/> 188 208 </hbox> 189 <separator style="height: 2px" flex="1"/> 190 <checkbox oncommand="Zotero_Citation_Dialog.confirmRegenerate(true)" id="suppressAuthor" label="&zotero.citation.suppressAuthor.label;"/> 191 </vbox> 209 </vbox> 192 210 </hbox> 193 211 </vbox> 194 212 -
chrome/content/zotero/xpcom/csl.js
diff -r -u zotero-trunk.orig/chrome/content/zotero/xpcom/csl.js zotero-trunk/chrome/content/zotero/xpcom/csl.js
old new 1 1 /* 2 2 ***** BEGIN LICENSE BLOCK ***** 3 3 4 Copyright (c) 2006 Center for History and New Media4 copyright (c) 2006 Center for History and New Media 5 5 George Mason University, Fairfax, Virginia, USA 6 6 http://chnm.gmu.edu 7 7 … … 20 20 ***** END LICENSE BLOCK ***** 21 21 */ 22 22 23 /* 24 * See separate PATCH.txt file for key to fbennett changes. 25 */ 26 27 23 28 /* 24 29 * CSL: a class for creating bibliographies from CSL files 25 30 * this is abstracted as a separate class for the benefit of anyone who doesn't … … 48 53 Zotero.debug("CSL: style class is "+this.class); 49 54 50 55 this.hasBibliography = (this._csl.bibliography.length() ? 1 : 0); 56 /* 57 * fbennett: 5 58 * 7 lines 59 */ 60 this.daySuffixes = Zotero.getString("date.daySuffixes").replace(/, ?/g, "|").split("|"); 61 for each (i in [0,1,2,3]) { 62 if (suffix = this._getTerm("ordinal-0"+(i+1), false, false, false, true)) { 63 this.daySuffixes[i] = suffix; 64 } 65 } 66 51 67 } 52 68 53 69 /* … … 70 86 "recipient":true, 71 87 "interviewer":true, 72 88 "collection-editor":true, 73 "author":true 89 /* 90 * fbennett: 6 91 * 3 lines 92 */ 93 "author":true, 94 "contributor":true, 95 "container-author":true 74 96 } 75 97 76 98 /* … … 260 282 if(Zotero.CSL._textCharRegexp.test(prefix[prefix.length-1])) prefix += " "; 261 283 262 284 citationString.append(prefix); 285 /* 286 * fbennett: 7 287 * 1 line 288 */ 289 citationString.has_prefix = true; 263 290 } 264 291 265 292 this._processElements(citationItem.item, context.layout, citationString, 266 293 context, citationItem, ignore); 267 294 268 295 // add suffix 296 var hasSuffixPunctuation; 269 297 if(citationItem.suffix) { 270 298 var suffix = citationItem.suffix; 299 /* 300 * fbennett: 7 301 * 5 lines 302 */ 303 var sfx = suffix.replace(/^\s*/g, "").replace(/\s*$/g, ""); 304 var pnct = Zotero.CSL.FormattedString._punctuation; 305 if (pnct.indexOf(sfx[sfx.length-1]) != -1) { 306 hasSuffixPunctuation = true; 307 } else { 308 hasSuffixPunctuation = false; 309 } 271 310 272 311 // add space to suffix if last char is alphanumeric 273 312 if(Zotero.CSL._textCharRegexp.test(suffix[0])) suffix = " "+suffix; … … 276 315 } 277 316 278 317 string.concat(citationString); 318 string.hasSuffixPunctuation = hasSuffixPunctuation; 279 319 } 280 320 281 321 var returnString = string.clone(); … … 489 529 /* 490 530 * gets a term, in singular or plural form 491 531 */ 492 Zotero.CSL.prototype._getTerm = function(term, plural, form, includePeriod) { 532 /* 533 * fbennett: 5 534 * 1 line 535 */ 536 Zotero.CSL.prototype._getTerm = function(term, plural, form, includePeriod, quiet) { 493 537 if(!form) { 494 538 form = "long"; 495 539 } … … 502 546 } else if(form != "long") { 503 547 return this._getTerm(term, plural, "long"); 504 548 } else { 549 /* 550 * fbennett: 5 551 * 3 lines 552 */ 553 if (!quiet) { 505 554 Zotero.debug("CSL: WARNING: could not find term \""+term+'"'); 555 } 506 556 return ""; 507 557 } 508 558 } … … 758 808 759 809 if(variables[j] == "locator") { 760 810 // special case for locator 811 /* 812 * fbennett: 3 813 * 9 lines 814 */ 761 815 var text = citationItem && citationItem.locator ? citationItem.locator : ""; 816 } else if(variables[j] == "volume") { 817 // special case for volume 818 var text = citationItem && citationItem.volume ? citationItem.volume : item.getVariable("volume"); 819 } else if(variables[j] == "edition") { 820 // special case for edition 821 var text = citationItem && citationItem.edition ? citationItem.edition : item.getVariable("edition"); 822 } else if(variables[j] == "date") { 823 // special case for date 824 var text = citationItem && citationItem.date ? citationItem.date : item.getVariable("date"); 762 825 } else if(citationItem && citationItem._csl && citationItem._csl[variables[j]]) { 763 826 // override if requested 764 827 var text = citationItem._csl[variables[j]]; … … 804 867 for(var j=0; j<variables.length; j++) { 805 868 if(ignore[0][variables[j]]) continue; 806 869 807 var text = item.getNumericVariable(variables[j], form); 870 /* 871 * fbennett: 9 872 * 1 line 873 */ 874 var text = item.getNumericVariable(variables[j], citationItem, form, this.daySuffixes); 808 875 if(text) { 809 876 newString.append(text); 810 877 success = true; … … 920 987 for(var j=0; j<variables.length; j++) { 921 988 if(ignore[0][variables[j]]) continue; 922 989 923 var date = item.getDate(variables[j]); 990 /* 991 * fbennett: 3 992 * 1 line 993 */ 994 var date = item.getDate(variables[j], citationItem); 924 995 if(!date) continue; 925 996 926 997 var variableString = formattedString.clone(); … … 1037 1108 1038 1109 // inspect variables 1039 1110 var done = false; 1040 var attributes = ["variable", "is-date", "is-numeric", "is-plural", "type", "disambiguate", "locator", " position"];1111 var attributes = ["variable", "is-date", "is-numeric", "is-plural", "type", "disambiguate", "locator", "context", "position"]; 1041 1112 for(var k=0; !done && k<attributes.length; k++) { 1042 var attribute = attributes[k];1113 var attribute = attributes[k]; 1043 1114 1044 1115 if(newChild["@"+attribute].length()) { 1045 1116 var variables = newChild["@"+attribute].toString().split(" "); 1117 1046 1118 for(var j=0; !done && j<variables.length; j++) { 1047 1119 var exists = false; 1048 1120 if(attribute == "variable") { 1049 if(variables[j] == "locator") {1121 if(variables[j] == "locator") { 1050 1122 // special case for locator 1051 1123 exists = citationItem && citationItem.locator && citationItem.locator.length > 0 1052 1124 } 1053 1125 else if(Zotero.CSL._dateVariables[variables[j]]) { 1054 1126 // getDate not false/undefined 1055 exists = !!item.getDate(variables[j]); 1127 /* 1128 * fbennett: 3 1129 * 1 line 1130 */ 1131 exists = !!item.getDate(variables[j], citationItem); 1056 1132 } else if(Zotero.CSL._namesVariables[variables[j]]) { 1057 1133 // getNames not false/undefined, not empty 1058 1134 exists = item.getNames(variables[j]); … … 1062 1138 if (exists) exists = !!exists.length; 1063 1139 } 1064 1140 } else if (attribute == "is-numeric") { 1065 exists = item.getNumericVariable(variables[j]); 1141 /* 1142 * fbennett: 9 1143 * 3 lines 1144 */ 1145 exists = item.getNumericVariable(variables[j], citationItem); 1066 1146 } else if (attribute == "is-date") { // XXX - this needs improving 1067 1147 if (Zotero.CSL._dateVariables[variables[j]]) { 1068 exists = !!item.getDate(variables[j]);1148 exists = !!item.getDate(variables[j], citationItem); 1069 1149 } 1070 1150 } else if(attribute == "is-plural") { 1071 1151 if(Zotero.CSL._namesVariables[variables[j]]) { … … 1085 1165 exists = (variables[j] == "true" && item.getProperty("disambiguate-condition")) 1086 1166 || (variables[j] == "false" && !item.getProperty("disambiguate-condition")); 1087 1167 } else if(attribute == "locator") { 1088 exists = citationItem && citationItem.locator && 1089 (citationItem.locatorType == variables[j] 1090 || (!citationItem.locatorType && variables[j] == "page")); 1168 1169 exists = citationItem && citationItem.locator && 1170 (citationItem.locatorType == variables[j] 1171 || (!citationItem.locatorType && variables[j] == "page")); 1172 1173 } else if (attribute == "context") { 1174 1175 if (variables[j] == "same-note") { 1176 exists = citationItem && citationItem.sameNote; 1177 } else if(variables[j] == "prefix-punctuation") { 1178 exists = citationItem && citationItem.prefixPunctuation; 1179 } 1091 1180 } else { // attribute == "position" 1181 1092 1182 if(variables[j] == "first") { 1093 1183 exists = !citationItem 1094 1184 || !citationItem.position 1095 1185 || citationItem.position == Zotero.CSL.POSITION_FIRST; 1096 1186 } else if(variables[j] == "subsequent") { 1097 1187 exists = citationItem && citationItem.position >= Zotero.CSL.POSITION_SUBSEQUENT; 1188 /* 1189 * fbennett: 4 1190 * 10 lines 1191 */ 1098 1192 } else if(variables[j] == "ibid") { 1099 1193 exists = citationItem && citationItem.position >= Zotero.CSL.POSITION_IBID; 1100 1194 } else if(variables[j] == "ibid-with-locator") { 1101 exists = citationItem && citationItem.position == Zotero.CSL.POSITION_IBID_WITH_LOCATOR;1195 exists = citationItem && citationItem.position >= Zotero.CSL.POSITION_IBID_WITH_LOCATOR; 1102 1196 } 1103 1197 } 1104 1198 … … 1721 1815 * Mappings for names 1722 1816 */ 1723 1817 Zotero.CSL.Item._zoteroNameMap = { 1724 "collection-editor":"seriesEditor" 1818 /* 1819 * fbennett: 6 1820 * 2 lines 1821 */ 1822 "collection-editor":"seriesEditor", 1823 "container-author":"containerAuthor" 1725 1824 } 1726 1825 1727 1826 /* … … 1744 1843 /* 1745 1844 * Gets an Item.Date object for a specific type. 1746 1845 */ 1747 Zotero.CSL.Item.prototype.getDate = function(variable) { 1846 /* 1847 * fbennett: 3 1848 * 8 lines 1849 */ 1850 Zotero.CSL.Item.prototype.getDate = function(variable, citationItem) { 1748 1851 // ignore accessed date 1749 1852 if(this._ignoreURL && variable == "accessed") return false; 1750 1853 1751 1854 // load date variable if possible 1752 1855 this._refreshItem(); 1753 if(this._dates[variable] == undefined ) {1754 this._createDate(variable );1856 if(this._dates[variable] == undefined || citationItem) { 1857 this._createDate(variable, citationItem); 1755 1858 } 1756 1859 1757 1860 if(this._dates[variable]) return this._dates[variable]; … … 1761 1864 Zotero.CSL.Item._zoteroFieldMap = { 1762 1865 "long":{ 1763 1866 "title":"title", 1764 "container-title":["publicationTitle", "reporter", "code"], /* reporter and code should move to SQL mapping tables */ 1867 /* 1868 * fbennett: 11 1869 * 1 line 1870 */ 1871 "container-title":["publicationTitle", "journalAbbreviation", "reporter", "code"], /* reporter and code should move to SQL mapping tables */ 1765 1872 "collection-title":["seriesTitle", "series"], 1766 1873 "collection-number":"seriesNumber", 1767 1874 "publisher":["publisher", "distributor"], /* distributor should move to SQL mapping tables */ … … 1786 1893 "call-number":"callNumber", 1787 1894 "note":"extra", 1788 1895 "number":"number", 1789 "references":"history" 1896 /* 1897 * fbennett: 8 1898 * 3 lines 1899 */ 1900 "references":"history", 1901 "issued":"date", 1902 "accessed":"accessDate" 1790 1903 }, 1791 1904 "short":{ 1792 1905 "title":["shortTitle", "title"], … … 1840 1953 /* 1841 1954 * convert a number into a ordinal number 1st, 2nd, 3rd etc. 1842 1955 */ 1843 Zotero.CSL.Item.prototype.makeOrdinal = function(value) { 1956 /* 1957 * fbennett: 5 1958 * 3 lines 1959 */ 1960 Zotero.CSL.Item.prototype.makeOrdinal = function(value, daySuffixes) { 1844 1961 var ind = parseInt(value); 1845 var daySuffixes = Zotero.getString("date.daySuffixes").replace(/, ?/g, "|").split("|");1846 1962 value += (parseInt(ind/10)%10) == 1 ? daySuffixes[3] : (ind % 10 == 1) ? daySuffixes[0] : (ind % 10 == 2) ? daySuffixes[1] : (ind % 10 == 3) ? daySuffixes[2] : daySuffixes[3]; 1847 1963 return value; 1848 1964 } … … 1889 2005 "issue":"issue", 1890 2006 "number-of-volumes":"numberOfVolumes", 1891 2007 "edition":"edition", 1892 "number":"number" 2008 /* 2009 * fbennett: 5, 9 2010 * 17 lines 2011 * (including the change to the function interface, which applies to 5) 2012 */ 2013 "number":"number", 2014 "note":"extra", 2015 "title":"title", 2016 "container-title":"publicationTitle", 2017 "issued":"date", 2018 "page":"pages", 2019 "locator":"locator", 2020 "collection-number":"seriesNumber" 1893 2021 } 1894 2022 /* 1895 2023 * Gets a numeric object for a specific type. <number variable="edition" form="roman"/> 1896 2024 */ 1897 Zotero.CSL.Item.prototype.getNumericVariable = function(variable, form) { 2025 // fbennett: add citationItem argument to function, to gain access to 2026 // locator field 2027 Zotero.CSL.Item.prototype.getNumericVariable = function(variable, citationItem, form, daySuffixes) { 1898 2028 1899 2029 if(!Zotero.CSL.Item._zoteroNumberFieldMap[variable]) return ""; 1900 2030 … … 1910 2040 1911 2041 var matches; 1912 2042 for each(var zoteroField in zoteroFields) { 1913 var value = this.zoteroItem.getField(zoteroField, false, true).toString(); 1914 2043 /* 2044 * fbennett: 3, 9 2045 * 13 lines 2046 */ 2047 2048 if(zoteroField == "locator") { 2049 var value = citationItem.locator.toString(); 2050 } else if ( zoteroField == "volume" && citationItem && citationItem.volume) { 2051 // fbennett: special handling for volume field 2052 var value = citationItem.volume; 2053 } else if(zoteroField == "edition" && citationItem && citationItem.edition) { 2054 // fbennett: edition too 2055 var value = citationItem.edition; 2056 } else { 2057 var value = this.zoteroItem.getField(zoteroField, false, true).toString(); 2058 } 2059 1915 2060 // Quoted strings are never numeric 1916 2061 if(value.match(Zotero.CSL._quotedRegexp)) { 1917 2062 continue; … … 1921 2066 if(value != "" && (matches = value.match(Zotero.CSL._numberRegexp)) ) { 1922 2067 value = matches[0]; 1923 2068 if (form == "ordinal") { 1924 return this.makeOrdinal(value); 2069 /* 2070 * fbennett: 5 2071 * 1 line 2072 */ 2073 return this.makeOrdinal(value, daySuffixes); 1925 2074 } 1926 2075 else if (form == "roman") { 1927 2076 return this.makeRoman(value); … … 1951 2100 journalArticle:"article-journal", 1952 2101 magazineArticle:"article-magazine", 1953 2102 newspaperArticle:"article-newspaper", 2103 /* 2104 * fbennett: 10 2105 * 1 line 2106 */ 2107 dictionaryEntry:"entry-dictionary", 1954 2108 thesis:"thesis", 1955 2109 conferencePaper:"paper-conference", 1956 2110 letter:"personal_communication", … … 2057 2211 * Generates an date object for a given variable (currently supported: issued 2058 2212 * and accessed) 2059 2213 */ 2060 Zotero.CSL.Item.prototype._createDate = function(variable) { 2214 /* 2215 * fbennett: 3 2216 * 9 lines 2217 */ 2218 Zotero.CSL.Item.prototype._createDate = function(variable, citationItem) { 2061 2219 // first, figure out what date variable to use. 2062 2220 if(variable == "issued") { 2221 if (citationItem && citationItem.issued) { 2222 var date = citationItem.issued 2223 } else { 2063 2224 var date = this.zoteroItem.getField("date", false, true); 2064 var sort = this.zoteroItem.getField("date", true, true); 2225 } 2226 var sort = this.zoteroItem.getField("date", true, true); 2065 2227 } else if(variable == "accessed") { 2066 2228 var date = this.zoteroItem.getField("accessDate", false, true); 2067 2229 var sort = this.zoteroItem.getField("accessDate", true, true); … … 2560 2722 this.closePunctuation = ""; 2561 2723 this.closeFormatting = ""; 2562 2724 this.useBritishStyleQuotes = false; 2725 /* 2726 * fbennett: 7 2727 * 2 lines 2728 */ 2729 this.hasPrefix = false; 2730 this.hasSuffixPunctuation = false; 2563 2731 2564 2732 // insert tab iff second-field-align is on 2565 2733 this.insertTabAfterField = (!subsequent && this.option.(@name == "second-field-align").@value.toString()); … … 2603 2771 suffix = element.@suffix.toString(); 2604 2772 element.@suffix = []; 2605 2773 } 2606 haveAppended = this.append(formattedString.string, element, false, true); 2774 /* 2775 /* 2776 * fbennett: 7 2777 * 4 lines 2778 */ 2779 if (formattedString.hasPrefix || this.hasSuffixPunctuation) { 2780 doNotDelimit = true; 2781 } else { 2782 doNotDelimit = false; 2783 } 2784 haveAppended = this.append(formattedString.string, element, doNotDelimit, true); 2607 2785 } 2608 2786 2609 2787 // if there's close punctuation to append, that also counts -
chrome/content/zotero/xpcom/integration.js
Only in zotero-trunk/chrome/content/zotero/xpcom: csl.js.orig diff -r -u zotero-trunk.orig/chrome/content/zotero/xpcom/integration.js zotero-trunk/chrome/content/zotero/xpcom/integration.js
old new 1197 1197 * sets position attribute on a citation 1198 1198 */ 1199 1199 Zotero.Integration.Session.prototype.getCitationPositions = function(citation, update) { 1200 for(var previousIndex = citation.properties.index-1; 1201 previousIndex != -1 1202 && (!this.citationsByIndex[previousIndex] 1203 || this.citationsByIndex[previousIndex].properties["delete"]); 1204 previousIndex--) {} 1205 var previousCitation = (previousIndex == -1 ? false : this.citationsByIndex[previousIndex]); 1206 1207 // if only one source, and it's the same as the last, use ibid 1208 if( // there must be a previous citation with one item, and this citation 1209 // may only have one item 1210 previousCitation && citation.citationItems.length == 1 1211 && previousCitation.citationItems.length == 1 1212 // the previous citation must have been a citation of the same item 1213 && citation.citationItems[0].item == previousCitation.citationItems[0].item 1214 // and if the previous citation had a locator (page number, etc.) 1215 // then this citation must have a locator, or else we should do the 1216 // full citation (see Chicago Manual of Style) 1217 && (!previousCitation.citationItems[0].locator || citation.citationItems[0].locator)) { 1218 // use ibid, but check whether to use ibid+pages 1219 var newPosition = (citation.citationItems[0].locator == previousCitation.citationItems[0].locator 1220 && citation.citationItems[0].locatorType == previousCitation.citationItems[0].locatorType 1221 ? Zotero.CSL.POSITION_IBID : Zotero.CSL.POSITION_IBID_WITH_LOCATOR); 1222 // update if desired 1223 if(update && (citation.citationItems[0].position || newPosition) && citation.citationItems[0].position != newPosition) { 1224 this.updateIndices[citation.properties.index] = true; 1225 } 1226 citation.citationItems[0].position = newPosition; 1200 /* 1201 * fbennett: 4 1202 * 133 lines 1203 */ 1204 for(var previousIndex = citation.properties.index-1; 1205 previousIndex != -1 1206 && (!this.citationsByIndex[previousIndex] 1207 || this.citationsByIndex[previousIndex].properties.delete); 1208 previousIndex--) {} 1209 var previousCitation = (previousIndex == -1 ? false : this.citationsByIndex[previousIndex]); 1210 // if one source is the same as the last, use ibid 1211 // 1212 // Case 1: source in previous citation 1213 // (1) Threshold conditions 1214 // (a) there must be a previous citation with one item 1215 // (b) this item must be the first in this citation 1216 // (c) the previous citation must contain a reference to the same item ... 1217 // Case 2: immediately preceding source in this citation 1218 // (1) Threshold conditions 1219 // (a) there must be an imediately preceding reference to the 1220 // same item in this citation 1221 // Evaluation 1222 // (a) if the previous citation had no locator and this citation 1223 // has one, use ibid+pages 1224 // (b) if the previous citation had no locator and this citation 1225 // also has none, use ibid 1226 // (c) if the previous citation had a locator (page number, etc.) 1227 // and this citation has a locator that is identical, use ibid 1228 // (d) if the previous citation had a locator, and this citation 1229 // has one that differs, use ibid+pages 1230 // (e) if the previous citation had a locator and this citation 1231 // has none, use subsequent 1232 // (f) if the current and previous citations are not the same, 1233 // set as FIRST or SUBSEQUENT, as appropriate. 1234 // 1235 // For Case 1 1236 var curr = citation.citationItems[0]; 1237 if( 1238 previousCitation 1239 && previousCitation.citationItems.length == 1 1240 && citation.citationItems[0].item == previousCitation.citationItems[0].item ) { 1241 var prev = previousCitation.citationItems[0]; 1242 var newPosition = this.compareCitePosition(prev, curr, false); 1243 } else { 1244 var newPosition = this.checkCitePosition(curr, citation, false); 1245 } 1246 this.updateCitePosition (curr, newPosition, citation, update); 1247 citation.citationItems[0].position = newPosition; 1248 this.checkCiteContext (citation.citationItems[0], newPosition); 1249 // 1250 // For Case 2 and non-matching cases 1251 for (var i = 1; i < citation.citationItems.length; i++) { 1252 var prev = citation.citationItems[i-1]; 1253 var curr = citation.citationItems[i]; 1254 if (prev.item == curr.item) { 1255 var newPosition = this.compareCitePosition(prev, curr, true); 1227 1256 } else { 1228 // loop through to see which are first citations 1229 for(var i=0; i<citation.citationItems.length; i++) { 1230 var citationItem = citation.citationItems[i]; 1231 var newPosition = (!this.citationsByItemID[citationItem.itemID] 1232 || this.citationsByItemID[citationItem.itemID][0].properties.index >= citation.properties.index 1233 ? Zotero.CSL.POSITION_FIRST : Zotero.CSL.POSITION_SUBSEQUENT); 1234 1235 // update if desired 1236 if(update && (citation.citationItems[i].position || newPosition) && citation.citationItems[i].position != newPosition) { 1237 this.updateIndices[citation.properties.index] = true; 1238 } 1239 citation.citationItems[i].position = newPosition; 1240 } 1257 var newPosition = this.checkCitePosition(curr, citation, true); 1258 } 1259 this.updateCitePosition (curr, newPosition, citation, update); 1260 citation.citationItems[i].position = newPosition; 1261 this.checkCiteContext (citation.citationItems[i], newPosition); 1262 } 1263 } 1264 1265 /* 1266 * evaluates position of qualifying cites 1267 */ 1268 1269 Zotero.Integration.Session.prototype.compareCitePosition = function(prev, curr, samenote) { 1270 1271 var newPosition; 1272 if (!prev.locator) { 1273 if (curr.locator) { 1274 newPosition = Zotero.CSL.POSITION_IBID_WITH_LOCATOR; 1275 } else { 1276 newPosition = Zotero.CSL.POSITION_IBID; 1277 } 1278 } else { 1279 if (prev.locator == curr.locator) { 1280 newPosition = Zotero.CSL.POSITION_IBID; 1281 } else if (curr.locator) { 1282 newPosition = Zotero.CSL.POSITION_IBID_WITH_LOCATOR; 1283 } else { 1284 newPosition = Zotero.CSL.POSITION_SUBSEQUENT; 1241 1285 } 1286 } 1287 return newPosition; 1288 } 1289 1290 /* 1291 * checks if cite is in the same note and whether it has a prefix with terminal punctuation 1292 */ 1293 Zotero.Integration.Session.prototype.checkCiteContext = function(citationItem, newPosition) { 1294 1295 if (newPosition == Zotero.CSL.POSITION_FIRST) { 1296 citationItem.sameNote = true; 1297 } else { 1298 citationItem.sameNote = false; 1299 } 1300 1301 if (citationItem.prefix && citationItem.prefix.match(/.*[:;.]\s*$/)) { 1302 citationItem.prefixPunctuation = true; 1303 } else { 1304 citationItem.prefixPunctuation = false; 1305 } 1306 } 1307 1308 /* 1309 * checks whether a cite is a first or subsequent reference 1310 */ 1311 Zotero.Integration.Session.prototype.checkCitePosition = function(curr, citation, samenote) { 1312 1313 var newPosition; 1314 if (!this.citationsByItemID[curr.itemID]) { 1315 newPosition = Zotero.CSL.POSITION_FIRST; 1316 } else if (this.citationsByItemID[curr.itemID][0].properties.index >= citation.properties.index) { 1317 newPosition = Zotero.CSL.POSITION_FIRST; 1318 } else { 1319 newPosition = Zotero.CSL.POSITION_SUBSEQUENT; 1320 } 1321 return newPosition; 1322 } 1323 1324 1325 /* 1326 * updates indexes 1327 * 1328 */ 1329 Zotero.Integration.Session.prototype.updateCitePosition = function (curr, newPosition, citation, update) { 1330 if(update && (curr.position || newPosition) && curr.position != newPosition) { 1331 this.updateIndices[citation.properties.index] = true; 1332 } 1242 1333 } 1243 1334 1244 1335 /* -
chrome/locale/en-US/zotero/zotero.dtd
Only in zotero-trunk/chrome/content/zotero/xpcom: integration.js.orig Only in zotero-trunk/chrome/content/zotero/xpcom: integration.js.rej diff -r -u zotero-trunk.orig/chrome/locale/en-US/zotero/zotero.dtd zotero-trunk/chrome/locale/en-US/zotero/zotero.dtd
old new 132 132 <!ENTITY zotero.citation.suppressAuthor.label "Suppress Author"> 133 133 <!ENTITY zotero.citation.prefix.label "Prefix:"> 134 134 <!ENTITY zotero.citation.suffix.label "Suffix:"> 135 <!ENTITY zotero.citation.volume.label "Volume:"> 135 136 136 137 <!ENTITY zotero.richText.italic.label "Italic"> 137 138 <!ENTITY zotero.richText.bold.label "Bold"> -
chrome/locale/en-US/zotero/zotero.properties
diff -r -u zotero-trunk.orig/chrome/locale/en-US/zotero/zotero.properties zotero-trunk/chrome/locale/en-US/zotero/zotero.properties
old new 321 321 creatorTypes.presenter = Presenter 322 322 creatorTypes.guest = Guest 323 323 creatorTypes.podcaster = Podcaster 324 creatorTypes.containerAuthor = Sponsor 324 325 325 326 fileTypes.webpage = Web Page 326 327 fileTypes.image = Image -
chrome/skin/default/zotero/overlay.css
Only in zotero-trunk/chrome/locale/en-US/zotero: zotero.properties.orig diff -r -u zotero-trunk.orig/chrome/skin/default/zotero/overlay.css zotero-trunk/chrome/skin/default/zotero/overlay.css
old new 1 1 #zotero-status-bar-icon 2 2 { 3 width: 55px;3 width: 74px; 4 4 margin: 0 0 -1px; /* For Fitts's law (on OS X, at least) */ 5 5 padding: 0 0 1px; 6 list-style-image: url(chrome://zotero/skin/zotero_status_bar .png);6 list-style-image: url(chrome://zotero/skin/zotero_status_bar_lex.png); 7 7 } 8 8 #zotero-status-bar-icon[compact="true"] 9 9 { -
chrome/skin/default/zotero/preferences.css
diff -r -u zotero-trunk.orig/chrome/skin/default/zotero/preferences.css zotero-trunk/chrome/skin/default/zotero/preferences.css
old new 60 60 61 61 #fontSize radio, #statusBarIcon radio 62 62 { 63 width: 90px;63 width: 114px; 64 64 } 65 65 66 66 #fontSize radio .radio-icon, #statusBarIcon radio .radio-icon -
zotero-trunk
Only in zotero-trunk/chrome/skin/default/zotero: preferences.css.orig Binary files zotero-trunk.orig/chrome/zotero.jar and zotero-trunk/chrome/zotero.jar differ diff -r -u zotero-trunk.orig/system.sql zotero-trunk/system.sql
old new 361 361 INSERT INTO itemTypeFields VALUES (6, 90, NULL, 2); 362 362 INSERT INTO itemTypeFields VALUES (6, 12, NULL, 3); 363 363 INSERT INTO itemTypeFields VALUES (6, 6, NULL, 4); 364 INSERT INTO itemTypeFields VALUES (6, 14, NULL, 5); 365 INSERT INTO itemTypeFields VALUES (6, 15, NULL, 6); 366 INSERT INTO itemTypeFields VALUES (6, 10, NULL, 7); 367 INSERT INTO itemTypeFields VALUES (6, 87, NULL, 8); 368 INSERT INTO itemTypeFields VALUES (6, 116, NULL, 9); 369 INSERT INTO itemTypeFields VALUES (6, 13, NULL, 10); 370 INSERT INTO itemTypeFields VALUES (6, 1, NULL, 11); 371 INSERT INTO itemTypeFields VALUES (6, 27, NULL, 12); 372 INSERT INTO itemTypeFields VALUES (6, 18, NULL, 13); 373 INSERT INTO itemTypeFields VALUES (6, 19, NULL, 14); 374 INSERT INTO itemTypeFields VALUES (6, 62, NULL, 15); 375 INSERT INTO itemTypeFields VALUES (6, 2, NULL, 16); 376 INSERT INTO itemTypeFields VALUES (6, 22, NULL, 17); 364 -- fbennett: 12 365 -- 14 lines 366 INSERT INTO itemTypeFields VALUES (6, 7, NULL, 5); 367 INSERT INTO itemTypeFields VALUES (6, 14, NULL, 6); 368 INSERT INTO itemTypeFields VALUES (6, 15, NULL, 7); 369 INSERT INTO itemTypeFields VALUES (6, 10, NULL, 8); 370 INSERT INTO itemTypeFields VALUES (6, 87, NULL, 9); 371 INSERT INTO itemTypeFields VALUES (6, 116, NULL, 10); 372 INSERT INTO itemTypeFields VALUES (6, 13, NULL, 11); 373 INSERT INTO itemTypeFields VALUES (6, 1, NULL, 12); 374 INSERT INTO itemTypeFields VALUES (6, 27, NULL, 13); 375 INSERT INTO itemTypeFields VALUES (6, 18, NULL, 14); 376 INSERT INTO itemTypeFields VALUES (6, 19, NULL, 15); 377 INSERT INTO itemTypeFields VALUES (6, 62, NULL, 16); 378 INSERT INTO itemTypeFields VALUES (6, 2, NULL, 17); 379 INSERT INTO itemTypeFields VALUES (6, 22, NULL, 18); 377 380 INSERT INTO itemTypeFields VALUES (7, 110, NULL, 1); 378 381 INSERT INTO itemTypeFields VALUES (7, 90, NULL, 2); 379 382 INSERT INTO itemTypeFields VALUES (7, 69, NULL, 3); … … 907 910 INSERT INTO creatorTypes VALUES(25, "guest"); 908 911 INSERT INTO creatorTypes VALUES(26, "podcaster"); 909 912 INSERT INTO creatorTypes VALUES(27, "reviewedAuthor"); 913 -- fbennett: 6 914 -- 20 lines 915 INSERT INTO creatorTypes VALUES(28, "containerAuthor"); 910 916 911 917 INSERT INTO itemTypeCreatorTypes VALUES(2,1,1); 912 918 INSERT INTO itemTypeCreatorTypes VALUES(2,2,0); 913 919 INSERT INTO itemTypeCreatorTypes VALUES(2,3,0); 914 920 INSERT INTO itemTypeCreatorTypes VALUES(2,4,0); 915 921 INSERT INTO itemTypeCreatorTypes VALUES(2,5,0); 922 INSERT INTO itemTypeCreatorTypes VALUES(2,28,0); 916 923 INSERT INTO itemTypeCreatorTypes VALUES(3,1,1); 917 924 INSERT INTO itemTypeCreatorTypes VALUES(3,2,0); 918 925 INSERT INTO itemTypeCreatorTypes VALUES(3,3,0); 919 926 INSERT INTO itemTypeCreatorTypes VALUES(3,4,0); 920 927 INSERT INTO itemTypeCreatorTypes VALUES(3,5,0); 928 INSERT INTO itemTypeCreatorTypes VALUES(3,28,0); 921 929 INSERT INTO itemTypeCreatorTypes VALUES(4,1,1); 922 930 INSERT INTO itemTypeCreatorTypes VALUES(4,2,0); 923 931 INSERT INTO itemTypeCreatorTypes VALUES(4,3,0);