add:  wasEnableAll = !(dialog.srcInput.value.length > 0); 
context: function initDialog() {  // Get a single selected anchor element  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    dump("Element not selected - calling createElementWithDefaults\n");    imageElement = editorShell.CreateElementWithDefaults(tagName);	  if( !imageElement )	  {	    dump("Failed to get selected element or create a new one!\n");	    window.close();	  }    }	  // Set the controls to the image's attributes  str = imageElement.getAttribute("src");  if ( str == "null" )  {    str = "";  }  dialog.srcInput.value = str;    str = imageElement.getAttribute("alt");  if ( str == "null" )  {    str = "";  }  dialog.altTextInput.value = str;    // we want to force an update so initialize "wasEnabledAll" to be the opposite of what the actual state is  wasEnabledAll = !((dialog.srcInput.value.length > 0) && (dialog.altTextInput.value.length > 0));    // set height and width  // note: need to set actual image size if no attributes  dimvalue = imageElement.getAttribute("width");  if ( dimvalue == "null" )  {    dimvalue = "";  }  dialog.imagewidthInput.value = dimvalue;    dimvalue = imageElement.getAttribute("height");  if ( dimvalue == "null" )  {    dimvalue = "";  }  dialog.imageheightInput.value = dimvalue;    // this is not the correct way to determine if custom or original  if ( dimvalue != "" )  {    dialog.customsizeRadio.checked = true;  }  alignpopup = document.getElementById("image.alignType");  if ( alignpopup )  {    alignvalue = imageElement.getAttribute("align");    if ( alignvalue == "" )    {      alignvalue = "at the bottom";    }    dump( "popup value = " + alignvalue + "\n" );    alignpopup.setAttribute( "value", alignvalue );  }  // set spacing editfields  sizevalue = imageElement.getAttribute("hspace");  dialog.imagelrInput.value = sizevalue;    sizevalue = imageElement.getAttribute("vspace");  dialog.imagetbInput.value = sizevalue;    sizevalue = imageElement.getAttribute("border");  dialog.imageborderInput.value = sizevalue;      doOverallEnabling();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/7d0310bd0d04001a796c054cee2163be6db2af82/EdImageProps.js/buggy/editor/ui/dialogs/content/EdImageProps.js