From bf0626cb58d9e585222e02dc2c586424ff8699ae Mon Sep 17 00:00:00 2001 From: David Norton Date: Fri, 16 Jun 2006 17:21:30 +0000 Subject: [PATCH] [interface] All editing elements that look like labels but provide functionality now offer hover feedback [fix] You shouldn't lose your changes if you select another item in the middle of editing a field. [fix] The dropdown menu to select notes doesn't steal the focus --- chrome/chromeFiles/content/scholar/itemPane.js | 9 +++++++-- chrome/chromeFiles/content/scholar/itemPane.xul | 4 ++-- chrome/chromeFiles/skin/default/scholar/overlay.css | 9 +++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/chrome/chromeFiles/content/scholar/itemPane.js b/chrome/chromeFiles/content/scholar/itemPane.js index 7a5b9bf9e6..df3ae65996 100644 --- a/chrome/chromeFiles/content/scholar/itemPane.js +++ b/chrome/chromeFiles/content/scholar/itemPane.js @@ -54,6 +54,9 @@ ScholarItemPane = new function() if(_itemBeingEdited && thisItem.getID() == _itemBeingEdited.getID()) return; + if(document.commandDispatcher.focusedElement) + document.commandDispatcher.focusedElement.blur(); + _itemBeingEdited = thisItem; reloadFields(); @@ -135,6 +138,7 @@ ScholarItemPane = new function() label.setAttribute("value",Scholar.getString('creatorTypes.'+Scholar.CreatorTypes.getTypeName(typeID))+":"); label.setAttribute("popup","creatorTypeMenu"); label.setAttribute("fieldname",'creator-'+_creatorCount+'-typeID'); + label.className = 'clicky'; var row = document.createElement("hbox"); @@ -146,13 +150,13 @@ ScholarItemPane = new function() var removeButton = document.createElement('label'); removeButton.setAttribute("value","-"); - removeButton.setAttribute("class","addremove"); + removeButton.setAttribute("class","clicky"); removeButton.setAttribute("onclick","ScholarItemPane.removeCreator("+_creatorCount+")"); row.appendChild(removeButton); var addButton = document.createElement('label'); addButton.setAttribute("value","+"); - addButton.setAttribute("class","addremove"); + addButton.setAttribute("class","clicky"); addButton.setAttribute("onclick","ScholarItemPane.addCreatorRow('','',1);"); row.appendChild(addButton); @@ -168,6 +172,7 @@ ScholarItemPane = new function() { valueElement.setAttribute('fieldname',fieldName); valueElement.setAttribute('onclick', 'ScholarItemPane.showEditor(this);'); + valueElement.className = 'clicky'; } var firstSpace = valueText.indexOf(" "); diff --git a/chrome/chromeFiles/content/scholar/itemPane.xul b/chrome/chromeFiles/content/scholar/itemPane.xul index 5646d9ce99..0a0bf28ae2 100644 --- a/chrome/chromeFiles/content/scholar/itemPane.xul +++ b/chrome/chromeFiles/content/scholar/itemPane.xul @@ -17,8 +17,8 @@ - - +