Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

How to close a window?


Go to End


1287 Views

Avatar
cbartgu

Community Member, 12 Posts

6 August 2009 at 4:20am

Anyone know how to close a window in the admin, I made my own image editor so when you click on edit image in the image properties it loads up and works but I cannot get the opened window to close again,

below is the edited code to get the window to open, then I changed imageeditor.php for mine,

//"<img id='thumbnailImage' src='{$thumbnail}?r=" . rand(1,100000) . "' alt='{$childData->Name}' />" )
'<a id="ImageEditorActivator" href="javascript: void(0)">' . "<img id='thumbnailImage' src='{$thumbnail}?r=" . rand(1,100000) . "' alt='{$childData->Name}' /><p>"._t('AssetTableField.EDITIMAGE', 'Edit this image')."</p>" . '</a>' .
'<script type="text/javascript" src="cms/javascript/ImageEditor/Activator.js"></script><script type="text/javascript">var imageActivator = new ImageEditor.Activator.initialize();Event.observe("ImageEditorActivator","click",imageActivator.onOpen);</script>')