rem: dump("*** Found cell around selection\n"); 
add: dump("Cell is selected or is selection parent. Selected Cell count = "+selectedCellCount+"\n"); 
context: function Startup(){  if (!InitEditorShell())    return;  dialog = new Object;  if (!dialog)  {    dump("Failed to create dialog object!!!\n");    window.close();  }  // Get dialog widgets - Table Panel  dialog.TableRowsInput = document.getElementById("TableRowsInput");  dialog.TableColumnsInput = document.getElementById("TableColumnsInput");  dialog.TableHeightInput = document.getElementById("TableHeightInput");  dialog.TableHeightUnits = document.getElementById("TableHeightUnits");  dialog.TableWidthInput = document.getElementById("TableWidthInput");  dialog.TableWidthUnits = document.getElementById("TableWidthUnits");  dialog.BorderWidthInput = document.getElementById("BorderWidthInput");  dialog.SpacingInput = document.getElementById("SpacingInput");  dialog.PaddingInput = document.getElementById("PaddingInput");  dialog.TableAlignSelect = document.getElementById("TableAlignSelect");  dialog.CaptionSelect = document.getElementById("CaptionSelect");  dialog.TableInheritColor = document.getElementById("TableInheritColor");  dialog.TableImageInput = document.getElementById("TableImageInput");//  dialog.TableLeaveLocCheck = document.getElementById("TableLeaveLocCheck");  // Cell Panel  dialog.SelectionList = document.getElementById("SelectionList");  dialog.SelectCellItem = document.getElementById("SelectCellItem");  dialog.SelectRowItem = document.getElementById("SelectRowItem");  dialog.SelectColumnItem = document.getElementById("SelectColumnItem");  dialog.CellHeightInput = document.getElementById("CellHeightInput");  dialog.CellHeightUnits = document.getElementById("CellHeightUnits");  dialog.CellWidthInput = document.getElementById("CellWidthInput");  dialog.CellWidthUnits = document.getElementById("CellWidthUnits");  dialog.RowSpanInput = document.getElementById("RowSpanInput");  dialog.ColSpanInput = document.getElementById("ColSpanInput");  dialog.CellHAlignSelect = document.getElementById("CellHAlignSelect");  dialog.CellAlignCharInput = document.getElementById("CellAlignCharInput");  dialog.CellVAlignSelect = document.getElementById("CellVAlignSelect");  dialog.HeaderCheck = document.getElementById("HeaderCheck");  dialog.NoWrapCheck = document.getElementById("NoWrapCheck");  dialog.CellInheritColor = document.getElementById("CellInheritColor");  dialog.CellImageInput = document.getElementById("CellImageInput");//  dialog.CellLeaveLocCheck = document.getElementById("CellLeaveLocCheck");  TableElement = editorShell.GetElementOrParentByTagName("table", null);  var tagNameObj = new Object;  var countObj = new Object;  var element = editorShell.GetSelectedOrParentTableElement(tagNameObj, countObj);  var tagName = tagNameObj.value;  if (tagNameObj.value == "td")  {dump("*** Found cell around selection\n");    CellElement = element;  }  selectedCellCount = countObj.value;  // If the count is 0, then we are inside the cell, so select it  if (selectedCellCount == 0)    editorShell.SelectTableCell();  if(!TableElement)  {    dump("Failed to get selected element or create a new one!\n");    window.close();  }  // We allow a missing cell -- see below  TabPanel = document.getElementById("TabPanel");  var TableTab = document.getElementById("TableTab");  var CellTab = document.getElementById("CellTab");      // Starting TabPanel name is passed in  if (window.arguments[1] == "CellPanel") currentPanel = CellPanel;  globalTableElement = TableElement.cloneNode(false);  if (CellElement)    globalCellElement = CellElement.cloneNode(false);  // Activate the Cell Panel if requested  if (currentPanel == CellPanel)  {dump("*** Requested CellPanel for Table Properties dialog.\n");    // We must have a cell element to start in this panel    if(!CellElement)    {      dump("Failed to get selected element or create a new one!\n");      window.close();    }    //Set index for starting panel on the <tabpanel> element    TabPanel.setAttribute("index", CellPanel);        // Trigger setting of style for the tab widgets    CellTab.setAttribute("selected", "true");    TableTab.removeAttribute("selected");    // Start editing on the cell element    globalElement = globalCellElement;  }  else  {    currentPanel = TablePanel;    // Start editing on the table element    globalElement = globalTableElement;  }  if(!CellElement)  {    // Disable the Cell Properties tab -- only allow table props    CellTab.setAttribute("disabled", "true");  }    doSetOKCancel(onOK, null);  // Note: we must use TableElement, not globalTableElement for these,  //  thus we should not put this in InitDialog.  // Instead, monitor desired counts with separate globals  rowCount = editorShell.GetTableRowCount(TableElement);  colCount = editorShell.GetTableColumnCount(TableElement);  // This uses values set on global Elements;  InitDialog();  // Should be dialog.TableRowsInput, or  //  SelectionList in cel panenl,  // but this is disabled for Beta1disabled for Beta1  if (currentPanel == CellPanel)    dialog.CellHeightInput.focus();   else    dialog.TableHeightInput.focus();}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/a70cf9ae17d579d5043dd1ad906deca7b4283c0d/EdTableProps.js/clean/editor/ui/dialogs/content/EdTableProps.js