diff --git a/Forms/AssetField.php b/Forms/AssetField.php index eb4a64a1f..662d9b2b1 100644 --- a/Forms/AssetField.php +++ b/Forms/AssetField.php @@ -501,27 +501,6 @@ class AssetField extends FileField { } public function Field($properties = array()) { - Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js'); - Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js'); - Requirements::javascript(THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js'); - Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/ssui.core.js'); - Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/client/lang'); - - Requirements::combine_files('uploadfield.js', array( - // @todo jquery templates is a project no longer maintained and should be retired at some point. - THIRDPARTY_DIR . '/javascript-templates/tmpl.js', - THIRDPARTY_DIR . '/javascript-loadimage/load-image.js', - THIRDPARTY_DIR . '/jquery-fileupload/jquery.iframe-transport.js', - THIRDPARTY_DIR . '/jquery-fileupload/cors/jquery.xdr-transport.js', - THIRDPARTY_DIR . '/jquery-fileupload/jquery.fileupload.js', - THIRDPARTY_DIR . '/jquery-fileupload/jquery.fileupload-ui.js', - FRAMEWORK_DIR . '/client/dist/js/UploadField_uploadtemplate.js', - FRAMEWORK_DIR . '/client/dist/js/UploadField_downloadtemplate.js', - FRAMEWORK_DIR . '/client/dist/js/UploadField.js', - )); - Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css'); // TODO hmmm, remove it? - Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/UploadField.css'); - // Calculated config as per jquery.fileupload-ui.js $config = array( 'allowedMaxFileNumber' => 1, // Only one file allowed for AssetField diff --git a/Forms/CheckboxSetField.php b/Forms/CheckboxSetField.php index 1225a957b..d3952ea58 100644 --- a/Forms/CheckboxSetField.php +++ b/Forms/CheckboxSetField.php @@ -54,8 +54,6 @@ class CheckboxSetField extends MultiSelectField { * @return DBHTMLText */ public function Field($properties = array()) { - Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/CheckboxSetField.css'); - $properties = array_merge($properties, array( 'Options' => $this->getOptions() )); diff --git a/Forms/ConfirmedPasswordField.php b/Forms/ConfirmedPasswordField.php index 2dd55941a..0a4868b52 100644 --- a/Forms/ConfirmedPasswordField.php +++ b/Forms/ConfirmedPasswordField.php @@ -172,10 +172,6 @@ class ConfirmedPasswordField extends FormField { * @return string */ public function Field($properties = array()) { - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js'); - Requirements::javascript(FRAMEWORK_DIR . '/client/dist/js/ConfirmedPasswordField.js'); - Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/ConfirmedPasswordField.css'); - $content = ''; if($this->showOnClick) { diff --git a/Forms/DateField_View_JQuery.php b/Forms/DateField_View_JQuery.php index e4e559533..c99002b92 100644 --- a/Forms/DateField_View_JQuery.php +++ b/Forms/DateField_View_JQuery.php @@ -85,16 +85,10 @@ class DateField_View_JQuery extends Object public function onAfterRender($html) { if ($this->getField()->getConfig('showcalendar')) { - Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js'); - Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css'); - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-ui/jquery-ui.js'); - // Include language files (if required) if ($this->jqueryLocaleFile) { Requirements::javascript($this->jqueryLocaleFile); } - - Requirements::javascript(FRAMEWORK_DIR . "/client/dist/js/DateField.js"); } return $html; diff --git a/Forms/DatetimeField.php b/Forms/DatetimeField.php index 619e57f50..992869fa6 100644 --- a/Forms/DatetimeField.php +++ b/Forms/DatetimeField.php @@ -118,7 +118,6 @@ class DatetimeField extends FormField { * @return string */ public function Field($properties = array()) { - Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/DatetimeField.css'); return parent::Field($properties); } diff --git a/Forms/GridField/GridField.php b/Forms/GridField/GridField.php index 911746827..4365303d0 100644 --- a/Forms/GridField/GridField.php +++ b/Forms/GridField/GridField.php @@ -306,16 +306,6 @@ class GridField extends FormField { * @return string */ public function FieldHolder($properties = array()) { - Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css'); - Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/GridField.css'); - - Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js'); - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-ui/jquery-ui.js'); - Requirements::javascript(FRAMEWORK_DIR . '/client/dist/js/i18n.js'); - Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/client/lang'); - Requirements::javascript(THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js'); - Requirements::javascript(FRAMEWORK_DIR . '/client/dist/js/GridField.js'); - $columns = $this->getColumns(); $list = $this->getManipulatedList(); diff --git a/Forms/HTMLEditor/TinyMCEConfig.php b/Forms/HTMLEditor/TinyMCEConfig.php index 6333756a4..d9414e8d8 100644 --- a/Forms/HTMLEditor/TinyMCEConfig.php +++ b/Forms/HTMLEditor/TinyMCEConfig.php @@ -464,16 +464,7 @@ class TinyMCEConfig extends HTMLEditorConfig { } public function init() { - // These should be 'provides' by bundle-dist.js - Requirements::javascript(FRAMEWORK_DIR . "/thirdparty/jquery/jquery.js"); - Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js'); - Requirements::javascript(THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js'); - Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/ssui.core.js'); - // include TinyMCE Javascript Requirements::javascript($this->getScriptURL()); - Requirements::javascript(FRAMEWORK_DIR ."/client/dist/js/HtmlEditorField.js"); - - Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css'); } } diff --git a/Forms/InlineFormAction.php b/Forms/InlineFormAction.php index 01fe4efc6..6f0e3c7b1 100644 --- a/Forms/InlineFormAction.php +++ b/Forms/InlineFormAction.php @@ -6,14 +6,11 @@ use SilverStripe\View\Requirements; /** * Render a button that will submit the form its contained in through ajax. - * If you want to add custom behaviour, please set {@link includeDefaultJS()} to FALSE * * @see framework/client/dist/js/InlineFormAction.js */ class InlineFormAction extends FormField { - protected $includeDefaultJS = true; - /** * Create a new action button. * @@ -35,13 +32,6 @@ class InlineFormAction extends FormField { * @return string */ public function Field($properties = array()) { - if($this->includeDefaultJS) { - Requirements::javascriptTemplate( - FRAMEWORK_DIR . '/client/dist/js/InlineFormAction.js', - array('ID'=>$this->ID()) - ); - } - return FormField::create_tag('input', array( 'type' => 'submit', 'name' => sprintf('action_%s', $this->getName()), @@ -54,14 +44,4 @@ class InlineFormAction extends FormField { public function Title() { return false; } - - /** - * Optionally disable the default javascript include (framework/client/dist/js/InlineFormAction.js), - * which routes to an "admin-custom"-URL. - * - * @param $bool boolean - */ - public function includeDefaultJS($bool) { - $this->includeDefaultJS = (bool)$bool; - } } diff --git a/Forms/MemberDatetimeOptionsetField.php b/Forms/MemberDatetimeOptionsetField.php index 315723651..57ad95a88 100644 --- a/Forms/MemberDatetimeOptionsetField.php +++ b/Forms/MemberDatetimeOptionsetField.php @@ -25,7 +25,6 @@ class MemberDatetimeOptionsetField extends OptionsetField { private $descriptionTemplate = ''; public function Field($properties = array()) { - Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/MemberDatetimeOptionsetField.js'); $options = array(); $odd = false; diff --git a/Forms/SelectionGroup.php b/Forms/SelectionGroup.php index addd9f5fd..b9df5d233 100644 --- a/Forms/SelectionGroup.php +++ b/Forms/SelectionGroup.php @@ -118,10 +118,6 @@ class SelectionGroup extends CompositeField { } public function FieldHolder($properties = array()) { - Requirements::javascript(THIRDPARTY_DIR .'/jquery/jquery.js'); - Requirements::javascript(FRAMEWORK_DIR . '/client/dist/js/SelectionGroup.js'); - Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/SelectionGroup.css'); - return parent::FieldHolder($properties); } } diff --git a/Forms/TabSet.php b/Forms/TabSet.php index 5e9da7190..b38285ba9 100644 --- a/Forms/TabSet.php +++ b/Forms/TabSet.php @@ -124,16 +124,6 @@ class TabSet extends CompositeField { * @return DBHTMLText|string */ public function FieldHolder($properties = array()) { - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js'); - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-ui/jquery-ui.js'); - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-cookie/jquery.cookie.js'); - - Requirements::css(FRAMEWORK_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery-ui.css'); - - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); - - Requirements::javascript(FRAMEWORK_DIR . '/client/dist/js/TabSet.js'); - $obj = $properties ? $this->customise($properties) : $this; return $obj->renderWith($this->getTemplates()); diff --git a/Forms/ToggleCompositeField.php b/Forms/ToggleCompositeField.php index ca3160ec1..8970fd3b2 100644 --- a/Forms/ToggleCompositeField.php +++ b/Forms/ToggleCompositeField.php @@ -38,13 +38,6 @@ class ToggleCompositeField extends CompositeField { * @return string */ public function FieldHolder($properties = array()) { - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js'); - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-ui/jquery-ui.js'); - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); - Requirements::javascript(FRAMEWORK_DIR . '/client/dist/js/ToggleCompositeField.js'); - - Requirements::css(FRAMEWORK_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery-ui.css'); - $context = $this; if(count($properties)) { diff --git a/Forms/TreeDropdownField.php b/Forms/TreeDropdownField.php index 98141a859..b3caf217e 100644 --- a/Forms/TreeDropdownField.php +++ b/Forms/TreeDropdownField.php @@ -224,16 +224,6 @@ class TreeDropdownField extends FormField { * @return string */ public function Field($properties = array()) { - Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/client/lang'); - - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js'); - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jstree/jquery.jstree.js'); - Requirements::javascript(FRAMEWORK_DIR . '/client/dist/js/TreeDropdownField.js'); - - Requirements::css(FRAMEWORK_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery-ui.css'); - Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/TreeDropdownField.css'); - $item = DataObject::singleton($this->sourceObject); $emptyTitle = _t( 'DropdownField.CHOOSE_MODEL', diff --git a/Forms/TreeMultiselectField.php b/Forms/TreeMultiselectField.php index d2835dc91..31194aaa9 100644 --- a/Forms/TreeMultiselectField.php +++ b/Forms/TreeMultiselectField.php @@ -104,16 +104,6 @@ class TreeMultiselectField extends TreeDropdownField { * @return DBHTMLText */ public function Field($properties = array()) { - Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/client/lang'); - - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js'); - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); - Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jstree/jquery.jstree.js'); - Requirements::javascript(FRAMEWORK_DIR . '/client/dist/js/TreeDropdownField.js'); - - Requirements::css(FRAMEWORK_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery-ui.css'); - Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/TreeDropdownField.css'); - $value = ''; $titleArray = array(); $idArray = array(); diff --git a/Forms/UploadField.php b/Forms/UploadField.php index 7e764deb6..77e61dfa1 100644 --- a/Forms/UploadField.php +++ b/Forms/UploadField.php @@ -956,27 +956,6 @@ class UploadField extends FileField { } public function Field($properties = array()) { - Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js'); - Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js'); - Requirements::javascript(THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js'); - Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/ssui.core.js'); - Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/client/lang'); - - Requirements::combine_files('uploadfield.js', array( - // @todo jquery templates is a project no longer maintained and should be retired at some point. - THIRDPARTY_DIR . '/javascript-templates/tmpl.js', - THIRDPARTY_DIR . '/javascript-loadimage/load-image.js', - THIRDPARTY_DIR . '/jquery-fileupload/jquery.iframe-transport.js', - THIRDPARTY_DIR . '/jquery-fileupload/cors/jquery.xdr-transport.js', - THIRDPARTY_DIR . '/jquery-fileupload/jquery.fileupload.js', - THIRDPARTY_DIR . '/jquery-fileupload/jquery.fileupload-ui.js', - FRAMEWORK_DIR . '/client/dist/js/UploadField_uploadtemplate.js', - FRAMEWORK_DIR . '/client/dist/js/UploadField_downloadtemplate.js', - FRAMEWORK_DIR . '/client/dist/js/UploadField.js', - )); - Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css'); // TODO hmmm, remove it? - Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/UploadField.css'); - // Calculated config as per jquery.fileupload-ui.js $allowedMaxFileNumber = $this->getAllowedMaxFileNumber(); $config = array( diff --git a/Security/PermissionCheckboxSetField.php b/Security/PermissionCheckboxSetField.php index de59dbe7d..d92aae2b8 100644 --- a/Security/PermissionCheckboxSetField.php +++ b/Security/PermissionCheckboxSetField.php @@ -84,9 +84,6 @@ class PermissionCheckboxSetField extends FormField { * @return string */ public function Field($properties = array()) { - Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/CheckboxSetField.css'); - Requirements::javascript(FRAMEWORK_DIR . '/client/dist/js/PermissionCheckboxSetField.js'); - $uninheritedCodes = array(); $inheritedCodes = array(); $records = ($this->records) ? $this->records : new ArrayList();