Tweak notes/tags/related pane appearance

This commit is contained in:
Simon Kornblith 2012-07-30 03:08:38 -04:00
parent bdfbfc10b2
commit 59913cc5c0
6 changed files with 28 additions and 5 deletions

View File

@ -107,6 +107,7 @@
related = Zotero.Items.get(related); related = Zotero.Items.get(related);
for (var i = 0; i < related.length; i++) { for (var i = 0; i < related.length; i++) {
var icon= document.createElement("image"); var icon= document.createElement("image");
icon.className = "zotero-box-icon";
var type = Zotero.ItemTypes.getName(related[i].itemTypeID); var type = Zotero.ItemTypes.getName(related[i].itemTypeID);
if (type=='attachment') if (type=='attachment')
{ {
@ -132,6 +133,7 @@
icon.setAttribute('src','chrome://zotero/skin/treeitem-' + type + '.png'); icon.setAttribute('src','chrome://zotero/skin/treeitem-' + type + '.png');
var label = document.createElement("label"); var label = document.createElement("label");
label.className = "zotero-box-label";
label.setAttribute('value', related[i].getDisplayTitle()); label.setAttribute('value', related[i].getDisplayTitle());
label.setAttribute('crop','end'); label.setAttribute('crop','end');
label.setAttribute('flex','1'); label.setAttribute('flex','1');
@ -284,7 +286,7 @@
</method> </method>
</implementation> </implementation>
<content> <content>
<xul:vbox xbl:inherits="flex"> <xul:vbox xbl:inherits="flex" class="zotero-box">
<xul:hbox align="center"> <xul:hbox align="center">
<xul:label id="seeAlsoNum"/> <xul:label id="seeAlsoNum"/>
<xul:button id="addButton" label="&zotero.item.add;" oncommand="this.parentNode.parentNode.parentNode.add();" hidden="true"/> <xul:button id="addButton" label="&zotero.item.add;" oncommand="this.parentNode.parentNode.parentNode.add();" hidden="true"/>

View File

@ -30,6 +30,10 @@
xmlns:xbl="http://www.mozilla.org/xbl" xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="tags-box"> <binding id="tags-box">
<resources>
<stylesheet src="chrome://zotero/skin/bindings/tagsbox.css"/>
</resources>
<implementation> <implementation>
<field name="clickHandler"/> <field name="clickHandler"/>
<field name="_tagColors"/> <field name="_tagColors"/>
@ -169,6 +173,7 @@
} }
var icon = document.createElement("image"); var icon = document.createElement("image");
icon.className = "zotero-box-icon";
var iconFile = 'tag'; var iconFile = 'tag';
if (type == 0) { if (type == 0) {
icon.setAttribute('tooltiptext', Zotero.getString('pane.item.tags.icon.user')); icon.setAttribute('tooltiptext', Zotero.getString('pane.item.tags.icon.user'));
@ -183,6 +188,7 @@
icon.setAttribute('onclick','if (this.nextSibling.inputField){ this.nextSibling.inputField.blur() }'); icon.setAttribute('onclick','if (this.nextSibling.inputField){ this.nextSibling.inputField.blur() }');
var label = this.createValueElement(name, tabindex); var label = this.createValueElement(name, tabindex);
label.className = "zotero-box-label";
if (this.editable) { if (this.editable) {
var remove = document.createElement("label"); var remove = document.createElement("label");
@ -759,12 +765,11 @@
</method> </method>
</implementation> </implementation>
<content> <content>
<xul:scrollbox xbl:inherits="flex" orient="vertical" style="overflow:auto"> <xul:scrollbox xbl:inherits="flex" orient="vertical" style="overflow:auto" class="zotero-box">
<xul:hbox align="center"> <xul:hbox align="center">
<xul:label id="tagsNum"/> <xul:label id="tagsNum"/>
<xul:button id="addButton" label="&zotero.item.add;" oncommand="document.getBindingParent(this).new();" hidden="true"/> <xul:button id="addButton" label="&zotero.item.add;" oncommand="document.getBindingParent(this).new();" hidden="true"/>
</xul:hbox> </xul:hbox>
<xul:separator class="thin"/>
<xul:grid> <xul:grid>
<xul:columns> <xul:columns>
<xul:column/> <xul:column/>

View File

@ -101,9 +101,11 @@ var ZoteroItemPane = new function() {
let id = notes[i].id; let id = notes[i].id;
var icon = document.createElement('image'); var icon = document.createElement('image');
icon.className = "zotero-box-icon";
icon.setAttribute('src','chrome://zotero/skin/treeitem-note.png'); icon.setAttribute('src','chrome://zotero/skin/treeitem-note.png');
var label = document.createElement('label'); var label = document.createElement('label');
label.className = "zotero-box-label";
var title = Zotero.Notes.noteToTitle(notes[i].getNote()); var title = Zotero.Notes.noteToTitle(notes[i].getNote());
title = title ? title : Zotero.getString('pane.item.notes.untitled'); title = title ? title : Zotero.getString('pane.item.notes.untitled');
label.setAttribute('value', title); label.setAttribute('value', title);

View File

@ -63,7 +63,7 @@
</tabpanel> </tabpanel>
<tabpanel flex="1" orient="vertical"> <tabpanel flex="1" orient="vertical">
<vbox flex="1"> <vbox flex="1" class="zotero-box">
<hbox align="center"> <hbox align="center">
<label id="zotero-editpane-notes-label"/> <label id="zotero-editpane-notes-label"/>
<button id="zotero-editpane-notes-add" label="&zotero.item.add;" oncommand="ZoteroItemPane.addNote(event.shiftKey);"/> <button id="zotero-editpane-notes-add" label="&zotero.item.add;" oncommand="ZoteroItemPane.addNote(event.shiftKey);"/>

View File

@ -72,7 +72,7 @@ row > label:first-child
{ {
text-align: right; text-align: right;
font-weight: bold; font-weight: bold;
-moz-margin-start: 5px !important; -moz-margin-start: 3px !important;
-moz-margin-end: 0 !important; -moz-margin-end: 0 !important;
width: 62px; width: 62px;
text-align: right; text-align: right;

View File

@ -502,4 +502,18 @@
{ {
visibility: visible !important; visibility: visible !important;
display: inherit !important; display: inherit !important;
}
.zotero-box {
margin-left: 5px;
}
.zotero-box-icon {
width: 16px;
height: 16px;
}
.zotero-box-label {
margin-left: 3px !important;
} }