diff --git a/chrome/content/zotero/itemPane.js b/chrome/content/zotero/itemPane.js index c5bd5d393..876b1891b 100644 --- a/chrome/content/zotero/itemPane.js +++ b/chrome/content/zotero/itemPane.js @@ -308,7 +308,7 @@ var ZoteroItemPane = new function() var prefix = ''; // Add '(...)' before 'Abstract:' for collapsed abstracts - if (fieldNames[i] == 'abstract') { + if (fieldNames[i] == 'abstractNote') { if (val && !Zotero.Prefs.get('lastAbstractExpand')) { prefix = '(...) '; } @@ -321,7 +321,7 @@ var ZoteroItemPane = new function() label.setAttribute("onclick", "ZoteroPane.loadURI(this.nextSibling.value, event)"); label.setAttribute("tooltiptext", Zotero.getString('pane.item.goToURL.online.tooltip')); } - else if (fieldNames[i] == 'abstract') { + else if (fieldNames[i] == 'abstractNote') { label.setAttribute("onclick", "if (this.nextSibling.inputField) { this.nextSibling.inputField.blur(); } else { ZoteroItemPane.toggleAbstractExpand(this); }"); } else { @@ -842,12 +842,12 @@ var ZoteroItemPane = new function() Zotero.Prefs.set('lastAbstractExpand', !cur); var ab = label.nextSibling; - var valueText = _itemBeingEdited.getField('abstract'); + var valueText = _itemBeingEdited.getField('abstractNote'); var tabindex = ab.getAttribute('ztabindex'); - var elem = createValueElement(valueText, 'abstract', tabindex); + var elem = createValueElement(valueText, 'abstractNote', tabindex); ab.parentNode.replaceChild(elem, ab); - var text = Zotero.ItemFields.getLocalizedString(_itemBeingEdited.getType(), 'abstract') + ':'; + var text = Zotero.ItemFields.getLocalizedString(_itemBeingEdited.getType(), 'abstractNote') + ':'; // Add '(...)' before "Abstract:" for collapsed abstracts if (valueText && cur) { text = '(...) ' + text; @@ -871,7 +871,7 @@ var ZoteroItemPane = new function() function createValueElement(valueText, fieldName, tabindex, noedit) { - var abstractAsVbox = (fieldName == 'abstract') && + var abstractAsVbox = (fieldName == 'abstractNote') && Zotero.Prefs.get('lastAbstractExpand'); if (fieldName == 'extra' || abstractAsVbox) { @@ -940,8 +940,8 @@ var ZoteroItemPane = new function() // 29 == arbitrary length at which to chop uninterrupted text else if ((firstSpace == -1 && valueText.length > 29 ) || firstSpace > 29 || (fieldName && - (fieldName.substr(0, 7) == 'creator') || fieldName == 'abstract')) { - if (fieldName == 'abstract') { + (fieldName.substr(0, 7) == 'creator') || fieldName == 'abstractNote')) { + if (fieldName == 'abstractNote') { valueText = valueText.replace(/[\t\n]/g, ' '); } valueElement.setAttribute('crop', 'end'); @@ -1025,7 +1025,7 @@ var ZoteroItemPane = new function() t.setAttribute('singleField', elem.getAttribute('singleField')); } - if (fieldName == 'abstract' || fieldName == 'extra') + if (fieldName == 'abstractNote' || fieldName == 'extra') { t.setAttribute('multiline', true); t.setAttribute('rows', 8); @@ -1144,7 +1144,7 @@ var ZoteroItemPane = new function() { case event.DOM_VK_RETURN: // Use shift-enter as the save action for the larger fields - if ((target.getAttribute('fieldname') == 'abstract' + if ((target.getAttribute('fieldname') == 'abstractNote' || target.getAttribute('fieldname') == 'extra') && !event.shiftKey) { diff --git a/chrome/content/zotero/xpcom/data_access.js b/chrome/content/zotero/xpcom/data_access.js index 54704634c..023ce55f2 100644 --- a/chrome/content/zotero/xpcom/data_access.js +++ b/chrome/content/zotero/xpcom/data_access.js @@ -1897,11 +1897,6 @@ Zotero.Item.prototype.clone = function() { } continue; - // toArray()'s 'abstractNote' is 'abstract' field - case 'abstractNote': - newItem.setField('abstract', obj[i]); - continue; - case 'creators': var i = 0; for each(var c in obj.creators) { @@ -2131,12 +2126,6 @@ Zotero.Item.prototype.toArray = function(){ arr['itemType'] = Zotero.ItemTypes.getName(this._data[i]); break; - // Since 'abstract' is a reserved word in JS, we use abstractNote - // instead so clients can use dot notation - case 'abstract': - arr['abstractNote'] = this._data[i]; - continue; - // Skip certain fields //case 'firstCreator': case 'numNotes': diff --git a/chrome/content/zotero/xpcom/translate.js b/chrome/content/zotero/xpcom/translate.js index 4348217b9..f14b6f666 100644 --- a/chrome/content/zotero/xpcom/translate.js +++ b/chrome/content/zotero/xpcom/translate.js @@ -1144,8 +1144,6 @@ Zotero.Translate.prototype._itemDone = function(item, attachedTo) { newItem.setField(field, data); } else if(field == "seeAlso") { newItem.translateSeeAlso = data; - } else if(field == "abstractNote") { // abstractNote is 'abstract' field - newItem.setField('abstract', data); } else if(field != "note" && field != "notes" && field != "itemID" && field != "attachments" && field != "tags" && (fieldID = Zotero.ItemFields.getID(field))) { diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index 2b59daf11..d61347fe6 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -211,7 +211,7 @@ itemFields.dictionaryTitle = Dictionary Title itemFields.language = Language itemFields.programmingLanguage = Language itemFields.university = University -itemFields.abstract = Abstract +itemFields.abstractNote = Abstract itemFields.websiteTitle = Website Title itemFields.reportNumber = Report Number itemFields.billNumber = Bill Number diff --git a/chrome/skin/default/zotero/itemPane.css b/chrome/skin/default/zotero/itemPane.css index 20caa1295..3f10e9855 100644 --- a/chrome/skin/default/zotero/itemPane.css +++ b/chrome/skin/default/zotero/itemPane.css @@ -71,7 +71,7 @@ margin-left: 0; } -#zotero-editpane-dynamic-fields row vbox[fieldname=abstract], +#zotero-editpane-dynamic-fields row vbox[fieldname=abstractNote], #zotero-editpane-dynamic-fields row vbox[fieldname=extra] { margin-top: 1px; diff --git a/system.sql b/system.sql index ca4e6ca7e..0410576b8 100644 --- a/system.sql +++ b/system.sql @@ -1,4 +1,4 @@ --- 13 +-- 14 -- This file creates system tables that can be safely wiped and reinitialized -- at any time, as long as existing ids are preserved. @@ -241,7 +241,7 @@ INSERT INTO fields VALUES (86,'dictionaryTitle',NULL); INSERT INTO fields VALUES (87,'language',NULL); INSERT INTO fields VALUES (88,'programmingLanguage',NULL); INSERT INTO fields VALUES (89,'university',NULL); -INSERT INTO fields VALUES (90,'abstract',NULL); +INSERT INTO fields VALUES (90,'abstractNote',NULL); INSERT INTO fields VALUES (91,'websiteTitle',NULL); INSERT INTO fields VALUES (92,'reportNumber',NULL); INSERT INTO fields VALUES (93,'billNumber',NULL);