rem:  gDialog.srcInput.value = globalElement.getAttribute("src");   SetRelativeCheckbox();   LoadPreviewImage();  gDialog.altTextInput.value = globalElement.getAttribute("alt");   var width = InitPixelOrPercentMenulist(globalElement, gInsertNewImage ? null : imageElement, "width", "widthUnitsMenulist", gPixel); var height = InitPixelOrPercentMenulist(globalElement, gInsertNewImage ? null : imageElement, "height", "heightUnitsMenulist", gPixel);  var rg = gDialog.actualSizeRadio.radioGroup;  if (actualWidth && actualHeight) { if ((width == actualWidth && height == actualHeight) || !(width || height)) rg.selectedItem = gDialog.actualSizeRadio; } if (!gDialog.actualSizeRadio.selected) rg.selectedItem = gDialog.customSizeRadio;  gDialog.widthInput.value  = constrainWidth = width ? width : (actualWidth ? actualWidth : ""); gDialog.heightInput.value = constrainHeight = height ? height : (actualHeight ? actualHeight : "");   gDialog.imagelrInput.value = globalElement.getAttribute("hspace"); gDialog.imagetbInput.value = globalElement.getAttribute("vspace");   var bv = GetHTMLOrCSSStyleValue(globalElement, "border", "border-top-width"); var pxIndex = bv.search(/px/); if (pxIndex  > 0) {  bv = bv.substr(0, pxIndex); } else if (bv == "thin") { bv = "1"; } else if (bv == "medium") { bv = "3"; } else if (bv == "thick") { bv = "5"; } gDialog.border.value = bv;   var align = globalElement.getAttribute("align"); if (align) { align = align.toLowerCase(); } var imgClass; var textID; switch ( align ) { case "top": case "middle": case "right": case "left": gDialog.alignTypeSelect.value = align; break; default: gDialog.alignTypeSelect.value = "bottom"; }   gImageMap = GetImageMap();  doOverallEnabling(); doDimensionEnabling(); 
add: InitImage(); 
context: function InitDialog(){  // Set the controls to the image's attributes  gDialog.srcInput.value = globalElement.getAttribute("src");  // Set "Relativize" checkbox according to current URL state  SetRelativeCheckbox();  // Force loading of image from its source and show preview image  LoadPreviewImage();  gDialog.altTextInput.value = globalElement.getAttribute("alt");  // setup the height and width widgets  var width = InitPixelOrPercentMenulist(globalElement,                    gInsertNewImage ? null : imageElement,                    "width", "widthUnitsMenulist", gPixel);  var height = InitPixelOrPercentMenulist(globalElement,                    gInsertNewImage ? null : imageElement,                    "height", "heightUnitsMenulist", gPixel);  var rg = gDialog.actualSizeRadio.radioGroup;  // Set actual radio button if both set values are the same as actual  if (actualWidth && actualHeight) {    if ((width == actualWidth && height == actualHeight) || !(width || height))      rg.selectedItem = gDialog.actualSizeRadio;  }  if (!gDialog.actualSizeRadio.selected)    rg.selectedItem = gDialog.customSizeRadio;  gDialog.widthInput.value  = constrainWidth = width ? width : (actualWidth ? actualWidth : "");  gDialog.heightInput.value = constrainHeight = height ? height : (actualHeight ? actualHeight : "");  // set spacing editfields  gDialog.imagelrInput.value = globalElement.getAttribute("hspace");  gDialog.imagetbInput.value = globalElement.getAttribute("vspace");  // dialog.border.value       = globalElement.getAttribute("border");  var bv = GetHTMLOrCSSStyleValue(globalElement, "border", "border-top-width");  var pxIndex = bv.search(/px/);  if (pxIndex  > 0)  {    // Strip out the px    bv = bv.substr(0, pxIndex);  }  else if (bv == "thin")  {    bv = "1";  }  else if (bv == "medium")  {    bv = "3";  }  else if (bv == "thick")  {    bv = "5";  }  gDialog.border.value = bv;  // Get alignment setting  var align = globalElement.getAttribute("align");  if (align) {    align = align.toLowerCase();  }  var imgClass;  var textID;  switch ( align )  {    case "top":    case "middle":    case "right":    case "left":      gDialog.alignTypeSelect.value = align;      break;    default:  // Default or "bottom"      gDialog.alignTypeSelect.value = "bottom";  }  // Get image map for image  gImageMap = GetImageMap();  doOverallEnabling();  doDimensionEnabling();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/39c9942b8ce1ac7539a96c0525b1a84fba6a448d/EdImageProps.js/clean/editor/ui/dialogs/content/EdImageProps.js