Skip to content

Commit

Permalink
add the 'same_ratio_active' parameter in the ajax-request (@see https…
Browse files Browse the repository at this point in the history
  • Loading branch information
Volkmar Kantor committed Sep 20, 2015
1 parent 0d3c794 commit 53b87ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion functions/save.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class CptSaveThumbnail {
* * $_REQUEST['selection'] - json-object - data of the selection/crop
* * $_REQUEST['raw_values'] - json-object - data of the original image
* * $_REQUEST['active_values'] - json-array - array with data of the images to crop
* * $_REQUEST['same_ratio_active'] - boolean - was the same_ratio_checkbox checked or not
* The main code is wraped via try-catch - the errorMessage will send back to JavaScript for displaying in an alert-box.
* Called die() at the end.
*/
Expand Down Expand Up @@ -253,4 +254,4 @@ function generateFilename( $file, $w, $h ){
return $destfilename;
}
}
?>
?>
3 changes: 2 additions & 1 deletion js/cpt-crop.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ jQuery(document).ready(function($) {
cookie: encodeURIComponent(document.cookie),
selection: JSON.stringify(cropping.api.tellSelect()),
raw_values: JSON.stringify(cropping.img.data('values')),
active_values: JSON.stringify(active_array)
active_values: JSON.stringify(active_array),
same_ratio_active: $('#cpt-same-ratio').is('checked')
},
complete : function() {
$('.mainWindow').show();
Expand Down

0 comments on commit 53b87ef

Please sign in to comment.