Changeset 958

Show
Ignore:
Timestamp:
12/19/06 23:48:40 (2 years ago)
Author:
lknowland
Message:

Added a checkThumbs function to have the screen automatically run adjustHeightWidth if Create Thumbnail is a chosen setting so as to correctly show the thumbnail width / height based on the saved setting.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/wheeljack/tmpl/cms/asset_image_options.tmpl

    r937 r958  
    2121} 
    2222 
     23function checkThumbs(f) { 
     24    var real_w = <TMPL_VAR NAME=WIDTH>; 
     25    var real_h = <TMPL_VAR NAME=HEIGHT>; 
     26    var thumb_w = <TMPL_VAR NAME=THUMB_WIDTH>; 
     27    var thumb_h = <TMPL_VAR NAME=THUMB_HEIGHT>; 
     28    if ((real_w != thumb_w) || (real_h != thumb_h)) { 
     29        f = document.forms[0]; 
     30        adjustWidthHeight(f,1); 
     31    } 
     32} 
     33 
    2334function adjustWidthHeight (f, width) { 
    2435//    if (!f.constrain.checked) return; 
     
    3849    return true; 
    3950} 
     51 
    4052//--> 
    4153</script> 
    42  
    4354<TMPL_IF NAME=DO_THUMB> 
    4455<input type="hidden" name="full_width" value="<TMPL_VAR NAME=WIDTH>" /> 
     
    6475            <input name="thumb_height" value="<TMPL_VAR NAME=THUMB_HEIGHT>" onchange="adjustWidthHeight(this.form, 0)" size="4" /> 
    6576            <MT_TRANS phrase="Pixels"> 
     77<img onload="checkThumbs('now');" src="<TMPL_VAR NAME=STATIC_URI>images/spacer.gif" alt="" width="1" height="1" /> 
    6678            </p> 
    6779            </TMPL_IF>