BUGFIX Added base javascript requirements to SiteTree->getCMSFields() to avoid it failing when used outside of CMS context (e.g. in our frameworktest project)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77093 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-05-18 20:55:10 +00:00
parent 619c570801
commit 2dd58c8a66

View File

@ -1118,6 +1118,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
*/ */
function getCMSFields() { function getCMSFields() {
require_once("forms/Form.php"); require_once("forms/Form.php");
Requirements::javascript(THIRDPARTY_DIR . "/prototype.js");
Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js");
Requirements::javascript(THIRDPARTY_DIR . "/behaviour_improvements.js");
Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js"); Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js");
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang'); Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
Requirements::javascript(SAPPHIRE_DIR . '/javascript/UpdateURL.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/UpdateURL.js');