2007-09-15 03:08:25 +02:00
|
|
|
var ImageEditorActivator = {
|
|
|
|
initialize: function() {
|
|
|
|
this.onOpen = ImageEditorActivator.onOpen.bind(this);
|
|
|
|
},
|
|
|
|
|
|
|
|
onOpen: function() {
|
|
|
|
iframe = window.top.document.getElementById('imageEditorIframe');
|
|
|
|
if(iframe != null) {
|
|
|
|
iframe.parentNode.removeChild(iframe);
|
|
|
|
}
|
2007-09-15 03:19:43 +02:00
|
|
|
iframe = window.top.document.createElement('iframe');
|
2007-09-15 03:08:25 +02:00
|
|
|
fileToEdit = $('ImageEditorActivator').firstChild.src;
|
2007-09-15 03:09:00 +02:00
|
|
|
iframe.setAttribute("src","admin/ImageEditor?fileToEdit=" + fileToEdit);
|
2007-09-15 03:08:25 +02:00
|
|
|
iframe.id = 'imageEditorIframe';
|
|
|
|
iframe.style.width = "97%";
|
|
|
|
iframe.style.height = "300%";
|
|
|
|
iframe.style.zIndex = "1000";
|
|
|
|
iframe.style.position = "absolute";
|
|
|
|
iframe.style.top = "-2%";
|
|
|
|
iframe.style.left = "1.5%";
|
|
|
|
window.top.document.body.appendChild(iframe);
|
2007-09-15 03:19:43 +02:00
|
|
|
|
|
|
|
|
2007-09-15 03:08:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|