Skip to content

Commit

Permalink
added support for legend in palettes
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed Oct 6, 2020
1 parent 56d1d3e commit a25948f
Show file tree
Hide file tree
Showing 8 changed files with 846 additions and 64 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

## [2.8.0] - 2020-10-06
- added legend support to palettes

## [2.7.6] - 2020-10-06
- fixed subpalettes not working with checkboxes

Expand Down
26 changes: 14 additions & 12 deletions README.md
Expand Up @@ -26,13 +26,13 @@ Install with composer:

Use the inputType "multiColumnEditor" for your field.

```
'someField' => array(
```php
'someField' => [
'label' => &$GLOBALS['TL_LANG']['tl_my_table']['someField'],
'inputType' => 'multiColumnEditor',
'exclude' => true,
'eval' => array(
'multiColumnEditor' => array(
'eval' => [
'multiColumnEditor' => [
// set to true if the rows should be sortable (backend only atm)
'sortable' => true,
'class' => 'some-class',
Expand All @@ -43,7 +43,8 @@ Use the inputType "multiColumnEditor" for your field.
// defaults to false
'skipCopyValuesOnAdd' => false,
'editorTemplate' => 'multi_column_editor_backend_default',
// add palette and subpalette if you need supalettes support
// Optional: add palette and subpalette if you need supalettes support (otherwise all fields will be shows)
// Legends are supported since verison 2.8
'palettes' => [
'__selector__' => ['field1'],
'default' => 'field1',
Expand All @@ -52,9 +53,10 @@ Use the inputType "multiColumnEditor" for your field.
'field1' => 'field2', // key selector
'field1_10' => 'field3' // key_value selector
],
'fields' => array(
// place your fields here as you would normally in your DCA
// (sql is not required)
// place your fields here as you would normally in your DCA
// (sql is not required)
'fields' => [

'field1' => [
'label' => 'field 1',
'inputType' => 'text',
Expand All @@ -70,11 +72,11 @@ Use the inputType "multiColumnEditor" for your field.
'inputType' => 'text',
'eval' => ['groupStyle' => 'width:150px']
]
)
)
),
]
]
],
'sql' => "blob NULL"
),
],
```

### Add support for special fields (like fileTrees) in Rocksolid Custom Content Elements (RSCE)
Expand Down
35 changes: 35 additions & 0 deletions src/Resources/assets/scss/contao-multi-column-editor-bundle.scss
Expand Up @@ -78,6 +78,41 @@
}
}
}

.rows.grouped {
border: none;

> .mce-row {
border: 1px solid #d0d0d2;
display: block;
padding: 0;
margin-bottom: 2px;
position: relative;

& > fieldset {
display: flex;
flex-direction: column;
margin: 0;
padding: 0;

& > legend {
padding: 9px 0 9px 28px;
background-position-y: 11px;
}

& > .fields {
padding: .5rem 15px 0;
}
}

.actions {
position: absolute;
top: 9px;
right: 9px;
margin: 0;
}
}
}
}

& + .tl_tip {
Expand Down
114 changes: 113 additions & 1 deletion src/Resources/public/contao-multi-column-editor-bundle-be.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a25948f

Please sign in to comment.