Changeset 974
- Timestamp:
- 12/21/06 20:09:09 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/wheeljack/tmpl/cms/asset_image_options.tmpl
r970 r974 44 44 } 45 45 46 function widthKeyPress(e) { 47 var key; 48 if (window.event) { 49 key = window.event.keyCode; 50 e = window.event; 51 } else if (e) 52 key = e.which; 53 else 54 return true; 55 if (( key == null) || ( key == 0 ) || ( key == 8 ) || 56 ( key == 9 ) || ( key == 13 ) || ( key == 27 )) 57 return true; 58 if (key > 60000) // handles range of special keys such as arrow keys 59 return true; 60 if (e.ctrlKey || e.altKey) 61 return true; 62 if ((e.charCode < 48) || (e.charCode > 57)) 63 return TC.stopEvent(e); 64 return true; 65 } 66 46 67 //--> 47 68 </script> … … 65 86 <p><input type="checkbox" name="thumb" value="1" <TMPL_IF NAME=MAKE_THUMB>checked="checked" </TMPL_IF>/> <MT_TRANS phrase="Create Thumbnail"> <a href="#" onclick="return openManual('file_upload', 'creating_thumbnails')" class="help">?</a> 66 87 <label for="thumb_width"><MT_TRANS phrase="Width">:</label> 67 <input name="thumb_width" id="thumb_width" value="<TMPL_VAR NAME=THUMB_WIDTH>" on change="adjustWidthHeight(this.form, 1)" size="4" />88 <input name="thumb_width" id="thumb_width" value="<TMPL_VAR NAME=THUMB_WIDTH>" onkeypress="widthKeyPress(event)" onchange="adjustWidthHeight(this.form, 1)" size="4" /> 68 89 <input type="hidden" name="thumb_height" value="<TMPL_VAR NAME=THUMB_HEIGHT>" onchange="adjustWidthHeight(this.form, 0)" size="4" /> 69 90 <MT_TRANS phrase="Pixels">
