Ignore:
Timestamp:
Dec 29, 2013, 11:02:14 AM (10 years ago)
Author:
mistic100
Message:

hide NESW handles when forcing ratio

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/header_manager/admin/template/add.tpl

    r26299 r26308  
    1717    boxHeight: {$crop.box_height},
    1818    trueSize: [{$picture.width}, {$picture.height}],
    19     aspectRatio: {$crop.real_width}/{$crop.real_height},
     19    {if $keep_ratio}aspectRatio: {$crop.real_width}/{$crop.real_height},{/if}
    2020    setSelect: [{$crop.l}, {$crop.t}, {$crop.r}, {$crop.b}],
    2121    onChange: function(sel) {
     
    3737  function() {
    3838    jcrop_api = this;
     39    {if $keep_ratio}jQuery(".jcrop-holder").addClass('fixed-ratio');{/if}
    3940  });
    4041 
     
    4647      jcrop_api.release();
    4748    }
     49    jQuery(".jcrop-holder").toggleClass('fixed-ratio');
    4850  });
    4951}());
     
    6062    <li><b>{'Width'|translate}:</b> <span id="width"></span>px</li>
    6163    <li><b>{'Height'|translate}:</b> <span id="height"></span>px</li>
    62     <li><label><input type="checkbox" name="keep_ratio" checked> {'Respect %s aspect ratio'|translate:($crop.desired_width|cat:'/'|cat:$crop.desired_height)}</label></li>
     64    <li><label><input type="checkbox" name="keep_ratio" {if $keep_ratio}checked{/if}> {'Respect %s aspect ratio'|translate:($crop.desired_width|cat:'/'|cat:$crop.desired_height)}</label></li>
    6365  </ul>
    6466 
Note: See TracChangeset for help on using the changeset viewer.