mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +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($('UploadFiles'),'click',this.onUpload.bind(this));
|
||||
|
||||
// Image alignment/style changing link
|
||||
Event.observe($('ImageAligmentStyle_left'),'click',this.onChangeImageAlignmentStyle.bind(this));
|
||||
Event.observe($('ImageAligmentStyle_leftAlone'),'click',this.onChangeImageAlignmentStyle.bind(this));
|
||||
Event.observe($('ImageAligmentStyle_right'),'click',this.onChangeImageAlignmentStyle.bind(this));
|
||||
Event.observe($('ImageAligmentStyle_center'),'click',this.onChangeImageAlignmentStyle.bind(this));
|
||||
jQuery("#ImageAligmentStyle a").click(function() {
|
||||
id = jQuery(this).attr('id');
|
||||
jQuery(this).siblings().removeClass('selected');
|
||||
jQuery(this).addClass('selected');
|
||||
// get alignment from id, e.g. ImageAlignment_center -> center
|
||||
aligment = id.split('_')[1];
|
||||
$('Form_EditorToolbarImageForm_CSSClass').value = aligment;
|
||||
|
||||
return false;
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@ -48,17 +53,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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user