mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Moving FileIFrameField javascript requirements from __construct() into Field() - otherwise they will be cleared when used in a javascript popup
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77094 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2dd58c8a66
commit
eeef1f6885
@ -17,23 +17,15 @@ class FileIFrameField extends FileField {
|
||||
);
|
||||
|
||||
/**
|
||||
* @see FileField::__construct()
|
||||
* @return string
|
||||
*/
|
||||
public function __construct($name, $title = null, $value = null, $form = null, $rightTitle = null, $folderName = null) {
|
||||
public function Field() {
|
||||
Requirements::css(THIRDPARTY_DIR . '/jquery/themes/default/ui.all.css');
|
||||
|
||||
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/jquery/ui/ui.core.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/jquery/ui/ui.dialog.js');
|
||||
|
||||
parent::__construct($name, $title, $value, $form, $rightTitle, $folderName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function Field() {
|
||||
if($this->form->getRecord() && $this->form->getRecord()->exists()) {
|
||||
return $this->createTag (
|
||||
'iframe',
|
||||
|
Loading…
x
Reference in New Issue
Block a user