- show title in separate notes window

- fix issues entering new tags into tags popup
- add back left/right tinymce borders on non-OS X
This commit is contained in:
Simon Kornblith 2011-02-13 08:50:24 +00:00
parent c4b5730486
commit d8966467dc
5 changed files with 85 additions and 82 deletions

View File

@ -1,4 +1,8 @@
row > label:first-child row > label:first-child
{ {
color: #7f7f7f; color: #7f7f7f;
}
textbox[type="styled"] {
border-style: none;
} }

View File

@ -102,16 +102,7 @@
<property name="parent" onget="return this._parent;"> <property name="parent" onget="return this._parent;">
<setter> <setter>
<![CDATA[ <![CDATA[
this._parent = val; this._parent = this._id('links').parent = val;
var citeLabel = this._id('citeLabel');
if (citeLabel.firstChild) {
citeLabel.removeChild(citeLabel.firstChild);
}
if (this.parent && !this.getAttribute('notitle') == '1') {
citeLabel.appendChild(document.createTextNode(this.parent.getDisplayTitle(true)));
}
]]> ]]>
</setter> </setter>
</property> </property>
@ -137,10 +128,14 @@
<property name="linksOnTop"> <property name="linksOnTop">
<setter> <setter>
<![CDATA[ <![CDATA[
var links = this._id('linksbox'); if(val) {
var parent = links.parentNode; var links = this._id('linksbox');
parent.removeChild(links); var parent = links.parentNode;
parent.insertBefore(links, this._id(val ? 'citeLabel' : 'goButton')); var sib = links.nextSibling;
while(parent.firstChild !== links) {
parent.insertBefore(parent.removeChild(parent.firstChild), sib);
}
}
]]> ]]>
</setter> </setter>
</property> </property>
@ -160,7 +155,6 @@
<![CDATA[ <![CDATA[
Zotero.debug('Refreshing note editor'); Zotero.debug('Refreshing note editor');
var parentbox = this._id('citeLabel');
var textbox = this._id('noteField'); var textbox = this._id('noteField');
var textboxReadOnly = this._id('noteFieldReadOnly'); var textboxReadOnly = this._id('noteFieldReadOnly');
var button = this._id('goButton'); var button = this._id('goButton');
@ -186,14 +180,6 @@
this._id('linksbox').hidden = !(this.displayTags && this.displayRelated); this._id('linksbox').hidden = !(this.displayTags && this.displayRelated);
if (this.parentClickHandler) {
parentbox.setAttribute('onclick',
'document.getBindingParent(this).parentClickHandler()');
}
else {
parentbox.removeAttribute('onclick');
}
if (this.keyDownHandler) { if (this.keyDownHandler) {
textbox.setAttribute('onkeydown', textbox.setAttribute('onkeydown',
'document.getBindingParent(this).handleKeyDown(event)'); 'document.getBindingParent(this).handleKeyDown(event)');
@ -305,43 +291,6 @@
</body> </body>
</method> </method>
<method name="selectParent">
<body>
<![CDATA[
if (!this.item || !this.item.id) {
return;
}
if (document.getElementById('zotero-pane')) {
var zp = ZoteroPane;
}
else {
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var lastWin = wm.getMostRecentWindow("navigator:browser");
if (!lastWin) {
window.open();
var newWindow = wm.getMostRecentWindow("navigator:browser");
var b = newWindow.getBrowser();
return;
}
if (lastWin.ZoteroOverlay) {
lastWin.ZoteroOverlay.toggleDisplay(true);
}
var zp = lastWin.ZoteroPane;
}
var parentID = this.item.getSource();
zp.clearQuicksearch();
zp.selectItem(parentID);
]]>
</body>
</method>
<method name="disableUndo"> <method name="disableUndo">
<body> <body>
<![CDATA[ <![CDATA[
@ -379,13 +328,12 @@
<content> <content>
<xul:vbox xbl:inherits="flex"> <xul:vbox xbl:inherits="flex">
<xul:label id="citeLabel" hidden="true"/>
<xul:textbox id="noteField" type="styled" mode="note" <xul:textbox id="noteField" type="styled" mode="note"
timeout="1000" flex="1" hidden="true"/> timeout="1000" flex="1" hidden="true"/>
<xul:textbox id="noteFieldReadOnly" type="styled" mode="note" <xul:textbox id="noteFieldReadOnly" type="styled" mode="note"
readonly="true" flex="1" hidden="true"/> readonly="true" flex="1" hidden="true"/>
<xul:hbox id="linksbox" hidden="true"> <xul:hbox id="linksbox" hidden="true">
<xul:linksbox id="links" flex="1"/> <xul:linksbox id="links" flex="1" xbl:inherits="notitle"/>
</xul:hbox> </xul:hbox>
<xul:button id="goButton" hidden="true"/> <xul:button id="goButton" hidden="true"/>
</xul:vbox> </xul:vbox>
@ -394,7 +342,7 @@
<binding id="links-box"> <binding id="links-box">
<implementation> <implementation>
<field name="itemRef"/> <field name="itemRef"/>
<property name="item" onget="return this.itemRef;"> <property name="item" onget="return this.itemRef;">
<setter> <setter>
@ -416,19 +364,32 @@
]]> ]]>
</setter> </setter>
</property> </property>
<field name="_parent"/>
<property name="parent" onget="return this._parent;">
<setter>
<![CDATA[
this._parent = val;
var parentText = this.id('parentText');
if (parentText.firstChild) {
parentText.removeChild(parentText.firstChild);
}
if (this._parent && this.getAttribute('notitle') != '1') {
this.id('parent-row').hidden = undefined;
this.id('parentLabel').value = Zotero.getString('pane.item.parentItem');
parentText.appendChild(document.createTextNode(this._parent.getDisplayTitle(true)));
}
]]>
</setter>
</property>
<method name="tagsClick"> <method name="tagsClick">
<body> <body>
<![CDATA[ <![CDATA[
this.id('tags').reload(); this.id('tags').reload();
if (this.id('tagsPopup').openPopupAtScreen) { var x = this.boxObject.screenX;
var x = this.boxObject.screenX; var y = this.boxObject.screenY;
var y = this.boxObject.screenY; this.id('tagsPopup').openPopupAtScreen(x, y, false);
this.id('tagsPopup').openPopupAtScreen(x, y, false);
}
// Deprecated method for Firefox 2
else {
this.id('tagsPopup').showPopup(this.id('tagsLabel'), -1, -1, 'popup');
}
]]> ]]>
</body> </body>
</method> </method>
@ -452,15 +413,9 @@
<![CDATA[ <![CDATA[
var relatedList = this.item.relatedItemsBidirectional; var relatedList = this.item.relatedItemsBidirectional;
if (relatedList.length > 0) { if (relatedList.length > 0) {
if (this.id('seeAlsoPopup').openPopupAtScreen) { var x = this.boxObject.screenX;
var x = this.boxObject.screenX; var y = this.boxObject.screenY;
var y = this.boxObject.screenY; this.id('seeAlsoPopup').openPopupAtScreen(x, y, false);
this.id('seeAlsoPopup').openPopupAtScreen(x, y, false);
}
// Deprecated method for Firefox 2
else {
this.id('seeAlsoPopup').showPopup(this.id('seeAlsoLabel'), -1, -1, 'popup');
}
} }
else { else {
this.id('seeAlso').add(); this.id('seeAlso').add();
@ -482,6 +437,39 @@
]]> ]]>
</body> </body>
</method> </method>
<method name="parentClick">
<body>
<![CDATA[
if (!this.item || !this.item.id) {
return;
}
if (document.getElementById('zotero-pane')) {
var zp = ZoteroPane;
}
else {
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var lastWin = wm.getMostRecentWindow("navigator:browser");
if (!lastWin) {
var lastWin = window.open();
}
if (lastWin.ZoteroOverlay && !lastWin.ZoteroPane.isShowing()) {
lastWin.ZoteroOverlay.toggleDisplay(true);
}
var zp = lastWin.ZoteroPane;
}
var parentID = this.item.getSource();
zp.clearQuicksearch();
zp.selectItem(parentID);
]]>
</body>
</method>
<method name="id"> <method name="id">
<parameter name="id"/> <parameter name="id"/>
<body> <body>
@ -499,6 +487,10 @@
<xul:column flex="1"/> <xul:column flex="1"/>
</xul:columns> </xul:columns>
<xul:rows> <xul:rows>
<xul:row id="parent-row" hidden="true">
<xul:label id="parentLabel"/>
<xul:label id="parentText" class="zotero-clicky" crop="end" onclick="document.getBindingParent(this).parentClick();"/>
</xul:row>
<xul:row> <xul:row>
<xul:label id="seeAlsoLabel"/> <xul:label id="seeAlsoLabel"/>
<xul:label id="seeAlsoClick" class="zotero-clicky" crop="end" onclick="document.getBindingParent(this).seeAlsoClick();"/> <xul:label id="seeAlsoClick" class="zotero-clicky" crop="end" onclick="document.getBindingParent(this).seeAlsoClick();"/>

View File

@ -421,7 +421,7 @@
</tabbox> </tabbox>
<!-- Note info pane --> <!-- Note info pane -->
<groupbox id="zotero-view-note" flex="1"> <groupbox id="zotero-view-note" flex="1">
<zoteronoteeditor id="zotero-note-editor" flex="1"/> <zoteronoteeditor id="zotero-note-editor" flex="1" notitle="1"/>
<button id="zotero-view-note-button" label="&zotero.notes.separate;" oncommand="ZoteroPane.openNoteWindow(this.getAttribute('noteID')); if(this.hasAttribute('sourceID')) ZoteroPane.selectItem(this.getAttribute('sourceID'));"/> <button id="zotero-view-note-button" label="&zotero.notes.separate;" oncommand="ZoteroPane.openNoteWindow(this.getAttribute('noteID')); if(this.hasAttribute('sourceID')) ZoteroPane.selectItem(this.getAttribute('sourceID'));"/>
</groupbox> </groupbox>
<!-- Attachment info pane --> <!-- Attachment info pane -->

View File

@ -200,6 +200,7 @@ pane.item.related = Related:
pane.item.related.count.zero = %S related: pane.item.related.count.zero = %S related:
pane.item.related.count.singular = %S related: pane.item.related.count.singular = %S related:
pane.item.related.count.plural = %S related: pane.item.related.count.plural = %S related:
pane.item.parentItem = Parent Item:
noteEditor.editNote = Edit Note noteEditor.editNote = Edit Note

View File

@ -49,4 +49,10 @@ vbox > hbox:first-child > linksbox {
vbox > hbox:not(:first-child) > linksbox { vbox > hbox:not(:first-child) > linksbox {
margin-top: 4px; margin-top: 4px;
}
textbox[type="styled"] {
border-width: 0 1px 0 1px;
border-style: solid;
border-color: rgb(204, 204, 204);
} }