rem: document.getElementById("TableOrCellGroup").setAttribute("collapsed", "false"); 
add: document.getElementById("TableOrCellGroup").collapsed = false; 
context: function Startup(){   if (!window.arguments[1])  {    dump("EdColorPicker: Missing color object param\n");    return;  }  // window.arguments[1] is object to get initial values and return color data  gColorObj = window.arguments[1];  gColorObj.Cancel = false;  gDialog.ColorPicker      = document.getElementById("ColorPicker");  gDialog.ColorInput       = document.getElementById("ColorInput");  gDialog.LastPickedButton = document.getElementById("LastPickedButton");  gDialog.LastPickedColor  = document.getElementById("LastPickedColor");  gDialog.CellOrTableGroup = document.getElementById("CellOrTableGroup");  gDialog.TableRadio       = document.getElementById("TableRadio");  gDialog.CellRadio        = document.getElementById("CellRadio");  gDialog.ColorSwatch      = document.getElementById("ColorPickerSwatch");  gDialog.Ok               = document.documentElement.getButton("accept");  // The type of color we are setting:   //  text: Text, Link, ActiveLink, VisitedLink,   //  or background: Page, Table, or Cell  if (gColorObj.Type)  {    ColorType = gColorObj.Type;    // Get string for dialog title from passed-in type     //   (note constraint on editor.properties string name)    var prefs = GetPrefs();    var IsCSSPrefChecked = prefs.getBoolPref("editor.use_css");    if (GetCurrentEditor())    {      window.title = GetString(ColorType+"Color");      if (ColorType == "Page" && IsCSSPrefChecked && IsHTMLEditor())        window.title = GetString("BlockColor");    }  }  if (!window.title)    window.title = GetString("Color");  gDialog.ColorInput.value = "";  var tmpColor;  var haveTableRadio = false;  switch (ColorType)  {    case "Page":      tmpColor = gColorObj.PageColor;      if (tmpColor && tmpColor.toLowerCase() != "window")        gColor = tmpColor;      break;    case "Table":      if (gColorObj.TableColor)        gColor = gColorObj.TableColor;      break;    case "Cell":      if (gColorObj.CellColor)        gColor = gColorObj.CellColor;      break;    case "TableOrCell":      TableOrCell = true;      document.getElementById("TableOrCellGroup").setAttribute("collapsed", "false");      haveTableRadio = true;      if (gColorObj.SelectedType == "Cell")      {        gColor = gColorObj.CellColor;        gDialog.CellOrTableGroup.selectedItem = gDialog.CellRadio;        gDialog.CellRadio.focus();      }      else      {        gColor = gColorObj.TableColor;        gDialog.CellOrTableGroup.selectedItem = gDialog.TableRadio;        gDialog.TableRadio.focus();      }      break;    case "Highlight":      HighlightType = true;      if (gColorObj.HighlightColor)        gColor = gColorObj.HighlightColor;      break;    default:      // Any other type will change some kind of text,      TextType = true;      tmpColor = gColorObj.TextColor;      if (tmpColor && tmpColor.toLowerCase() != "windowtext")        gColor = gColorObj.TextColor;      break;  }  // Set initial color in input field and in the colorpicker  SetCurrentColor(gColor);  gDialog.ColorPicker.initColor(gColor);  // Use last-picked colors passed in, or those persistent on dialog  if (TextType)  {    if ( !("LastTextColor" in gColorObj) || !gColorObj.LastTextColor)      gColorObj.LastTextColor = gDialog.LastPickedColor.getAttribute("LastTextColor");    LastPickedColor = gColorObj.LastTextColor;  }  else if (HighlightType)  {    if ( !("LastHighlightColor" in gColorObj) || !gColorObj.LastHighlightColor)      gColorObj.LastHighlightColor = gDialog.LastPickedColor.getAttribute("LastHighlightColor");    LastPickedColor = gColorObj.LastHighlightColor;  }  else  {    if ( !("LastBackgroundColor" in gColorObj) || !gColorObj.LastBackgroundColor)      gColorObj.LastBackgroundColor = gDialog.LastPickedColor.getAttribute("LastBackgroundColor");    LastPickedColor = gColorObj.LastBackgroundColor;  }  gDialog.LastPickedColor.setAttribute("style","background-color: "+LastPickedColor);  // Set method to detect clicking on OK button  //  so we don't get fooled by changing "default" behavior  gDialog.Ok.setAttribute("onclick", "SetDefaultToOk()");  // Make the "Last-picked" the default button  //  until the user selects a color  gDialog.Ok.removeAttribute("default");  gDialog.LastPickedButton.setAttribute("default","true");  // Caller can prevent user from submitting an empty, i.e., default color  NoDefault = gColorObj.NoDefault;  if (NoDefault)  {    // Hide the "Default button -- user must pick a color    document.getElementById("DefaultColorButton").setAttribute("collapsed","true");  }  // Set focus to colorpicker if not set to table radio buttons above  if (!haveTableRadio)    gDialog.ColorPicker.focus();  SetWindowLocation();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/324aff4509f6aad9b525cd2c7ff2890ac48e5674/EdColorPicker.js/clean/editor/ui/dialogs/content/EdColorPicker.js