Merge pull request #131 from thats4shaw/bugfix/add-assets-to-left-and-main

Add css and js to left and main
This commit is contained in:
Guy Marriott 2018-12-19 21:56:35 +13:00 committed by GitHub
commit d7762a1e72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 6 deletions

9
_config/config.yml Normal file
View File

@ -0,0 +1,9 @@
---
Name: tagfieldrequirements
---
SilverStripe\Admin\LeftAndMain:
extra_requirements_javascript:
- 'silverstripe/tagfield:client/dist/js/bundle.js'
extra_requirements_css:
- 'silverstripe/tagfield:client/dist/styles/bundle.css'

View File

@ -144,9 +144,6 @@ class StringTagField extends DropdownField
public function Field($properties = [])
{
Requirements::css('silverstripe/tagfield:client/dist/styles/bundle.css');
Requirements::javascript('silverstripe/tagfield:client/dist/js/bundle.js');
$this->addExtraClass('ss-tag-field');
return $this

View File

@ -200,9 +200,6 @@ class TagField extends DropdownField
*/
public function Field($properties = [])
{
Requirements::css('silverstripe/tagfield:client/dist/styles/bundle.css');
Requirements::javascript('silverstripe/tagfield:client/dist/js/bundle.js');
$this->addExtraClass('ss-tag-field');
return $this->customise($properties)->renderWith(self::class);