mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
a42fd1d2d2
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@42008 467b73ca-7a2a-4603-9d3b-597d59a354a9
25 lines
938 B
JavaScript
25 lines
938 B
JavaScript
/**
|
|
* @author Mateusz
|
|
*/
|
|
var DocumentBody = {
|
|
initialize: function() {
|
|
var windowHeight = Element.getDimensions(window.top.document.body).height;
|
|
Event.observe(window.top,'resize',DocumentBody.onWindowResize.bind(this));
|
|
Event.observe($('imageEditorContainer'),'scroll',DocumentBody.onImageEditorScroll.bind(this));
|
|
$('imageEditorContainer').style.height = windowHeight - 109 + 'px';
|
|
},
|
|
|
|
onWindowResize: function() {
|
|
var windowWidth = Element.getDimensions(window.top.document.body).width;
|
|
var windowHeight = Element.getDimensions(window.top.document.body).height;
|
|
iframe = window.top.document.getElementById('imageEditorIframe');
|
|
iframe.style.width = windowWidth - 30 + 'px';
|
|
iframe.style.height = windowHeight + 10 + 'px';
|
|
$('imageEditorContainer').style.height = windowHeight - 105 + 'px';
|
|
},
|
|
|
|
onImageEditorScroll: function() {
|
|
imageBox.reCenterIndicator();
|
|
}
|
|
}
|