mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX: didn't work on IE
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@69684 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f2f9a35508
commit
fd5884dbac
@ -18,11 +18,16 @@ TinyMCEImageEnhancement.prototype = {
|
|||||||
Event.observe($('FolderCancel'),'click',this.onFolderCancel.bind(this));
|
Event.observe($('FolderCancel'),'click',this.onFolderCancel.bind(this));
|
||||||
Event.observe($('UploadFiles'),'click',this.onUpload.bind(this));
|
Event.observe($('UploadFiles'),'click',this.onUpload.bind(this));
|
||||||
|
|
||||||
// Image alignment/style changing link
|
jQuery("#ImageAligmentStyle a").click(function() {
|
||||||
Event.observe($('ImageAligmentStyle_left'),'click',this.onChangeImageAlignmentStyle.bind(this));
|
id = jQuery(this).attr('id');
|
||||||
Event.observe($('ImageAligmentStyle_leftAlone'),'click',this.onChangeImageAlignmentStyle.bind(this));
|
jQuery(this).siblings().removeClass('selected');
|
||||||
Event.observe($('ImageAligmentStyle_right'),'click',this.onChangeImageAlignmentStyle.bind(this));
|
jQuery(this).addClass('selected');
|
||||||
Event.observe($('ImageAligmentStyle_center'),'click',this.onChangeImageAlignmentStyle.bind(this));
|
// get alignment from id, e.g. ImageAlignment_center -> center
|
||||||
|
aligment = id.split('_')[1];
|
||||||
|
$('Form_EditorToolbarImageForm_CSSClass').value = aligment;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -47,17 +52,6 @@ TinyMCEImageEnhancement.prototype = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onChangeImageAlignmentStyle: function(event) {
|
|
||||||
Event.stop(event);
|
|
||||||
id = event.target.id ;
|
|
||||||
jQuery(event.target).siblings().removeClass('selected');
|
|
||||||
jQuery(event.target).addClass('selected');
|
|
||||||
|
|
||||||
// get alignment from id, e.g. ImageAlignment_center -> center
|
|
||||||
aligment = id.split('_')[1];
|
|
||||||
$('Form_EditorToolbarImageForm_CSSClass').value = aligment;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when user clicks "add folder" anchor.
|
* Called when user clicks "add folder" anchor.
|
||||||
|
Loading…
Reference in New Issue
Block a user