rem:  insertNew                           = false; 
add: insertNew = false; 
context: function Startup(){  if (!InitEditorShell())    return;  doSetOKCancel(onOK, null);  // Create dialog object to store controls for easy access  dialog                                = new Object;  // This is the "combined" widget:  dialog.srcInput                       = document.getElementById("image.srcInput");  dialog.altTextInput                   = document.getElementById("image.altTextInput");  dialog.MoreFewerButton                = document.getElementById("MoreFewerButton");  dialog.MoreRow                        = document.getElementById("MoreRow");  dialog.customsizeRadio                = document.getElementById( "customsizeRadio" );  dialog.imagewidthInput                = document.getElementById( "imagewidthInput" );  dialog.imageheightInput               = document.getElementById( "imageheightInput" );  dialog.imagewidthSelect               = document.getElementById( "widthunitSelect" );  dialog.imageheightSelect              = document.getElementById( "heightunitSelect" );    dialog.imagelrInput                   = document.getElementById( "imageleftrightInput" );  dialog.imagetbInput                   = document.getElementById( "imagetopbottomInput" );  dialog.imageborderInput               = document.getElementById( "imageborderInput" );  // Set SeeMore bool to the OPPOSITE of the current state,  //   which is automatically saved by using the 'persist="more"'   //   attribute on the MoreFewerButton button  //   onMoreFewer will toggle it and redraw the dialog  SeeMore = (dialog.MoreFewerButton.getAttribute("more") != "1");  onMoreFewer();  if (null == dialog.srcInput ||       null == dialog.altTextInput )  {    dump("Not all dialog controls were found!!!\n");  }        // Get a single selected image element  var tagName                           = "img"  imageElement                          = editorShell.GetSelectedElement(tagName);  if (imageElement)   {    // We found an element and don't need to insert one    insertNew                           = false;  }   else  {    insertNew                           = true;    // We don't have an element selected,     //  so create one with default attributes    imageElement                        = editorShell.CreateElementWithDefaults(tagName);    if( !imageElement )    {      dump("Failed to get selected element or create a new one!\n");      window.close();    }    }  // Make a copy to use for AdvancedEdit  globalElement = imageElement.cloneNode(false);    // Initialize all widgets with image attributes  InitDialog();    dialog.srcInput.focus();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/25771bd9e4d7db6905ed7b17947434267aa09319/EdImageProps.js/clean/editor/ui/dialogs/content/EdImageProps.js