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:
parent
5c6fcf8e28
commit
f9c387e09b
|
@ -428,8 +428,8 @@ var ZoteroItemPane = new function()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var label = document.createElement("label");
|
var label = document.createElement("toolbarbutton");
|
||||||
label.setAttribute("value",Zotero.getString('creatorTypes.'+Zotero.CreatorTypes.getName(typeID))+":");
|
label.setAttribute("label",Zotero.getString('creatorTypes.'+Zotero.CreatorTypes.getName(typeID))+":");
|
||||||
label.setAttribute("popup","creatorTypeMenu");
|
label.setAttribute("popup","creatorTypeMenu");
|
||||||
label.setAttribute("fieldname",'creator-'+_creatorCount+'-typeID');
|
label.setAttribute("fieldname",'creator-'+_creatorCount+'-typeID');
|
||||||
label.className = 'clicky';
|
label.className = 'clicky';
|
||||||
|
@ -1056,7 +1056,7 @@ var ZoteroItemPane = new function()
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCreatorFields(row){
|
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 label1 = row.getElementsByTagName('hbox')[0].firstChild.firstChild;
|
||||||
var label2 = label1.parentNode.lastChild;
|
var label2 = label1.parentNode.lastChild;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<popup id="creatorTypeMenu" position="after_start"
|
<popup id="creatorTypeMenu" position="after_start"
|
||||||
oncommand="var otherFields = ZoteroItemPane.getCreatorFields(document.popupNode.parentNode);
|
oncommand="var otherFields = ZoteroItemPane.getCreatorFields(document.popupNode.parentNode);
|
||||||
var typeID = event.explicitOriginalTarget.getAttribute('typeid');
|
var typeID = event.explicitOriginalTarget.getAttribute('typeid');
|
||||||
document.popupNode.setAttribute('value',
|
document.popupNode.setAttribute('label',
|
||||||
Zotero.getString('creatorTypes.' + Zotero.CreatorTypes.getName(typeID)) + ':');
|
Zotero.getString('creatorTypes.' + Zotero.CreatorTypes.getName(typeID)) + ':');
|
||||||
ZoteroItemPane.modifyCreator(document.popupNode.getAttribute('fieldname').split('-')[1],
|
ZoteroItemPane.modifyCreator(document.popupNode.getAttribute('fieldname').split('-')[1],
|
||||||
'typeID', typeID, otherFields)"/>
|
'typeID', typeID, otherFields)"/>
|
||||||
|
|
|
@ -204,29 +204,6 @@
|
||||||
margin-left: 5px;
|
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
|
#zotero-splitter
|
||||||
{
|
{
|
||||||
border-top: none;
|
border-top: none;
|
||||||
|
|
|
@ -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
|
.clicky, .unclicky
|
||||||
{
|
{
|
||||||
-moz-border-radius: 6px;
|
-moz-border-radius: 6px;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user