rem: dimvalue         = ""; 
add: dimvalue                            = ""; 
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;    // Mods Brian King XML Workshop  // Set H & W pop-up on start-up  if (insertNew == false)  {        var wdh = imageElement.getAttribute("width");    var hgt = imageElement.getAttribute("height");    ispercentw = wdh.substr(wdh.length-1, 1);    ispercenth = hgt.substr(hgt.length-1, 1);  if (ispercentw == "%")      setPopup("w");    if (ispercenth == "%")      setPopup("h");  }  // End Mods BK    // 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;      // force wasEnableAll to be different so everything gets updated  wasEnableAll         = !(dialog.srcInput.value.length > 0);  doOverallEnabling();  checkForImage( "image.srcInput" );}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/5cb4feb3566948d7f7bf11b5396ee0a0efba2ad2/EdImageProps.js/clean/editor/ui/dialogs/content/EdImageProps.js