mirror of
https://github.com/silverstripe/silverstripe-tagfield
synced 2024-10-22 11:05:32 +02:00
Add css and js to left and main
* Add yaml file * Remove requirement calls from field constructors
This commit is contained in:
parent
feff8b52f1
commit
fd06a8da5f
9
_config/config.yml
Normal file
9
_config/config.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
Name: tagfield
|
||||
---
|
||||
|
||||
SilverStripe\Admin\LeftAndMain:
|
||||
extra_requirements_javascript:
|
||||
- 'silverstripe/tagfield:client/dist/js/bundle.js'
|
||||
extra_requirements_css:
|
||||
- 'silverstripe/tagfield:client/dist/styles/bundle.css'
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user