From ca501a41c53b28080e735f535d798c36ab3b502f Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 24 Oct 2006 17:39:24 +0000 Subject: [PATCH] Fix for right column getting pushed off the side --- chrome/content/zotero/itemPane.js | 11 +++++++++-- chrome/skin/default/zotero/overlay.css | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/itemPane.js b/chrome/content/zotero/itemPane.js index 6d2a5e806..b863a9514 100644 --- a/chrome/content/zotero/itemPane.js +++ b/chrome/content/zotero/itemPane.js @@ -587,6 +587,7 @@ var ZoteroItemPane = new function() button.setAttribute('tooltiptext', 'Switch to two fields'); lastName.setAttribute('singleField', 'true'); button.setAttribute('onclick', "ZoteroItemPane.switchCreatorMode(this.parentNode.parentNode, false)"); + lastName.setAttribute('flex', '1'); // Remove firstname field from tabindex var tab = parseInt(firstName.getAttribute('tabindex')); @@ -618,6 +619,7 @@ var ZoteroItemPane = new function() button.setAttribute('tooltiptext', 'Switch to single field'); lastName.setAttribute('singleField', 'false'); button.setAttribute('onclick', "ZoteroItemPane.switchCreatorMode(this.parentNode.parentNode, true)"); + lastName.setAttribute('flex', '0'); // Add firstname field to tabindex var tab = parseInt(lastName.getAttribute('tabindex')); @@ -716,9 +718,13 @@ var ZoteroItemPane = new function() } break; } + + if (fieldName.indexOf('firstName')!=-1){ + valueElement.setAttribute('flex', '1'); + } } - var firstSpace; + var firstSpace; if(typeof valueText == 'string') firstSpace = valueText.indexOf(" "); @@ -735,7 +741,8 @@ var ZoteroItemPane = new function() } } // 29 == arbitary length at which to chop uninterrupted text - else if ((firstSpace == -1 && valueText.length > 29 ) || firstSpace > 29) + else if ((firstSpace == -1 && valueText.length > 29 ) || firstSpace > 29 + || (fieldName && fieldName.substr(0, 7)=='creator')) { valueElement.setAttribute('crop', 'end'); valueElement.setAttribute('value',valueText); diff --git a/chrome/skin/default/zotero/overlay.css b/chrome/skin/default/zotero/overlay.css index 1a5baf061..9667097e4 100644 --- a/chrome/skin/default/zotero/overlay.css +++ b/chrome/skin/default/zotero/overlay.css @@ -42,8 +42,8 @@ #item-pane { - width: 300px; - min-width: 300px; + width: 330px; + min-width: 330px; } #zotero-pane toolbar