Ignore:
Timestamp:
12/19/05 12:35:43 (14 years ago)
Author:
gocher
Message:

add width and hight to insertPicture plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/InsertPicture/InsertPicture.php

    r419 r438  
    7070  __dlg_translate("InsertPicture"); 
    7171  __dlg_init(); 
    72   window.resizeTo(470, 490); 
     72  window.resizeTo(500, 490); 
    7373  // Make sure the translated string appears in the drop down. (for gecko) 
    7474  document.getElementById("f_align").selectedIndex = 1; 
     
    8282      document.getElementById("f_vert").value = param["f_vert"]; 
    8383      document.getElementById("f_horiz").value = param["f_horiz"]; 
     84      document.getElementById("f_height").value = param["f_height"]; 
     85      document.getElementById("f_width").value = param["f_width"];                       
    8486      window.ipreview.location.replace(param.f_url); 
    8587  } 
     
    149151} 
    150152 
     153var img = new Image(); 
     154function imgWait() { 
     155  waiting = window.setInterval("imgIsLoaded()", 1000) 
     156} 
     157function imgIsLoaded() { 
     158  if(img.width > 0) { 
     159    window.clearInterval(waiting) 
     160    document.getElementById("f_width").value = img.width; 
     161    document.getElementById("f_height").value = img.height; 
     162  } 
     163} 
     164 
    151165function CopyToURL(imgName) { 
    152166  document.getElementById("f_url").value = imgName; 
    153167  onPreview(); 
     168  img.src = imgName; 
     169  img.onLoad = imgWait() 
    154170} 
    155171 
     
    229245<div class="space"></div> 
    230246 
    231 <div class="fl">Alignment:</div> 
     247<div class="fl" style="width: 6em;">Alignment:</div> 
    232248<select size="1" name="align" id="f_align" 
    233249  title="Positioning of this image"> 
     
    246262<p /> 
    247263 
    248 <div class="fl">Border thickness:</div> 
     264<div class="fl" style="width: 6em;">Border thickness:</div> 
    249265<input type="text" name="border" id="f_border" size="5" 
    250266title="Leave empty for no border" /> 
     
    254270</fieldset> 
    255271 
     272<fieldset style="float: left; margin-left: 5px;"> 
     273<legend>Size</legend> 
     274 
     275<div class="space"></div> 
     276 
     277<div class="fl" style="width: 5em;">Width:</div> 
     278<input type="text" name="width" id="f_width" size="5" title="Leave empty for not defined" /> 
     279<p /> 
     280 
     281<div class="fl" style="width: 5em;">Height:</div> 
     282<input type="text" name="height" id="f_height" size="5" title="Leave empty for not defined" /> 
     283<div class="space"></div> 
     284 
     285</fieldset> 
     286 
    256287<fieldset style="float:right; margin-right: 5px;"> 
    257288<legend>Spacing</legend> 
     
    259290<div class="space"></div> 
    260291 
    261 <div class="fr">Horizontal:</div> 
     292<div class="fr" style="width: 5em;">Horizontal:</div> 
    262293<input type="text" name="horiz" id="f_horiz" size="5" 
    263294title="Horizontal padding" /> 
     
    265296<p /> 
    266297 
    267 <div class="fr">Vertical:</div> 
     298<div class="fr" style="width: 5em;">Vertical:</div> 
    268299<input type="text" name="vert" id="f_vert" size="5" 
    269300title="Vertical padding" /> 
Note: See TracChangeset for help on using the changeset viewer.