From 07547cc5dc7b1a28d85b36e72362b40c59483e5e Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Wed, 27 Jan 2010 03:08:19 +0000 Subject: [PATCH] BUGFIX: Fixed CMS Editor loading in AssetAdmin git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97638 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/HtmlEditorField.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/HtmlEditorField.js b/javascript/HtmlEditorField.js index 5cccd0e05..73c9f8408 100644 --- a/javascript/HtmlEditorField.js +++ b/javascript/HtmlEditorField.js @@ -11,7 +11,7 @@ /** * On page refresh load the initial images (in root) */ - if($("#FolderImages").length > 0) loadImages(); + if($("#FolderImages").length > 0 && $("body.CMSMain").length > 0) loadImages(); /** * Show / Hide the Upload Form @@ -55,7 +55,7 @@ * * */ - function loadImages(sel) { + function loadImages() { $.get('admin/EditorToolbar/ImageForm', { action_callfieldmethod: "1", fieldName: "FolderImages",