IMPR: Minor updates

This commit is contained in:
Tony Air 2020-07-25 15:47:19 +07:00
parent a4a10098c4
commit c0d3d6fafa
4 changed files with 40 additions and 2 deletions

View File

@ -44,6 +44,10 @@ SilverStripe\CMS\Model\SiteTree:
- Site\Elements\MapElement
#- Site\Elements\AccordionElement
- DNADesign\ElementalVirtual\Model\ElementVirtual
- Site\Elements\ColorBarElement
- Site\Elements\AccordionElement
- Site\Elements\VideoElement
- Site\Elements\GalleryElement
DNADesign\ElementalList\Model\ElementList:
inline_editable: false
@ -60,11 +64,16 @@ DNADesign\ElementalList\Model\ElementList:
- Site\Elements\SliderElement
- Site\Elements\BlockElement
- Site\Elements\MapElement
- Site\Elements\ColorBarElement
- Site\Elements\AccordionElement
styles:
whiteframe: 'White Frame'
greybg: 'Grey Background'
noframe: 'No Frame'
Site\Elements\AccordionElement:
allowed_elements:
- DNADesign\Elemental\Models\ElementContent
DNADesign\Elemental\Models\ElementContent:
default_global_elements: false
inline_editable: false

View File

@ -11,6 +11,7 @@ SilverStripe\SiteConfig\SiteConfig:
extensions:
- Site\Extensions\SocialExtension
- Site\Extensions\SiteConfigExtension
- Site\Extensions\NotificationsExtension
SilverStripe\CMS\Model\SiteTree:
extensions:
@ -19,6 +20,10 @@ SilverStripe\CMS\Model\SiteTree:
Sheadawson\Linkable\Models\EmbeddedObject:
extensions:
- Site\Extensions\EmbeddedObjectExtension
SilverStripe\Assets:
extensions:
- Site\Extensions\ImageExtension
Dynamic\FlexSlider\Model\SlideImage:
extensions:

View File

@ -16,6 +16,7 @@ use SilverStripe\Forms\DropdownField;
use SilverStripe\ORM\DataExtension;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\LiteralField;
use Site\Elements\AccordionElement;
class ElementRows extends DataExtension
{
@ -140,7 +141,7 @@ class ElementRows extends DataExtension
public function isList()
{
return is_a($this->owner, ElementList::class);
return is_a($this->owner, ElementList::class) && !is_a($this->owner, AccordionElement::class);
}
public function isRow()

View File

@ -0,0 +1,23 @@
<?php
namespace Site\Extensions;
use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\NumericField;
use SilverStripe\Forms\TextareaField;
use SilverStripe\Forms\TextField;
use SilverStripe\ORM\DataExtension;
class ImageExtension extends DataExtension
{
public function updateCMSFields(FieldList $fields)
{
parent::updateCMSFields($fields);
/*$fields->removeByName([
'Filename',
]);*/
}
}