rem: SetSpanEnable(); 
context: function Startup(){  if (!InitEditorShell()) return;  selection = editorShell.editorSelection;  if (!selection) return;  dialog = new Object;  if (!dialog)    window.close();  // Get dialog widgets - Table Panel  dialog.TableRowsInput = document.getElementById("TableRowsInput");  dialog.TableColumnsInput = document.getElementById("TableColumnsInput");  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.TableAlignList = document.getElementById("TableAlignList");  dialog.TableCaptionList = document.getElementById("TableCaptionList");  dialog.TableInheritColor = document.getElementById("TableInheritColor");  // Cell Panel  dialog.SelectionList = document.getElementById("SelectionList");  dialog.PreviousButton = document.getElementById("PreviousButton");  dialog.NextButton = document.getElementById("NextButton");  // Currently, we always apply changes and load new attributes when changing selection  // (Let's keep this for possible future use)  //dialog.ApplyBeforeMove =  document.getElementById("ApplyBeforeMove");  //dialog.KeepCurrentData = document.getElementById("KeepCurrentData");  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.CellHAlignList = document.getElementById("CellHAlignList");  dialog.CellVAlignList = document.getElementById("CellVAlignList");  dialog.CellInheritColor = document.getElementById("CellInheritColor");  dialog.CellStyleList = document.getElementById("CellStyleList");  dialog.TextWrapList = document.getElementById("TextWrapList");  // In cell panel, user must tell us which attributes to apply via checkboxes,  //  else we would apply values from one cell to ALL in selection  //  and that's probably not what they expect!  dialog.CellHeightCheckbox = document.getElementById("CellHeightCheckbox");  dialog.CellWidthCheckbox = document.getElementById("CellWidthCheckbox");  dialog.RowSpanCheckbox = document.getElementById("RowSpanCheckbox");  dialog.ColSpanCheckbox = document.getElementById("ColSpanCheckbox");  dialog.CellHAlignCheckbox = document.getElementById("CellHAlignCheckbox");  dialog.CellVAlignCheckbox = document.getElementById("CellVAlignCheckbox");  dialog.CellStyleCheckbox = document.getElementById("CellStyleCheckbox");  dialog.TextWrapCheckbox = document.getElementById("TextWrapCheckbox");  dialog.CellColorCheckbox = document.getElementById("CellColorCheckbox");  TabPanels = document.getElementById("TabPanels");  var TableTab = document.getElementById("TableTab");  var CellTab = document.getElementById("CellTab");  TableElement = editorShell.GetElementOrParentByTagName("table", null);  if(!TableElement)  {    dump("Failed to get table element!\n");    window.close();  }  globalTableElement = TableElement.cloneNode(false);  var tagNameObj = new Object;  var countObj = new Object;  var tableOrCellElement = editorShell.GetSelectedOrParentTableElement(tagNameObj, countObj);  gSelectedCellCount = countObj.value;  if (tagNameObj.value == "td")  {    // We are in a cell    CellElement = tableOrCellElement;    globalCellElement = CellElement.cloneNode(false);    // Tells us whether cell, row, or column is selected    SelectedCellsType = editorShell.GetSelectedCellsType(TableElement);    SetSpanEnable();    // Ignore types except Cell, Row, and Column    if (SelectedCellsType < SELECT_CELL || SelectedCellsType > SELECT_COLUMN)      SelectedCellsType = SELECT_CELL;    // Be sure at least 1 cell is selected.    // (If the count is 0, then we were inside the cell.)    if (gSelectedCellCount == 0)      DoCellSelection();    // Get location in the cell map    curRowIndex = editorShell.GetRowIndex(CellElement);    curColIndex = editorShell.GetColumnIndex(CellElement);    // We save the current colspan to quickly    //  move selection from from cell to cell    if (GetCellData(curRowIndex, curColIndex))      curColSpan = cellData.colSpan;    // Starting TabPanel name is passed in    if (window.arguments[1] == "CellPanel")    {      currentPanel = CellPanel;      //Set index for starting panel on the <tabpanels> element      TabPanels.setAttribute("index", CellPanel);      // Trigger setting of style for the tab widgets      CellTab.setAttribute("selected", "true");      TableTab.removeAttribute("selected");      // Use cell element for Advanced Edit dialog      globalElement = globalCellElement;    }  }  if (currentPanel == TablePanel)  {    // Use table element for Advanced Edit dialog    globalElement = globalTableElement;    // We may call this with table selected, but no cell,    //  so disable the Cell Properties tab    if(!CellElement)      CellTab.setAttribute("disabled", "true");  }  doSetOKCancel(onOK, onCancel);  // 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);  lastRowIndex = rowCount-1;  colCount = editorShell.GetTableColumnCount(TableElement);  lastColIndex = colCount-1;  // Set appropriate icons and enable state for the Previous/Next buttons  SetSelectionButtons();  // If only one cell in table, disable change-selection widgets  if (rowCount == 1 && colCount == 1)    dialog.SelectionList.setAttribute("disabled", "true");  // User can change these via textboxes  newRowCount = rowCount;  newColCount = colCount;  // This flag is used to control whether set check state  //  on "set attribute" checkboxes  // (Advanced Edit dialog use calls  InitDialog when done)  AdvancedEditUsed = false;  InitDialog();  AdvancedEditUsed = true;  // If first initializing, we really aren't changing anything  CellDataChanged = false;  if (currentPanel == CellPanel)    dialog.SelectionList.focus();  else    SetTextboxFocus(dialog.TableRowsInput);  SetWindowLocation();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/5315f300306753d3e6e43aaf0e8ddd650d310502/EdTableProps.js/clean/editor/ui/dialogs/content/EdTableProps.js