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);
for (var i = 0; i < related.length; i++) {
var icon= document.createElement("image");
icon.className = "zotero-box-icon";
var type = Zotero.ItemTypes.getName(related[i].itemTypeID);
if (type=='attachment')
{
@ -132,6 +133,7 @@
icon.setAttribute('src','chrome://zotero/skin/treeitem-' + type + '.png');
var label = document.createElement("label");
label.className = "zotero-box-label";
label.setAttribute('value', related[i].getDisplayTitle());
label.setAttribute('crop','end');
label.setAttribute('flex','1');
@ -284,7 +286,7 @@
</method>
</implementation>
<content>
<xul:vbox xbl:inherits="flex">
<xul:vbox xbl:inherits="flex" class="zotero-box">
<xul:hbox align="center">
<xul:label id="seeAlsoNum"/>
<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:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="tags-box">
<resources>
<stylesheet src="chrome://zotero/skin/bindings/tagsbox.css"/>
</resources>
<implementation>
<field name="clickHandler"/>
<field name="_tagColors"/>
@ -169,6 +173,7 @@
}
var icon = document.createElement("image");
icon.className = "zotero-box-icon";
var iconFile = 'tag';
if (type == 0) {
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() }');
var label = this.createValueElement(name, tabindex);
label.className = "zotero-box-label";
if (this.editable) {
var remove = document.createElement("label");
@ -759,12 +765,11 @@
</method>
</implementation>
<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:label id="tagsNum"/>
<xul:button id="addButton" label="&zotero.item.add;" oncommand="document.getBindingParent(this).new();" hidden="true"/>
</xul:hbox>
<xul:separator class="thin"/>
<xul:grid>
<xul:columns>
<xul:column/>

View file

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

View file

@ -63,7 +63,7 @@
</tabpanel>
<tabpanel flex="1" orient="vertical">
<vbox flex="1">
<vbox flex="1" class="zotero-box">
<hbox align="center">
<label id="zotero-editpane-notes-label"/>
<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;
font-weight: bold;
-moz-margin-start: 5px !important;
-moz-margin-start: 3px !important;
-moz-margin-end: 0 !important;
width: 62px;
text-align: right;

View file

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