NIHVIVO-161 Transfer thumbnail preview coordinates to hidden form fields to be received by the controller.

This commit is contained in:
rjy7 2010-07-01 14:20:18 +00:00
parent ebba9909fb
commit b1a35f1588

View file

@ -28,6 +28,14 @@
} }
}; };
$('#submitPhoto').click(function() {
var preview = $('#preview');
$('input[name=x]').val(preview.css('marginLeft').replace(/[^\d-]/g,''));
$('input[name=y]').val(preview.css('marginTop').replace(/[^\d-]/g,''));
$('input[name=w]').val(preview.css('width').replace(/[^\d-]/g,''));
$('input[name=h]').val(preview.css('height').replace(/[^\d-]/g,''));
});
}); });
}(jQuery)); }(jQuery));