From 3e11379c3a879d881431d931e4edad3fbf839063 Mon Sep 17 00:00:00 2001 From: David Norton Date: Tue, 13 Jun 2006 20:45:30 +0000 Subject: [PATCH] Notes now automatically save - no "save" button. The collections list does not resize randomly now. The pane on the right stays open all the time - even when 0/multiple items are selected. This is to avoid frequent resizing of the items pane. Temporarily, if the first "word" of a field's value is more than 29 characters long, it will set it to crop. This is for the long URLs, etc. --- chrome/chromeFiles/content/scholar/itemPane.js | 10 +++++++++- chrome/chromeFiles/content/scholar/itemPane.xul | 7 ++++--- chrome/chromeFiles/content/scholar/overlay.js | 11 ++++++----- chrome/chromeFiles/content/scholar/overlay.xul | 11 +++++++---- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/chrome/chromeFiles/content/scholar/itemPane.js b/chrome/chromeFiles/content/scholar/itemPane.js index 220f57a19..7570c249c 100644 --- a/chrome/chromeFiles/content/scholar/itemPane.js +++ b/chrome/chromeFiles/content/scholar/itemPane.js @@ -143,12 +143,20 @@ ScholarItemPane = new function() function createValueElement(valueText, fieldName) { var valueElement = document.createElement("label"); - valueElement.appendChild(document.createTextNode(valueText)); if(fieldName) { valueElement.setAttribute('fieldname',fieldName); valueElement.setAttribute('onclick', 'ScholarItemPane.showEditor(this);'); } + + var firstSpace = valueText.indexOf(" "); + if((firstSpace == -1 && valueText.length > 29 ) || firstSpace > 29) + { + valueElement.setAttribute('crop', 'end'); + valueElement.setAttribute('value',valueText); + } + else + valueElement.appendChild(document.createTextNode(valueText)); return valueElement; } diff --git a/chrome/chromeFiles/content/scholar/itemPane.xul b/chrome/chromeFiles/content/scholar/itemPane.xul index 45a695a57..fe24554c5 100644 --- a/chrome/chromeFiles/content/scholar/itemPane.xul +++ b/chrome/chromeFiles/content/scholar/itemPane.xul @@ -26,9 +26,10 @@ - -