mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
030b55d750
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@42046 467b73ca-7a2a-4603-9d3b-597d59a354a9
35 lines
1.5 KiB
JavaScript
35 lines
1.5 KiB
JavaScript
/**
|
|
* @author Mateusz
|
|
*/
|
|
var DocumentBody = {
|
|
initialize: function() {
|
|
this.placeUI = DocumentBody.placeUI.bind(this);
|
|
this.placeUI();
|
|
Event.observe(window.top,'resize',DocumentBody.resizeIframe.bind(this));
|
|
},
|
|
|
|
resizeIframe: function(event) {
|
|
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 - 6 + 'px';
|
|
iframe.style.height = windowHeight + 10 + 'px';
|
|
this.placeUI();
|
|
},
|
|
|
|
placeUI: function() {
|
|
var iframe = window.top.document.getElementById('imageEditorIframe');
|
|
$('imageEditorContainer').style.height = Element.getDimensions(iframe).height - Element.getDimensions($('TopRuler')).height - Element.getDimensions($('MenuBar')).height - 32 + 'px';
|
|
$('imageEditorContainer').style.width = Element.getDimensions(iframe).width - Element.getDimensions($('LeftRuler')).width - 14 + 'px';
|
|
$('LeftRuler').style.height = $('imageEditorContainer').style.height;
|
|
$('TopLeft').style.width = Element.getDimensions($('MenuBar')).width -
|
|
Element.getDimensions($('TopRight')).width + 'px';
|
|
$('TopRight').style.left = Element.getDimensions($('TopLeft')).width + 'px';
|
|
|
|
},
|
|
|
|
onImageEditorScroll: function() {
|
|
imageBox.reCenterIndicator();
|
|
}
|
|
}
|