BUGFIX Added missing Requirements to TreeDropdownField->Field() and TreeMultiSelect->Field() (merged and modified from r98852)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@98861 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-02-12 02:39:07 +00:00
parent d552becce8
commit 13d744eeb3
2 changed files with 10 additions and 0 deletions

View File

@ -74,6 +74,8 @@ class TreeDropdownField extends FormField {
Requirements::javascript(SAPPHIRE_DIR . "/javascript/tree/tree.js");
Requirements::css(SAPPHIRE_DIR . "/javascript/tree/tree.css");
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
// needed for errorMessage()
Requirements::javascript(SAPPHIRE_DIR . '/javascript/LeftAndMain.js');
Requirements::javascript(SAPPHIRE_DIR . "/javascript/TreeSelectorField.js");
if($this->Value() && $record = $this->objectForKey($this->Value())) {

View File

@ -29,7 +29,15 @@ class TreeMultiselectField extends TreeDropdownField {
function Field() {
$value = '';
$itemList = '';
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/prototype.js');
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/behaviour.js');
Requirements::css(SAPPHIRE_DIR . '/css/TreeDropdownField.css');
Requirements::javascript(SAPPHIRE_DIR . "/javascript/tree/tree.js");
Requirements::css(SAPPHIRE_DIR . "/javascript/tree/tree.css");
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
// needed for errorMessage()
Requirements::javascript(SAPPHIRE_DIR . '/javascript/LeftAndMain.js');
Requirements::javascript(SAPPHIRE_DIR . "/javascript/TreeSelectorField.js");
$items = $this->getItems();