Fix sizing problems in Create Parent dialog
Use a regular paragraph for the intro text rather than an input placeholder, which gets cut off it's too long, and allow the window to be sized dynamically based on the title and localized strings. Fixes #4109
This commit is contained in:
parent
249c5b8d12
commit
85a15175ae
5 changed files with 20 additions and 9 deletions
|
@ -43,13 +43,13 @@ function CreateParent({ loading, item, toggleAccept }) {
|
|||
|
||||
return (
|
||||
<div className="create-parent-container">
|
||||
<span className="title">
|
||||
<div className="title">
|
||||
{ item.attachmentFilename }
|
||||
</span>
|
||||
</div>
|
||||
<p className="intro" data-l10n-id="create-parent-intro"/>
|
||||
<div className="body">
|
||||
<input
|
||||
id="parent-item-identifier"
|
||||
placeholder={ Zotero.getString('createParent.prompt') }
|
||||
size="50"
|
||||
disabled={ loading }
|
||||
onChange={ handleInput }
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
buttondisabledaccept="true"
|
||||
buttonlabelextra2="&zotero.createParent.button.manual;"
|
||||
buttonlabelaccept="&zotero.createParent.title;"
|
||||
style="padding:20px 15px;width:400px;">
|
||||
style="padding: 20px 15px; min-width: 500px">
|
||||
|
||||
<script src="chrome://global/content/globalOverlay.js"/>
|
||||
<script src="chrome://global/content/editMenuOverlay.js"/>
|
||||
|
@ -33,7 +33,9 @@
|
|||
<script src="lookup.js"/>
|
||||
<script src="createParentDialog.js"/>
|
||||
<script src="components/createParent/createParent.js"/>
|
||||
|
||||
|
||||
<html:link rel="localization" href="zotero.ftl"/>
|
||||
|
||||
<vbox id="zotero-create-parent-container" flex="1">
|
||||
<html:div id="create-parent" />
|
||||
</vbox>
|
||||
|
|
|
@ -126,6 +126,8 @@ itembox-button-options =
|
|||
itembox-button-merge =
|
||||
.aria-label = Select version of { $field } field
|
||||
|
||||
create-parent-intro = Enter a DOI, ISBN, PMID, arXiv ID, or ADS Bibcode to identify this file:
|
||||
|
||||
reader-use-dark-mode-for-content =
|
||||
.label = Use Dark Mode for Content
|
||||
|
||||
|
|
|
@ -1221,8 +1221,6 @@ lookup.failure.description = Zotero could not find a record for the specified
|
|||
lookup.failureToID.description = Zotero could not find any identifiers in your input. Please verify your input and try again.
|
||||
lookup.failureTooMany.description = Too many identifiers. Please enter one identifier and try again.
|
||||
|
||||
createParent.prompt = Enter a DOI, ISBN, PMID, arXiv ID, or ADS Bibcode to identify this file
|
||||
|
||||
locate.online.label = View Online
|
||||
locate.pdf.label = Open PDF
|
||||
locate.pdfNewWindow.label = Open PDF in New Window
|
||||
|
|
|
@ -2,16 +2,25 @@
|
|||
.title {
|
||||
font-size: 1.4em;
|
||||
font-weight: 700;
|
||||
// Let the dialog get a little wider if the title is long
|
||||
max-width: 550px;
|
||||
}
|
||||
|
||||
|
||||
.intro {
|
||||
// Text is added asynchonously, so set a height for dialog auto-sizing
|
||||
min-height: 1em;
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
||||
.body {
|
||||
margin: 1em 0;
|
||||
position: relative;
|
||||
display: flex;
|
||||
margin-bottom: 1em;
|
||||
|
||||
input {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.downloadProgress {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue