mirror of
https://github.com/zotero/zotero.git
synced 2026-10-10 03:28:10 +00:00
fix spacing and info in details popup
This commit is contained in:
parent
2385e30eaa
commit
392d7e90f6
2 changed files with 16 additions and 3 deletions
|
|
@ -99,14 +99,19 @@ export class CitationDialogPopupsHandler {
|
|||
popup.style.top = `${bubbleRect.bottom + 10}px`;
|
||||
|
||||
this._getNode("#itemDetails .show").hidden = !this.bubbleItem.item.id;
|
||||
let topLevelItem = this.bubbleItem.item.topLevelItem;
|
||||
// For notes, show the note's own title and icon rather than walking
|
||||
// up to the parent item.
|
||||
let displayItem = this.bubbleItem.item;
|
||||
if (!displayItem.isNote()) {
|
||||
displayItem = displayItem.topLevelItem;
|
||||
}
|
||||
|
||||
// Add header and fill inputs with their values
|
||||
let description = itemDescription;
|
||||
this._getNode("#itemDetails").querySelector(".description")?.remove();
|
||||
this._getNode("#itemTitle").textContent = topLevelItem.getDisplayTitle();
|
||||
this._getNode("#itemTitle").textContent = displayItem.getDisplayTitle();
|
||||
this._getNode("#itemTitle").after(description);
|
||||
let dataTypeLabel = topLevelItem.getItemTypeIconName(true);
|
||||
let dataTypeLabel = displayItem.getItemTypeIconName(true);
|
||||
this._getNode("#itemDetails").querySelector(".icon").setAttribute("data-item-type", dataTypeLabel);
|
||||
|
||||
bubble.classList.add("showingDetails");
|
||||
|
|
|
|||
|
|
@ -978,4 +978,12 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
#itemDetails .popup {
|
||||
.details-header .description {
|
||||
margin-top: 4px;
|
||||
}
|
||||
.buttons {
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue