Changeset 1808
- Timestamp:
- 06.02.2012 21:43:35 (4 months ago)
- Location:
- ZMS/trunk
- Files:
-
- 2 edited
-
dtml/objattrs/f_select_image.dtml (modified) (1 diff)
-
plugins/www/objattrs/zmi.blob.ZMSGraphic_extEdit.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ZMS/trunk/dtml/objattrs/f_select_image.dtml
r1743 r1808 25 25 <dtml-var "getZMILangStr('ATTR_WIDTH')"> x 26 26 <dtml-var "getZMILangStr('ATTR_HEIGHT')"> 27 <dtml-var "getTextInput(fmName=fmName,elName='ZMSGraphic_extEdit_width:int',size=4,value=0,enabled=False)"> x 28 <dtml-var "getTextInput(fmName=fmName,elName='ZMSGraphic_extEdit_height:int',size=4,value=0,enabled=False)"> px 27 <dtml-var "getTextInput(fmName=fmName,elName='ZMSGraphic_extEdit_width:int',size=4,value=0)"> x 28 <dtml-var "getTextInput(fmName=fmName,elName='ZMSGraphic_extEdit_height:int',size=4,value=0)"> px 29 <input class="form-checkbox" type="checkbox" id="ZMSGraphic_extEdit_proportional" checked="checked"/><span class="form-small">Proportional</span> 29 30 <input class="ui-button ui-state-default ui-corner-all" type="submit" name="btn" value="<dtml-var "getZMILangStr('BTN_APPLY')">" onclick="return ZMSGraphic_extEdit_apply();"> 30 31 </td> -
ZMS/trunk/plugins/www/objattrs/zmi.blob.ZMSGraphic_extEdit.js
r1803 r1808 237 237 238 238 $(function () { 239 $("#ZMSGraphic_extEdit_width").keyup(function(){ 240 var w = parseInt($(this).val()); 241 if ($("#ZMSGraphic_extEdit_proportional").prop("checked")) { 242 var v = w/ZMSGraphic_act_width; 243 var h = Math.round(v*ZMSGraphic_act_height); 244 $("#ZMSGraphic_extEdit_height").val(h); 245 } 246 var h = $("#ZMSGraphic_extEdit_height").val(); 247 $ZMSGraphic_img.attr({'width':w,'height':h}); 248 }); 249 $("#ZMSGraphic_extEdit_height").keyup(function(){ 250 var h = parseInt($(this).val()); 251 if ($("#ZMSGraphic_extEdit_proportional").prop("checked")) { 252 var v = h/ZMSGraphic_act_height; 253 var w = Math.round(v*ZMSGraphic_act_width); 254 $("#ZMSGraphic_extEdit_width").val(w); 255 } 256 var w = $("#ZMSGraphic_extEdit_width").val(); 257 $ZMSGraphic_img.attr({'width':w,'height':h}); 258 }); 239 259 $("#ZMSGraphic_extEdit_vslider").slider({ 240 260 orientation: "vertical",
Note: See TracChangeset
for help on using the changeset viewer.
