bug 367157 - Reworks XUL so individual migrators can be unchecked in the wizard. Patch by Sebastian Schwieger <sebastian.schwieger@googlemail.com>, r1=lilmatt, r2=jminta

This commit is contained in:
mattwillis%gmail.com 2007-02-08 20:29:25 +00:00
parent cdc2bbd5e3
commit 9008c81398
2 changed files with 5 additions and 16 deletions

View File

@ -74,16 +74,9 @@ var gMigrateWizard = {
LOG("migrators: " + window.arguments.length); LOG("migrators: " + window.arguments.length);
for each (var migrator in window.arguments[0]) { for each (var migrator in window.arguments[0]) {
var listItem = document.createElement("listitem"); var listItem = document.createElement("listitem");
var checkCell = document.createElement("listcell"); listItem.setAttribute("type", "checkbox");
checkCell.setAttribute("type", "checkbox"); listItem.setAttribute("checked", true);
listItem.setAttribute("label", migrator.title);
checkCell.setAttribute("checked", true);
listItem.appendChild(checkCell);
var nameCell = document.createElement("listcell");
nameCell.setAttribute("label", migrator.title);
listItem.appendChild(nameCell);
listItem.migrator = migrator; listItem.migrator = migrator;
listbox.appendChild(listItem); listbox.appendChild(listItem);
} }
@ -100,8 +93,8 @@ var gMigrateWizard = {
// Get all the checked migrators into an array // Get all the checked migrators into an array
var listbox = document.getElementById("datasource-list"); var listbox = document.getElementById("datasource-list");
for (var i = listbox.childNodes.length-1; i >= 0; i--) { for (var i = listbox.childNodes.length-1; i >= 0; i--) {
LOG("Checking child node: " + listbox.childNodes[i].firstChild); LOG("Checking child node: " + listbox.childNodes[i]);
if (listbox.childNodes[i].firstChild.getAttribute("checked")) { if (listbox.childNodes[i].getAttribute("checked")) {
LOG("Adding migrator"); LOG("Adding migrator");
migrators.push(listbox.childNodes[i].migrator); migrators.push(listbox.childNodes[i].migrator);
} }

View File

@ -64,10 +64,6 @@
label="&migration.welcome;"> label="&migration.welcome;">
<description id="wizard-desc">&migration.list.description;</description> <description id="wizard-desc">&migration.list.description;</description>
<listbox id="datasource-list" flex="1"> <listbox id="datasource-list" flex="1">
<listcols>
<listcol/>
<listcol flex="1"/>
</listcols>
</listbox> </listbox>
</wizardpage> </wizardpage>