Z7: Fix Add Item by Identifier tests (and rename textbox)

Now only one textbox, so no need to call it 'multiline'
This commit is contained in:
Dan Stillman 2023-04-27 20:45:40 -04:00
parent 2c995c913e
commit 07acfb444a
3 changed files with 6 additions and 6 deletions

View file

@ -174,7 +174,7 @@ var Zotero_Lookup = new function () {
// Ignore context menu
if (event.originalTarget.id != 'zotero-lookup-panel') return;
document.getElementById("zotero-lookup-multiline-textbox").value = "";
document.getElementById("zotero-lookup-textbox").value = "";
Zotero_Lookup.setShowProgress(false);
// Revert to single-line when closing
@ -228,7 +228,7 @@ var Zotero_Lookup = new function () {
this.setMultiline = function (on) {
var mlTxtBox = document.getElementById("zotero-lookup-multiline-textbox");
var mlTxtBox = document.getElementById("zotero-lookup-textbox");
var mlButtons = document.getElementById('zotero-lookup-buttons');
mlTxtBox.rows = on ? 5 : 1;
@ -248,7 +248,7 @@ var Zotero_Lookup = new function () {
// In Firefox 52.6.0, progressmeters burn CPU at idle on Linux when undetermined, even
// if they're hidden. (Being hidden is enough on macOS.)
document.getElementById("zotero-lookup-multiline-textbox").disabled = !!on;
document.getElementById("zotero-lookup-textbox").disabled = !!on;
var p = document.getElementById("zotero-lookup-multiline-progress");
if (on) {
p.removeAttribute('value');

View file

@ -775,7 +775,7 @@
<label>&zotero.lookup.description;</label>
<vbox id="zotero-lookup-multiline">
<html:textarea
id="zotero-lookup-multiline-textbox"
id="zotero-lookup-textbox"
onkeypress="Zotero_Lookup.onKeyPress(event, this)"
oninput="Zotero_Lookup.onInput(event, this)"
rows="1"
@ -783,7 +783,7 @@
<hbox id="zotero-lookup-buttons" align="start" hidden="true">
<button
align="start"
oncommand="Zotero_Lookup.accept(document.getElementById('zotero-lookup-multiline-textbox'))"
oncommand="Zotero_Lookup.accept(document.getElementById('zotero-lookup-textbox'))"
label="&zotero.lookup.button.search;"/>
<html:progress id="zotero-lookup-multiline-progress" value="0" hidden="true" style="-moz-box-flex: 1"/>
</hbox>

View file

@ -291,7 +291,7 @@
list-style-image: url('chrome://zotero/skin/toolbar-lookup.png');
}
#zotero-lookup-textbox, #zotero-lookup-multiline-textbox {
#zotero-lookup-textbox {
margin: 4px;
padding: 2px;
-moz-box-flex: 1;