From 456406fc1072d91215f60c8efee5ea4865f61d04 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 12 Oct 2011 08:48:47 +0000 Subject: [PATCH] Increase max length of duplicate detection field selector menu items, and display tooltip if still cut off --- chrome/content/zotero/bindings/itembox.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml index fa8bcd6b5a..d976e33ca9 100644 --- a/chrome/content/zotero/bindings/itembox.xml +++ b/chrome/content/zotero/bindings/itembox.xml @@ -442,7 +442,11 @@ for each(var v in this._fieldAlternatives[fieldName]) { var menuitem = document.createElement("menuitem"); - menuitem.setAttribute('label', Zotero.Utilities.ellipsize(v, 40)); + var sv = Zotero.Utilities.ellipsize(v, 60); + menuitem.setAttribute('label', sv); + if (v != sv) { + menuitem.setAttribute('tooltiptext', v); + } menuitem.setAttribute('fieldName', fieldName); menuitem.setAttribute('originalValue', v); menuitem.setAttribute( @@ -520,6 +524,7 @@ this._creatorCount = 0; var num = this.item.numCreators(); if (num > 0) { + // Limit number of creators display var max = Math.min(num, this._initialVisibleCreators); // If fewer than five more, just display if (num < max + 5 || this._displayAllCreators) { @@ -529,6 +534,7 @@ this.addCreatorRow(this.item.getCreator(i).ref, this.item.getCreator(i).creatorTypeID); + // Display "+" button on all but last row if (i == max - 2) { this.disableCreatorAddButtons(); }