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:
Ingo Schommer 2007-09-15 21:54:51 +00:00
parent abca2d257a
commit 5e4b0852c4
5 changed files with 6 additions and 8 deletions

View File

@ -90,7 +90,6 @@
#cropBox #cropBox
{ {
position: absolute; position: absolute;
background-image: url("cms/images/ImageEditor/white.gif");
display: inline; display: inline;
} }
.greyBox .greyBox

View File

@ -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();
@ -155,6 +156,7 @@ var Crop = {
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) {

View File

@ -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) {

View File

@ -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();
}, },

View File

@ -37,7 +37,6 @@
<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>