diff --git a/mozilla/editor/ui/dialogs/content/EdAdvancedEdit.xul b/mozilla/editor/ui/dialogs/content/EdAdvancedEdit.xul index 21339f6b806..c8a79874521 100644 --- a/mozilla/editor/ui/dialogs/content/EdAdvancedEdit.xul +++ b/mozilla/editor/ui/dialogs/content/EdAdvancedEdit.xul @@ -87,15 +87,17 @@ class="AttributesTree inset" flex="1" context="attlistPopup"> - - + + + + - + @@ -116,15 +118,17 @@ - - + + + + - + @@ -145,15 +149,17 @@ - - + + + + - + diff --git a/mozilla/editor/ui/dialogs/content/EdDialogCommon.js b/mozilla/editor/ui/dialogs/content/EdDialogCommon.js index 1a39d24bc64..e7d73fbc99a 100644 --- a/mozilla/editor/ui/dialogs/content/EdDialogCommon.js +++ b/mozilla/editor/ui/dialogs/content/EdDialogCommon.js @@ -318,7 +318,7 @@ function InitPixelOrPercentMenulist(elementForAtt, elementInDoc, attribute, menu ClearMenulist(menulist); pixelItem = AppendStringToMenulist(menulist, GetString("Pixels")); percentItem = AppendStringToMenulist(menulist, GetAppropriatePercentString(elementForAtt, elementInDoc)); - +//dump("**** InitPixelOrPercentMenulist: pixelItem="+pixelItem+", percentItem="+percentItem+", menulistID="+menulistID+"\n"); // Search for a "%" character percentIndex = size.search(/%/); if (percentIndex > 0) @@ -411,6 +411,7 @@ function ClearMenulist(menulist) /* These help using a for simple lists Assumes this simple structure: + @@ -424,14 +425,23 @@ function AppendStringToTreelistById(tree, stringID) function AppendStringToTreelist(tree, string) { +dump("AppendStringToTreelist: string="+string+"\n"); if (tree) { - var treechildren = tree.firstChild; + var treecols = tree.firstChild; + if (!treecols) + { + dump("Bad XUL: Must have as first child\n"); + } + var treechildren = treecols.nextSibling; if (!treechildren) { treechildren = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treechildren"); if (treechildren) + { + treechildren.setAttribute("flex","1"); tree.appendChild(treechildren); + } else { dump("Failed to create \n"); @@ -461,9 +471,17 @@ function ClearTreelist(tree) if (tree) { tree.clearItemSelection(); - while (tree.firstChild) - tree.removeChild(tree.firstChild); - + // Skip over the first child + if (tree.firstChild) + { + nextChild = tree.firstChild.nextSibling; + while (nextChild) + { + var nextTmp = nextChild.nextSibling; + tree.removeChild(nextChild); + nextChild = nextTmp; + } + } // Count list items tree.setAttribute("length", 0); } @@ -471,8 +489,13 @@ function ClearTreelist(tree) function GetSelectedTreelistAttribute(tree, attr) { - if (tree) + if (tree && tree.selectedItems && + tree.selectedItems[0] && + tree.selectedItems[0].firstChild && + tree.selectedItems[0].firstChild.firstChild) + { return tree.selectedItems[0].firstChild.firstChild.getAttribute(attr); + } return ""; } diff --git a/mozilla/editor/ui/dialogs/content/EdDictionary.xul b/mozilla/editor/ui/dialogs/content/EdDictionary.xul index 25a1da24fdd..efd181c04cc 100644 --- a/mozilla/editor/ui/dialogs/content/EdDictionary.xul +++ b/mozilla/editor/ui/dialogs/content/EdDictionary.xul @@ -52,7 +52,9 @@ - + + +