Skip to content

Commit

Permalink
Add css and js to left and main
Browse files Browse the repository at this point in the history
* Add yaml file
* Remove requirement calls from field constructors
  • Loading branch information
Hayden Shaw committed Dec 19, 2018
1 parent feff8b5 commit fd06a8d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 9 additions & 0 deletions _config/config.yml
Original file line number Diff line number Diff line change
@@ -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'
3 changes: 0 additions & 3 deletions src/StringTagField.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ public function setRecord(DataObject $record)

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
Expand Down
3 changes: 0 additions & 3 deletions src/TagField.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,6 @@ public function setSourceList($sourceList)
*/
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);
Expand Down

0 comments on commit fd06a8d

Please # to comment.