fx115: Fix Scaffold richlistboxes and load dialog sizing (#3968)
This commit is contained in:
parent
14586d72b0
commit
6ebb15778b
5 changed files with 28 additions and 30 deletions
|
@ -84,10 +84,6 @@ var Scaffold_Load = new function () {
|
||||||
listcell.setAttribute('flex', '1');
|
listcell.setAttribute('flex', '1');
|
||||||
listcell.append(translator.label);
|
listcell.append(translator.label);
|
||||||
listitem.appendChild(listcell);
|
listitem.appendChild(listcell);
|
||||||
listcell = document.createXULElement("hbox");
|
|
||||||
listcell.setAttribute('width', '130');
|
|
||||||
listcell.append(translator.creator);
|
|
||||||
listitem.appendChild(listcell);
|
|
||||||
|
|
||||||
listbox.appendChild(listitem);
|
listbox.appendChild(listitem);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,24 +24,20 @@
|
||||||
***** END LICENSE BLOCK *****
|
***** END LICENSE BLOCK *****
|
||||||
-->
|
-->
|
||||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||||
<?xml-stylesheet href="chrome://scaffold/skin/scaffold.css" type="text/css"?>
|
<?xml-stylesheet href="chrome://zotero/skin/scaffold.css" type="text/css"?>
|
||||||
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
|
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
|
||||||
<?xml-stylesheet href="chrome://zotero-platform/content/zotero.css"?>
|
<?xml-stylesheet href="chrome://zotero-platform/content/zotero.css"?>
|
||||||
|
|
||||||
<!DOCTYPE window SYSTEM "chrome://scaffold/locale/scaffold.dtd">
|
<!DOCTYPE window SYSTEM "chrome://scaffold/locale/scaffold.dtd">
|
||||||
<window
|
<window
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
title="&scaffold.load.title;" width="400" height="330"
|
title="&scaffold.load.title;"
|
||||||
onload="Scaffold_Load.onLoad()"
|
onload="Scaffold_Load.onLoad()"
|
||||||
class="zotero-dialog">
|
class="zotero-dialog"
|
||||||
|
style="min-width: 500px;">
|
||||||
<dialog buttons="cancel,accept"
|
<dialog buttons="cancel,accept"
|
||||||
id="scaffold-load">
|
id="scaffold-load">
|
||||||
<script src="load.js"/>
|
<script src="load.js"/>
|
||||||
|
<richlistbox id="listbox" class="theme-listbox"/>
|
||||||
<listheader>
|
|
||||||
<treecol flex="1" label="&scaffold.load.label.label;"/>
|
|
||||||
<treecol width="130" label="&scaffold.load.creator.label;"/>
|
|
||||||
</listheader>
|
|
||||||
<richlistbox id="listbox" class="theme-listbox" flex="1"/>
|
|
||||||
</dialog>
|
</dialog>
|
||||||
</window>
|
</window>
|
||||||
|
|
|
@ -650,7 +650,7 @@ var Scaffold = new function () {
|
||||||
io.translatorProvider = _translatorProvider;
|
io.translatorProvider = _translatorProvider;
|
||||||
io.url = io.rootUrl = _browser.currentURI.spec;
|
io.url = io.rootUrl = _browser.currentURI.spec;
|
||||||
window.openDialog("chrome://scaffold/content/load.xhtml",
|
window.openDialog("chrome://scaffold/content/load.xhtml",
|
||||||
"_blank", "chrome,modal", io);
|
"_blank", "chrome,modal,resizable=no", io);
|
||||||
translator = io.dataOut;
|
translator = io.dataOut;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1759,7 +1759,7 @@ var Scaffold = new function () {
|
||||||
let hbox = document.createXULElement('hbox');
|
let hbox = document.createXULElement('hbox');
|
||||||
hbox.append(elem);
|
hbox.append(elem);
|
||||||
if (flex !== undefined) hbox.setAttribute('flex', flex);
|
if (flex !== undefined) hbox.setAttribute('flex', flex);
|
||||||
if (width !== undefined) hbox.setAttribute('width', width);
|
if (width !== undefined) hbox.style.width = width + 'px';
|
||||||
return hbox;
|
return hbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1783,7 +1783,7 @@ var Scaffold = new function () {
|
||||||
let oldStatuses = {};
|
let oldStatuses = {};
|
||||||
for (let i = 0; i < count; i++) {
|
for (let i = 0; i < count; i++) {
|
||||||
let item = listBox.getItemAtIndex(i);
|
let item = listBox.getItemAtIndex(i);
|
||||||
let [, statusCell] = item.firstElementChild.children;
|
let [, statusCell] = item.children;
|
||||||
oldStatuses[item.dataset.testString] = statusCell.getAttribute('value');
|
oldStatuses[item.dataset.testString] = statusCell.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1798,24 +1798,18 @@ var Scaffold = new function () {
|
||||||
|
|
||||||
item.innerHTML = ''; // clear children/content if reusing
|
item.innerHTML = ''; // clear children/content if reusing
|
||||||
|
|
||||||
let hbox = document.createXULElement('hbox');
|
|
||||||
hbox.setAttribute('flex', 1);
|
|
||||||
hbox.setAttribute('align', 'center');
|
|
||||||
|
|
||||||
let input = document.createXULElement('label');
|
let input = document.createXULElement('label');
|
||||||
input.value = getTestLabel(test);
|
input.append(getTestLabel(test));
|
||||||
hbox.appendChild(wrapWithHBox(input, { flex: 1 }));
|
item.appendChild(wrapWithHBox(input, { flex: 1 }));
|
||||||
|
|
||||||
let status = document.createXULElement('label');
|
let status = document.createXULElement('label');
|
||||||
status.value = oldStatuses[testString] || 'Not run';
|
status.append(oldStatuses[testString] || 'Not run');
|
||||||
hbox.appendChild(wrapWithHBox(status, { width: 150 }));
|
item.appendChild(wrapWithHBox(status, { width: 150 }));
|
||||||
|
|
||||||
let defer = document.createXULElement('checkbox');
|
let defer = document.createXULElement('checkbox');
|
||||||
defer.checked = test.defer;
|
defer.checked = test.defer;
|
||||||
defer.disabled = true;
|
defer.disabled = true;
|
||||||
hbox.appendChild(wrapWithHBox(defer, { width: 30 }));
|
item.appendChild(wrapWithHBox(defer, { width: 30 }));
|
||||||
|
|
||||||
item.appendChild(hbox);
|
|
||||||
|
|
||||||
item.dataset.testString = testString;
|
item.dataset.testString = testString;
|
||||||
item.dataset.testType = test.type;
|
item.dataset.testType = test.type;
|
||||||
|
|
|
@ -61,8 +61,6 @@
|
||||||
<!ENTITY scaffold.metadata.priority.default "100">
|
<!ENTITY scaffold.metadata.priority.default "100">
|
||||||
|
|
||||||
<!ENTITY scaffold.load.title "Open Translator">
|
<!ENTITY scaffold.load.title "Open Translator">
|
||||||
<!ENTITY scaffold.load.label.label "Label">
|
|
||||||
<!ENTITY scaffold.load.creator.label "Creator">
|
|
||||||
|
|
||||||
<!ENTITY scaffold.editor.external.label "Use external editor">
|
<!ENTITY scaffold.editor.external.label "Use external editor">
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,15 @@ tab {
|
||||||
}
|
}
|
||||||
|
|
||||||
richlistbox {
|
richlistbox {
|
||||||
min-width:200px;
|
min-width: 200px;
|
||||||
|
|
||||||
|
richlistitem {
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
> hbox {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#zotero-toolbar toolbarseparator {
|
#zotero-toolbar toolbarseparator {
|
||||||
|
@ -158,3 +166,9 @@ vbox > splitter {
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#scaffold-load {
|
||||||
|
#listbox {
|
||||||
|
height: 300px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue