From dbd15e56e6cb1c8f039893aa85fed12ae2339dd3 Mon Sep 17 00:00:00 2001 From: "slamm%netscape.com" Date: Thu, 27 Jul 2006 14:47:25 +0000 Subject: [PATCH] Fix for CustomizePanel button. It now brings up a chromeless browser. Fix for 21061. git-svn-id: svn://10.0.0.236/trunk@204226 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/suite/common/sidebar/customize.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/mozilla/suite/common/sidebar/customize.js b/mozilla/suite/common/sidebar/customize.js index 4f0a4ba758f..436cdf3c830 100644 --- a/mozilla/suite/common/sidebar/customize.js +++ b/mozilla/suite/common/sidebar/customize.js @@ -212,19 +212,17 @@ function enableButtons() { function CustomizePanel() { var tree = document.getElementById('selected-panels'); - var index = tree.selectedIndex; + var numSelected = tree.selectedItems.length; - if (index != -1) { - var title = tree.childNodes.item(index).getAttribute('title'); - var customize_URL = tree.childNodes.item(index).getAttribute('customize'); + if (numSelected == 1) { + var selectedNode = tree.selectedItems[0]; + var customize_url = selectedNode.getAttribute('customize'); - if (!title || !customize_URL) return; + debug("url = " + customize_url); - var customize = window.open("chrome://sidebar/content/customize-panel.xul", - "_blank", "chrome"); + if (!customize_url) return; - customize.panel_name = title; - customize.panel_customize_URL = customize_URL; + var customize = window.open(customize_url, "_blank", "resizable"); } enableSave(); }