commit bf0626cb58d9e585222e02dc2c586424ff8699ae
parent 380584986a627ae6bbcf56b20fe9327e418035e3
Author: David Norton <david@nortoncrew.com>
Date: Fri, 16 Jun 2006 17:21:30 +0000
[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
Diffstat:
3 files changed, 16 insertions(+), 6 deletions(-)
diff --git 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
@@ -17,8 +17,8 @@
<menulist flex="1" id="scholar-notes-menu" oncommand="ScholarItemPane.onNoteSelected();">
<menupopup/>
</menulist>
- <toolbarbutton label="-" class="addremove" oncommand="ScholarItemPane.removeSelectedNote();"/>
- <toolbarbutton label="+" class="addremove" oncommand="ScholarItemPane.addNote();"/>
+ <label value="-" class="clicky" onclick="ScholarItemPane.removeSelectedNote();"/>
+ <label value="+" class="clicky" onclick="ScholarItemPane.addNote();"/>
</hbox>
<textbox id="scholar-notes-field"
type="timed" timeout="1000" oncommand="ScholarItemPane.modifySelectedNote();"
diff --git a/chrome/chromeFiles/skin/default/scholar/overlay.css b/chrome/chromeFiles/skin/default/scholar/overlay.css
@@ -62,12 +62,17 @@ tree #items-tree
overflow: auto;
}
-#scholar-metadata .addremove
+#scholar-notes-menu
+{
+ -moz-user-focus: ignore;
+}
+
+#scholar-view-item .clicky
{
-moz-border-radius: 6px;
}
-#scholar-metadata .addremove:hover
+#scholar-view-item .clicky:hover
{
color: white;
background: #666666;