mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
mujma: BUGFIX: No longer croping under IE6 selects all image.
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@41961 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
abca2d257a
commit
5e4b0852c4
@ -90,7 +90,6 @@
|
|||||||
#cropBox
|
#cropBox
|
||||||
{
|
{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-image: url("cms/images/ImageEditor/white.gif");
|
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
.greyBox
|
.greyBox
|
||||||
|
@ -114,6 +114,7 @@ var Crop = {
|
|||||||
alert('Crop area too small');
|
alert('Crop area too small');
|
||||||
}
|
}
|
||||||
this.disable();
|
this.disable();
|
||||||
|
$('image').style.visibility = 'visible';//hack for IE for not selecting image during crop
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -128,9 +129,9 @@ var Crop = {
|
|||||||
Event.observe('cropOk','click',this.onCropOk);
|
Event.observe('cropOk','click',this.onCropOk);
|
||||||
Event.observe('cropCancel','click',this.onCropCancel);
|
Event.observe('cropCancel','click',this.onCropCancel);
|
||||||
},
|
},
|
||||||
|
|
||||||
onCropStart: function() {
|
onCropStart: function() {
|
||||||
if(this.isEnabled) {
|
if(this.isEnabled) {
|
||||||
|
$('image').style.visibility = "hidden";//hack for IE for not selecting image during crop
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
Element.show($('cropOk'),$('cropCancel'));
|
Element.show($('cropOk'),$('cropCancel'));
|
||||||
imageHistory.disable();
|
imageHistory.disable();
|
||||||
@ -154,7 +155,8 @@ var Crop = {
|
|||||||
imageHistory.enable();
|
imageHistory.enable();
|
||||||
effects.enableRotate();
|
effects.enableRotate();
|
||||||
this.enable();
|
this.enable();
|
||||||
}
|
}
|
||||||
|
$('image').style.visibility = 'visible';//hack for IE for not selecting image during crop
|
||||||
},
|
},
|
||||||
|
|
||||||
setVisible: function(setVisible) {
|
setVisible: function(setVisible) {
|
||||||
|
@ -24,8 +24,7 @@ var ImageToResize = {
|
|||||||
|
|
||||||
onImageLoad: function(event) {
|
onImageLoad: function(event) {
|
||||||
if(this.imageToResize.width != 0 && this.imageToResize.height != 0) {
|
if(this.imageToResize.width != 0 && this.imageToResize.height != 0) {
|
||||||
//$('imageContainer').style.width = this.imageToResize.width + 'px';
|
$('imageContainer').style.backgroundImage = 'url("' + $('image').src + '")';
|
||||||
//$('imageContainer').style.height = this.imageToResize.height + 'px';
|
|
||||||
imageBox.hideIndicator();
|
imageBox.hideIndicator();
|
||||||
Element.show($('imageContainer'),$('image'));
|
Element.show($('imageContainer'),$('image'));
|
||||||
if(resize.imageContainerResize.originalHeight == 0 && resize.imageContainerResize.originalWidth == 0) {
|
if(resize.imageContainerResize.originalHeight == 0 && resize.imageContainerResize.originalWidth == 0) {
|
||||||
|
@ -18,7 +18,6 @@ ImageHistory = {
|
|||||||
this.enable = ImageHistory.enable.bind(this);
|
this.enable = ImageHistory.enable.bind(this);
|
||||||
this.disable = ImageHistory.disable.bind(this);
|
this.disable = ImageHistory.disable.bind(this);
|
||||||
this.clear = ImageHistory.clear.bind(this);
|
this.clear = ImageHistory.clear.bind(this);
|
||||||
this.fakeImage = Positioning.addBehaviour($('fakeImg'));
|
|
||||||
this.image = Positioning.addBehaviour($('image'));
|
this.image = Positioning.addBehaviour($('image'));
|
||||||
this.size = new Array();
|
this.size = new Array();
|
||||||
},
|
},
|
||||||
|
@ -36,8 +36,7 @@
|
|||||||
<div id="rightGreyBox" class="greyBox"></div>
|
<div id="rightGreyBox" class="greyBox"></div>
|
||||||
<div id="upperGreyBox" class="greyBox"></div>
|
<div id="upperGreyBox" class="greyBox"></div>
|
||||||
<div id="lowerGreyBox" class="greyBox"></div>
|
<div id="lowerGreyBox" class="greyBox"></div>
|
||||||
<img id="image" src="#" alt=""/>
|
<img id="image" src="#" alt=""/>
|
||||||
<img id="fakeImg" src="#" alt=""/>
|
|
||||||
<div id="cropBox"></div>
|
<div id="cropBox"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user