mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
[FIX] Assets Path
This commit is contained in:
parent
30ee3083b8
commit
25cdb138a8
@ -31,8 +31,8 @@ Dynamic\FlexSlider\Model\SlideImage:
|
|||||||
SilverStripe\Core\Injector\Injector:
|
SilverStripe\Core\Injector\Injector:
|
||||||
#SilverStripe\UserForms\Model\UserDefinedForm:
|
#SilverStripe\UserForms\Model\UserDefinedForm:
|
||||||
# class: A2nt\CMSNiceties\Extensions\UserDefinedForm_HiddenClass
|
# class: A2nt\CMSNiceties\Extensions\UserDefinedForm_HiddenClass
|
||||||
#Sheadawson\Linkable\Forms\EmbeddedObjectField:
|
Sheadawson\Linkable\Forms\EmbeddedObjectField:
|
||||||
# class: A2nt\CMSNiceties\Extensions\EmbedObjectField
|
class: A2nt\CMSNiceties\Extensions\EmbedObjectField
|
||||||
SilverStripe\Forms\CompositeField:
|
SilverStripe\Forms\CompositeField:
|
||||||
class: A2nt\CMSNiceties\Extensions\CompositeFieldExtension
|
class: A2nt\CMSNiceties\Extensions\CompositeFieldExtension
|
||||||
SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor:
|
SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor:
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
namespace A2nt\CMSNiceties\Extensions;
|
namespace A2nt\CMSNiceties\Extensions;
|
||||||
|
|
||||||
use gorriecoe\Embed\Extensions\Embeddable;
|
use Sheadawson\Linkable\Forms\EmbeddedObjectField;
|
||||||
use SilverStripe\Forms\CheckboxField;
|
use SilverStripe\Forms\CheckboxField;
|
||||||
use SilverStripe\Forms\CompositeField;
|
use SilverStripe\Forms\CompositeField;
|
||||||
use SilverStripe\Forms\LiteralField;
|
use SilverStripe\Forms\LiteralField;
|
||||||
use SilverStripe\ORM\FieldType\DBHTMLText;
|
use SilverStripe\ORM\FieldType\DBHTMLText;
|
||||||
|
|
||||||
class EmbedObjectField extends Embeddable
|
class EmbedObjectField extends EmbeddedObjectField
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* List the allowed included embed types. If null all are allowed.
|
* List the allowed included embed types. If null all are allowed.
|
||||||
@ -30,10 +29,9 @@ class EmbedObjectField extends Embeddable
|
|||||||
* @param array $properties
|
* @param array $properties
|
||||||
* @return mixed|DBHTMLText
|
* @return mixed|DBHTMLText
|
||||||
*/
|
*/
|
||||||
/*public function FieldHolder($properties = [])
|
public function FieldHolder($properties = [])
|
||||||
{
|
{
|
||||||
$name = $this->getName();
|
$name = $this->getName();
|
||||||
|
|
||||||
$fields = [
|
$fields = [
|
||||||
CheckboxField::create(
|
CheckboxField::create(
|
||||||
$name . '[autoplay]',
|
$name . '[autoplay]',
|
||||||
@ -57,5 +55,5 @@ class EmbedObjectField extends Embeddable
|
|||||||
parent::FieldHolder($properties)
|
parent::FieldHolder($properties)
|
||||||
)
|
)
|
||||||
], $fields));
|
], $fields));
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,6 +97,7 @@ class EmbeddedObjectExtension extends DataExtension
|
|||||||
|
|
||||||
if ($this->owner->getField('Autoplay')) {
|
if ($this->owner->getField('Autoplay')) {
|
||||||
$params[] = 'autoplay=1';
|
$params[] = 'autoplay=1';
|
||||||
|
$params[] = 'muted=1';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->owner->getField('Loop')) {
|
if ($this->owner->getField('Loop')) {
|
||||||
|
@ -137,7 +137,7 @@ class WebpackTemplateProvider implements TemplateGlobalProvider
|
|||||||
public static function toPublicPath($path): string
|
public static function toPublicPath($path): string
|
||||||
{
|
{
|
||||||
$cfg = self::config();
|
$cfg = self::config();
|
||||||
if (strpos($path, '//')) {
|
if (strpos($path, '//') || strpos($path, '/')) {
|
||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user