#1607 - Make image editor findable

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@44445 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-11-07 04:50:09 +00:00
parent 02c7f0e993
commit 3d7342bc4c
5 changed files with 13 additions and 7 deletions

View File

@ -59,6 +59,7 @@ abstract class LeftAndMain extends Controller {
Requirements::javascript('jsparty/layout_helpers.js'); Requirements::javascript('jsparty/layout_helpers.js');
Requirements::javascript(MCE_ROOT . 'tiny_mce_src.js'); Requirements::javascript(MCE_ROOT . 'tiny_mce_src.js');
Requirements::javascript('cms/javascript/ImageEditor/Activator.js');
Requirements::javascript('jsparty/tiny_mce_improvements.js'); Requirements::javascript('jsparty/tiny_mce_improvements.js');
Requirements::javascript('jsparty/scriptaculous/effects.js'); Requirements::javascript('jsparty/scriptaculous/effects.js');

View File

@ -70,8 +70,8 @@ class ThumbnailStripField extends FormField {
$result .= $result .=
'<li>' . '<li>' .
'<a href=" ' . $image->Filename . '">' . '<a href=" ' . $image->Filename . '?r=' . rand(1,100000) . '">' .
'<img class="destwidth=' . round($width) . ',destheight=' . round($height) . '" src="'. $thumbnail->URL .'" alt="' . $image->Title . '" title="' . $image->Title . '" />' . '<img class="destwidth=' . round($width) . ',destheight=' . round($height) . '" src="'. $thumbnail->URL . '" alt="' . $image->Title . '" title="' . $image->Title . '" />' .
'</a>' . '</a>' .
'</li>'; '</li>';
} }

View File

@ -486,3 +486,9 @@ Behaviour.register({
} }
} }
}); });
function refreshAsset() {
frames[0].location.reload(0);
frames[1].location.reload(1);
}

View File

@ -30,8 +30,7 @@ ImageEditor.Main = {
}, },
onCloseClick: function() { onCloseClick: function() {
window.parent.frames[0].location.reload(1); window.parent.imageEditorClosed();
window.parent.frames[1].location.reload(1);
ImageEditor.imageTransformation.close(ImageEditor.Main.onCloseCallback.bind(this)); ImageEditor.imageTransformation.close(ImageEditor.Main.onCloseCallback.bind(this));
}, },