mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Dialog looks real good now.
This commit is contained in:
parent
7437096b69
commit
4795ff232f
@ -32,6 +32,26 @@ function buildDialog()
|
||||
var newToolbar = toolbar.cloneNode(true);
|
||||
cloneToolbarBox.appendChild(newToolbar);
|
||||
|
||||
// Make sure all buttons look enabled (and that textboxes are disabled).
|
||||
var toolbarItem = newToolbar.firstChild;
|
||||
while (toolbarItem) {
|
||||
toolbarItem.removeAttribute("observes");
|
||||
toolbarItem.removeAttribute("disabled");
|
||||
toolbarItem.removeAttribute("type");
|
||||
|
||||
if (toolbarItem.localName == "toolbaritem" &&
|
||||
toolbarItem.firstChild) {
|
||||
toolbarItem.firstChild.removeAttribute("observes");
|
||||
if (toolbarItem.firstChild.localName == "textbox")
|
||||
toolbarItem.firstChild.setAttribute("disabled", "true");
|
||||
else
|
||||
toolbarItem.firstChild.removeAttribute("disabled");
|
||||
}
|
||||
|
||||
toolbarItem = toolbarItem.nextSibling;
|
||||
}
|
||||
|
||||
|
||||
// Now build up a palette of items.
|
||||
var currentRow = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
||||
"hbox");
|
||||
@ -43,6 +63,18 @@ function buildDialog()
|
||||
var node = toolbar.palette.firstChild;
|
||||
while (node) {
|
||||
var paletteItem = node.cloneNode(true);
|
||||
paletteItem.removeAttribute("observes");
|
||||
paletteItem.removeAttribute("disabled");
|
||||
|
||||
if (paletteItem.localName == "toolbaritem" &&
|
||||
paletteItem.firstChild) {
|
||||
paletteItem.firstChild.removeAttribute("observes");
|
||||
if (paletteItem.firstChild.localName == "textbox")
|
||||
paletteItem.firstChild.setAttribute("disabled", "true");
|
||||
else
|
||||
paletteItem.firstChild.removeAttribute("disabled");
|
||||
}
|
||||
|
||||
if (rowSlot == rowMax) {
|
||||
// Append the old row.
|
||||
paletteBox.appendChild(currentRow);
|
||||
|
Loading…
Reference in New Issue
Block a user