mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 04:45:16 +02:00
eliminate Cropper conflicts with jQuery
This commit is contained in:
parent
032cb5f6a3
commit
127b7a589e
72 changed files with 1659 additions and 1817 deletions
|
@ -13,12 +13,12 @@
|
|||
|
||||
// setup the callback function
|
||||
function onEndCrop( coords, dimensions ) {
|
||||
$( 'x1' ).value = coords.x1;
|
||||
$( 'y1' ).value = coords.y1;
|
||||
$( 'x2' ).value = coords.x2;
|
||||
$( 'y2' ).value = coords.y2;
|
||||
$( 'width' ).value = dimensions.width;
|
||||
$( 'height' ).value = dimensions.height;
|
||||
$PR( 'x1' ).value = coords.x1;
|
||||
$PR( 'y1' ).value = coords.y1;
|
||||
$PR( 'x2' ).value = coords.x2;
|
||||
$PR( 'y2' ).value = coords.y2;
|
||||
$PR( 'width' ).value = dimensions.width;
|
||||
$PR( 'height' ).value = dimensions.height;
|
||||
}
|
||||
|
||||
// basic example
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
// setup the callback function
|
||||
function onEndCrop( coords, dimensions ) {
|
||||
$( 'x1' ).value = coords.x1;
|
||||
$( 'y1' ).value = coords.y1;
|
||||
$( 'x2' ).value = coords.x2;
|
||||
$( 'y2' ).value = coords.y2;
|
||||
$( 'width' ).value = dimensions.width;
|
||||
$( 'height' ).value = dimensions.height;
|
||||
$PR( 'x1' ).value = coords.x1;
|
||||
$PR( 'y1' ).value = coords.y1;
|
||||
$PR( 'x2' ).value = coords.x2;
|
||||
$PR( 'y2' ).value = coords.y2;
|
||||
$PR( 'width' ).value = dimensions.width;
|
||||
$PR( 'height' ).value = dimensions.height;
|
||||
}
|
||||
|
||||
// Absolute positioned example
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
// setup the callback function
|
||||
function onEndCrop( coords, dimensions ) {
|
||||
$( 'x1' ).value = coords.x1;
|
||||
$( 'y1' ).value = coords.y1;
|
||||
$( 'x2' ).value = coords.x2;
|
||||
$( 'y2' ).value = coords.y2;
|
||||
$( 'width' ).value = dimensions.width;
|
||||
$( 'height' ).value = dimensions.height;
|
||||
$PR( 'x1' ).value = coords.x1;
|
||||
$PR( 'y1' ).value = coords.y1;
|
||||
$PR( 'x2' ).value = coords.x2;
|
||||
$PR( 'y2' ).value = coords.y2;
|
||||
$PR( 'width' ).value = dimensions.width;
|
||||
$PR( 'height' ).value = dimensions.height;
|
||||
}
|
||||
|
||||
// float example
|
||||
|
@ -30,12 +30,12 @@
|
|||
'testFloatImage',
|
||||
{
|
||||
onEndCrop: function( coords, dimensions ) {
|
||||
$( 'floatX1' ).value = coords.x1;
|
||||
$( 'floatY1' ).value = coords.y1;
|
||||
$( 'floatX2' ).value = coords.x2;
|
||||
$( 'floatY2' ).value = coords.y2;
|
||||
$( 'floatWidth' ).value = dimensions.width;
|
||||
$( 'floatHeight' ).value = dimensions.height;
|
||||
$PR( 'floatX1' ).value = coords.x1;
|
||||
$PR( 'floatY1' ).value = coords.y1;
|
||||
$PR( 'floatX2' ).value = coords.x2;
|
||||
$PR( 'floatY2' ).value = coords.y2;
|
||||
$PR( 'floatWidth' ).value = dimensions.width;
|
||||
$PR( 'floatHeight' ).value = dimensions.height;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
// setup the callback function
|
||||
function onEndCrop( coords, dimensions ) {
|
||||
$( 'x1' ).value = coords.x1;
|
||||
$( 'y1' ).value = coords.y1;
|
||||
$( 'x2' ).value = coords.x2;
|
||||
$( 'y2' ).value = coords.y2;
|
||||
$( 'width' ).value = dimensions.width;
|
||||
$( 'height' ).value = dimensions.height;
|
||||
$PR( 'x1' ).value = coords.x1;
|
||||
$PR( 'y1' ).value = coords.y1;
|
||||
$PR( 'x2' ).value = coords.x2;
|
||||
$PR( 'y2' ).value = coords.y2;
|
||||
$PR( 'width' ).value = dimensions.width;
|
||||
$PR( 'height' ).value = dimensions.height;
|
||||
}
|
||||
|
||||
// relative example
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
// setup the callback function
|
||||
function onEndCrop( coords, dimensions ) {
|
||||
$( 'x1' ).value = coords.x1;
|
||||
$( 'y1' ).value = coords.y1;
|
||||
$( 'x2' ).value = coords.x2;
|
||||
$( 'y2' ).value = coords.y2;
|
||||
$( 'width' ).value = dimensions.width;
|
||||
$( 'height' ).value = dimensions.height;
|
||||
$PR( 'x1' ).value = coords.x1;
|
||||
$PR( 'y1' ).value = coords.y1;
|
||||
$PR( 'x2' ).value = coords.x2;
|
||||
$PR( 'y2' ).value = coords.y2;
|
||||
$PR( 'width' ).value = dimensions.width;
|
||||
$PR( 'height' ).value = dimensions.height;
|
||||
}
|
||||
|
||||
// basic example
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
// setup the callback function
|
||||
function onEndCrop( coords, dimensions ) {
|
||||
$( 'x1' ).value = coords.x1;
|
||||
$( 'y1' ).value = coords.y1;
|
||||
$( 'x2' ).value = coords.x2;
|
||||
$( 'y2' ).value = coords.y2;
|
||||
$( 'width' ).value = dimensions.width;
|
||||
$( 'height' ).value = dimensions.height;
|
||||
$PR( 'x1' ).value = coords.x1;
|
||||
$PR( 'y1' ).value = coords.y1;
|
||||
$PR( 'x2' ).value = coords.x2;
|
||||
$PR( 'y2' ).value = coords.y2;
|
||||
$PR( 'width' ).value = dimensions.width;
|
||||
$PR( 'height' ).value = dimensions.height;
|
||||
}
|
||||
|
||||
// basic example
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
<script type="text/javascript" charset="utf-8">
|
||||
|
||||
function onEndCrop( coords, dimensions ) {
|
||||
$( 'x1' ).value = coords.x1;
|
||||
$( 'y1' ).value = coords.y1;
|
||||
$( 'x2' ).value = coords.x2;
|
||||
$( 'y2' ).value = coords.y2;
|
||||
$( 'width' ).value = dimensions.width;
|
||||
$( 'height' ).value = dimensions.height;
|
||||
$PR( 'x1' ).value = coords.x1;
|
||||
$PR( 'y1' ).value = coords.y1;
|
||||
$PR( 'x2' ).value = coords.x2;
|
||||
$PR( 'y2' ).value = coords.y2;
|
||||
$PR( 'width' ).value = dimensions.width;
|
||||
$PR( 'height' ).value = dimensions.height;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -55,9 +55,9 @@
|
|||
* @return void
|
||||
*/
|
||||
setImage: function( imgSrc, w, h ) {
|
||||
$( 'testImage' ).src = imgSrc;
|
||||
$( 'testImage' ).width = w;
|
||||
$( 'testImage' ).height = h;
|
||||
$PR( 'testImage' ).src = imgSrc;
|
||||
$PR( 'testImage' ).width = w;
|
||||
$PR( 'testImage' ).height = h;
|
||||
this.attachCropper();
|
||||
},
|
||||
|
||||
|
@ -98,12 +98,12 @@
|
|||
|
||||
// setup the callback function
|
||||
function onEndCrop( coords, dimensions ) {
|
||||
$( 'x1' ).value = coords.x1;
|
||||
$( 'y1' ).value = coords.y1;
|
||||
$( 'x2' ).value = coords.x2;
|
||||
$( 'y2' ).value = coords.y2;
|
||||
$( 'width' ).value = dimensions.width;
|
||||
$( 'height' ).value = dimensions.height;
|
||||
$PR( 'x1' ).value = coords.x1;
|
||||
$PR( 'y1' ).value = coords.y1;
|
||||
$PR( 'x2' ).value = coords.x2;
|
||||
$PR( 'y2' ).value = coords.y2;
|
||||
$PR( 'width' ).value = dimensions.width;
|
||||
$PR( 'height' ).value = dimensions.height;
|
||||
}
|
||||
|
||||
// basic example
|
||||
|
@ -112,9 +112,9 @@
|
|||
'load',
|
||||
function() {
|
||||
CropImageManager.init();
|
||||
Event.observe( $('removeCropper'), 'click', CropImageManager.removeCropper.bindAsEventListener( CropImageManager ), false );
|
||||
Event.observe( $('resetCropper'), 'click', CropImageManager.resetCropper.bindAsEventListener( CropImageManager ), false );
|
||||
Event.observe( $('imageChoice'), 'change', CropImageManager.onChange.bindAsEventListener( CropImageManager ), false );
|
||||
Event.observe( $PR('removeCropper'), 'click', CropImageManager.removeCropper.bindAsEventListener( CropImageManager ), false );
|
||||
Event.observe( $PR('resetCropper'), 'click', CropImageManager.resetCropper.bindAsEventListener( CropImageManager ), false );
|
||||
Event.observe( $PR('imageChoice'), 'change', CropImageManager.onChange.bindAsEventListener( CropImageManager ), false );
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -168,7 +168,7 @@
|
|||
|
||||
<p>
|
||||
<input type="button" id="removeCropper" value="Remove Cropper" />
|
||||
<input type="button" id="resetCropper" value="Reset Cropper" />
|
||||
<input type="button" id="resetCropper" value="Reset Cropper" />
|
||||
</p>
|
||||
|
||||
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
<script type="text/javascript" charset="utf-8">
|
||||
|
||||
function onEndCrop( coords, dimensions ) {
|
||||
$( 'x1' ).value = coords.x1;
|
||||
$( 'y1' ).value = coords.y1;
|
||||
$( 'x2' ).value = coords.x2;
|
||||
$( 'y2' ).value = coords.y2;
|
||||
$( 'width' ).value = dimensions.width;
|
||||
$( 'height' ).value = dimensions.height;
|
||||
$PR( 'x1' ).value = coords.x1;
|
||||
$PR( 'y1' ).value = coords.y1;
|
||||
$PR( 'x2' ).value = coords.x2;
|
||||
$PR( 'y2' ).value = coords.y2;
|
||||
$PR( 'width' ).value = dimensions.width;
|
||||
$PR( 'height' ).value = dimensions.height;
|
||||
}
|
||||
|
||||
// with a supplied ratio
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
<script type="text/javascript" charset="utf-8">
|
||||
|
||||
function onEndCrop( coords, dimensions ) {
|
||||
$( 'x1' ).value = coords.x1;
|
||||
$( 'y1' ).value = coords.y1;
|
||||
$( 'x2' ).value = coords.x2;
|
||||
$( 'y2' ).value = coords.y2;
|
||||
$( 'width' ).value = dimensions.width;
|
||||
$( 'height' ).value = dimensions.height;
|
||||
$PR( 'x1' ).value = coords.x1;
|
||||
$PR( 'y1' ).value = coords.y1;
|
||||
$PR( 'x2' ).value = coords.x2;
|
||||
$PR( 'y2' ).value = coords.y2;
|
||||
$PR( 'width' ).value = dimensions.width;
|
||||
$PR( 'height' ).value = dimensions.height;
|
||||
}
|
||||
|
||||
// example with minimum dimensions
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
<script type="text/javascript" charset="utf-8">
|
||||
|
||||
function onEndCrop( coords, dimensions ) {
|
||||
$( 'x1' ).value = coords.x1;
|
||||
$( 'y1' ).value = coords.y1;
|
||||
$( 'x2' ).value = coords.x2;
|
||||
$( 'y2' ).value = coords.y2;
|
||||
$( 'width' ).value = dimensions.width;
|
||||
$( 'height' ).value = dimensions.height;
|
||||
$PR( 'x1' ).value = coords.x1;
|
||||
$PR( 'y1' ).value = coords.y1;
|
||||
$PR( 'x2' ).value = coords.x2;
|
||||
$PR( 'y2' ).value = coords.y2;
|
||||
$PR( 'width' ).value = dimensions.width;
|
||||
$PR( 'height' ).value = dimensions.height;
|
||||
}
|
||||
|
||||
// example with minimum dimensions
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
<script type="text/javascript" charset="utf-8">
|
||||
|
||||
function onEndCrop( coords, dimensions ) {
|
||||
$( 'x1' ).value = coords.x1;
|
||||
$( 'y1' ).value = coords.y1;
|
||||
$( 'x2' ).value = coords.x2;
|
||||
$( 'y2' ).value = coords.y2;
|
||||
$( 'width' ).value = dimensions.width;
|
||||
$( 'height' ).value = dimensions.height;
|
||||
$PR( 'x1' ).value = coords.x1;
|
||||
$PR( 'y1' ).value = coords.y1;
|
||||
$PR( 'x2' ).value = coords.x2;
|
||||
$PR( 'y2' ).value = coords.y2;
|
||||
$PR( 'width' ).value = dimensions.width;
|
||||
$PR( 'height' ).value = dimensions.height;
|
||||
}
|
||||
|
||||
// example with a preview of crop results, must have minimumm dimensions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue