Fixes #211, Creator drop-down should have a little arrow to indicate it's a menu

Changed creator type <label> to <toolbarbutton> -- hopefully won't have any ill effects with other platforms' default themes (I haven't checked)

Moved some metadata pane CSS from overlay.css to zotero.css
This commit is contained in:
Dan Stillman 2006-10-04 08:53:24 +00:00
parent 5c6fcf8e28
commit f9c387e09b
4 changed files with 49 additions and 27 deletions

View file

@ -428,8 +428,8 @@ var ZoteroItemPane = new function()
}
}
var label = document.createElement("label");
label.setAttribute("value",Zotero.getString('creatorTypes.'+Zotero.CreatorTypes.getName(typeID))+":");
var label = document.createElement("toolbarbutton");
label.setAttribute("label",Zotero.getString('creatorTypes.'+Zotero.CreatorTypes.getName(typeID))+":");
label.setAttribute("popup","creatorTypeMenu");
label.setAttribute("fieldname",'creator-'+_creatorCount+'-typeID');
label.className = 'clicky';
@ -1056,7 +1056,7 @@ var ZoteroItemPane = new function()
}
function getCreatorFields(row){
var type = row.getElementsByTagName('label')[0].getAttribute('value');
var type = row.getElementsByTagName('toolbarbutton')[0].getAttribute('label');
var label1 = row.getElementsByTagName('hbox')[0].firstChild.firstChild;
var label2 = label1.parentNode.lastChild;

View file

@ -16,7 +16,7 @@
<popup id="creatorTypeMenu" position="after_start"
oncommand="var otherFields = ZoteroItemPane.getCreatorFields(document.popupNode.parentNode);
var typeID = event.explicitOriginalTarget.getAttribute('typeid');
document.popupNode.setAttribute('value',
document.popupNode.setAttribute('label',
Zotero.getString('creatorTypes.' + Zotero.CreatorTypes.getName(typeID)) + ':');
ZoteroItemPane.modifyCreator(document.popupNode.getAttribute('fieldname').split('-')[1],
'typeID', typeID, otherFields)"/>

View file

@ -204,29 +204,6 @@
margin-left: 5px;
}
/* creator switch button */
#editpane-dynamic-fields row hbox toolbarbutton
{
margin-right:5px;
}
#editpane-dynamic-fields row > label:first-child
{
text-align: right;
font-weight: bold;
}
/* no space between last name and comma */
#editpane-dynamic-fields row hbox label:first-child
{
margin-right:1px;
}
#editpane-dynamic-fields row hbox label.comma
{
margin-left:0;
}
#zotero-splitter
{
border-top: none;

View file

@ -119,6 +119,51 @@ zoterosearchtextbox .toolbarbutton-menu-dropmarker
}
*/
/* creator switch button */
#editpane-dynamic-fields row hbox toolbarbutton
{
margin-right:5px;
}
/* metadata field names */
#editpane-dynamic-fields row > label:first-child,
#editpane-dynamic-fields row > toolbarbutton .toolbarbutton-text /* creator type menu */
{
text-align: right;
font-weight: bold;
}
/* creator type menu */
#editpane-dynamic-fields row > toolbarbutton
{
margin: 0;
padding: 0;
list-style-image: url("chrome://browser/skin/dropmark-nav-small.png");
-moz-image-region: rect(0px, 14px, 16px, 0px);
}
#editpane-dynamic-fields row > toolbarbutton .toolbarbutton-text
{
margin-top: -1px;
}
#editpane-dynamic-fields row > toolbarbutton .toolbarbutton-icon,
#editpane-dynamic-fields row > toolbarbutton .toolbarbutton-menu-dropmarker
{
margin: 0;
padding: 0;
}
/* no space between last name and comma */
#editpane-dynamic-fields row hbox label:first-child
{
margin-right:1px;
}
#editpane-dynamic-fields row hbox label.comma
{
margin-left:0;
}
.clicky, .unclicky
{
-moz-border-radius: 6px;