Merge commit '0d0a6f38b28618ab9311d886ba93df84af52ba90'; commit 'c7b4c41aee68c6a63df0bd9746e44087c33d7724'

This commit is contained in:
Simon Kornblith 2012-02-18 13:41:52 -05:00
commit 7a2e402d0d
2 changed files with 11 additions and 0 deletions

View file

@ -110,6 +110,7 @@ var Zotero_QuickFormat = new function () {
panelLocatorLabel = document.getElementById("locator-label");
panelLocator = document.getElementById("locator");
panelInfo = document.getElementById("citation-properties-info");
panelLibraryLink = document.getElementById("citation-properties-library-link");
// Don't need to set noautohide dynamically on these platforms, so do it now
if(Zotero.isMac || Zotero.isWin) {
@ -904,11 +905,20 @@ var Zotero_QuickFormat = new function () {
panelLocator.value = target.citationItem["locator"] ? target.citationItem["locator"] : "";
panelSuppressAuthor.checked = !!target.citationItem["suppress-author"];
Zotero.Cite.getItem(panelRefersToBubble.citationItem.id).key;
var item = Zotero.Cite.getItem(target.citationItem.id);
document.getElementById("citation-properties-title").textContent = item.getDisplayTitle();
while(panelInfo.hasChildNodes()) panelInfo.removeChild(panelInfo.firstChild);
_buildItemDescription(item, panelInfo);
var libraryName = item.libraryID ? Zotero.Libraries.getName(item.libraryID)
: Zotero.getString('pane.collections.library');
var libraryLink = document.getElementById("citation-properties-library-link");
//TODO: Localize "Open in "
libraryLink.textContent ="Open in "+libraryName;
libraryLink.onclick=function() {window.open('zotero://select/item/'+(item.libraryID ? item.libraryID : 0)+'_'+item.key)};
target.setAttribute("selected", "true");
panel.openPopup(target, "after_start",
target.clientWidth/2, 0, false, false, null);

View file

@ -78,6 +78,7 @@
<vbox flex="1">
<description id="citation-properties-title"/>
<hbox id="citation-properties-info"/>
<label id="citation-properties-library-link" onmouseover="event.target.style.cursor='pointer'" onmouseout="event.target.style.cursor='default'"/>
</vbox>
<grid flex="1">
<columns>