rem: var imageTypeExtension                = checkForImage(); 
add: var imageTypeExtension  = checkForImage(); 
context: function ValidateData(){  var imageTypeExtension                = checkForImage();  if ( !imageTypeExtension ) {    ShowInputErrorMessage(GetString("MissingImageError"));    return false;  }  //TODO: WE NEED TO DO SOME URL VALIDATION HERE, E.G.:  // We must convert to "file:///" or "http://" format else image doesn't load!  globalElement.setAttribute("src",dialog.srcInput.value);    // TODO: Should we confirm with user if no alt tag? Or just set to empty string?  globalElement.setAttribute("alt", dialog.altTextInput.value);    // set width if custom size and width is greater than 0  // Note: This accepts and empty string as meaning "don't set  // BUT IT ALSO ACCEPTS 0. Should use ValidateNumberString() to tell user proper range  if ( dialog.customsizeRadio.checked      && ( dialog.imagewidthInput.value.length > 0 )     && ( dialog.imageheightInput.value.length > 0 ) )  {    setDimensions();  // width and height  }  else  {    //TODO: WE SHOULD ALWAYS SET WIDTH AND HEIGHT FOR FASTER IMAGE LAYOUT    //  IF USER DOESN'T SET IT, WE NEED TO GET VALUE FROM ORIGINAL IMAGE     globalElement.removeAttribute( "width" );    globalElement.removeAttribute( "height" );  }    // spacing attributes  // All of these should use ValidateNumberString() to   //  ensure value is within acceptable range  if ( dialog.imagelrInput.value.length > 0 )    globalElement.setAttribute( "hspace", dialog.imagelrInput.value );  else    globalElement.removeAttribute( "hspace" );    if ( dialog.imagetbInput.value.length > 0 )    globalElement.setAttribute( "vspace", dialog.imagetbInput.value );  else    globalElement.removeAttribute( "vspace" );    // note this is deprecated and should be converted to stylesheets  if ( dialog.imageborderInput.value.length > 0 )    globalElement.setAttribute( "border", dialog.imageborderInput.value );  else    globalElement.removeAttribute( "border" );// This currently triggers a "Not implemented" assertion, preventing inserting an image// TODO: FIX THIS!/*  alignpopup = document.getElementById("image.alignType");  if ( alignpopup )  {    var alignurl;    alignpopup.getAttribute( "src", alignurl );    dump( "popup value = " + alignurl + "\n" );    if ( alignurl == "&bottomIcon.url;" )      globalElement.removeAttribute("align");//    else//      globalElement.setAttribute("align", alignurl );  }*/  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/25771bd9e4d7db6905ed7b17947434267aa09319/EdImageProps.js/clean/editor/ui/dialogs/content/EdImageProps.js