| ... | ... |
@@ -92,7 +92,7 @@ $GLOBALS['TL_DCA']['tl_vr_modal'] = array |
| 92 | 92 |
'palettes' => array |
| 93 | 93 |
( |
| 94 | 94 |
'__selector__' => array(''),
|
| 95 |
- 'default' => '{title_legend},title;{config_legend},modal_title,borderless,delay,show_once;{publish_legend},published,start,stop'
|
|
| 95 |
+ 'default' => '{desc_legend},title;{config_legend},modal_title,borderless,delay,show_once;{publish_legend},published,start,stop'
|
|
| 96 | 96 |
), |
| 97 | 97 |
'subpalettes' => array |
| 98 | 98 |
( |
| ... | ... |
@@ -92,7 +92,7 @@ $GLOBALS['TL_DCA']['tl_vr_modal'] = array |
| 92 | 92 |
'palettes' => array |
| 93 | 93 |
( |
| 94 | 94 |
'__selector__' => array(''),
|
| 95 |
- 'default' => '{title_legend},title;{config_legend},modal_title,delay,show_once;{publish_legend},published,start,stop'
|
|
| 95 |
+ 'default' => '{title_legend},title;{config_legend},modal_title,borderless,delay,show_once;{publish_legend},published,start,stop'
|
|
| 96 | 96 |
), |
| 97 | 97 |
'subpalettes' => array |
| 98 | 98 |
( |
| ... | ... |
@@ -144,6 +144,13 @@ $GLOBALS['TL_DCA']['tl_vr_modal'] = array |
| 144 | 144 |
'eval' => array('doNotCopy'=>true, 'tl_class'=>'w50 m12'),
|
| 145 | 145 |
'sql' => "char(1) NOT NULL default '1'" |
| 146 | 146 |
), |
| 147 |
+ 'borderless' => array |
|
| 148 |
+ ( |
|
| 149 |
+ 'exclude' => true, |
|
| 150 |
+ 'inputType' => 'checkbox', |
|
| 151 |
+ 'eval' => array('tl_class'=>'w50 m12'),
|
|
| 152 |
+ 'sql' => "char(1) NOT NULL default ''" |
|
| 153 |
+ ), |
|
| 147 | 154 |
'published' => array |
| 148 | 155 |
( |
| 149 | 156 |
'exclude' => true, |
| ... | ... |
@@ -92,7 +92,7 @@ $GLOBALS['TL_DCA']['tl_vr_modal'] = array |
| 92 | 92 |
'palettes' => array |
| 93 | 93 |
( |
| 94 | 94 |
'__selector__' => array(''),
|
| 95 |
- 'default' => '{title_legend},title;{config_legend},modal_title,delay;{publish_legend},published,start,stop'
|
|
| 95 |
+ 'default' => '{title_legend},title;{config_legend},modal_title,delay,show_once;{publish_legend},published,start,stop'
|
|
| 96 | 96 |
), |
| 97 | 97 |
'subpalettes' => array |
| 98 | 98 |
( |
| ... | ... |
@@ -104,12 +104,6 @@ $GLOBALS['TL_DCA']['tl_vr_modal'] = array |
| 104 | 104 |
( |
| 105 | 105 |
'sql' => "int(10) unsigned NOT NULL auto_increment" |
| 106 | 106 |
), |
| 107 |
- 'pid' => array |
|
| 108 |
- ( |
|
| 109 |
- 'foreignKey' => 'tl_news_archive.title', |
|
| 110 |
- 'sql' => "int(10) unsigned NOT NULL default 0", |
|
| 111 |
- 'relation' => array('type'=>'belongsTo', 'load'=>'lazy')
|
|
| 112 |
- ), |
|
| 113 | 107 |
'tstamp' => array |
| 114 | 108 |
( |
| 115 | 109 |
'sorting' => true, |
| ... | ... |
@@ -139,9 +133,17 @@ $GLOBALS['TL_DCA']['tl_vr_modal'] = array |
| 139 | 133 |
'sorting' => true, |
| 140 | 134 |
'flag' => DataContainer::SORT_ASC, |
| 141 | 135 |
'inputType' => 'text', |
| 142 |
- 'eval' => array('mandatory'=>true, 'rgxp'=>'natural','maxlength'=>5, 'maxval'=>65535, 'tl_class'=>'w50'),
|
|
| 136 |
+ 'eval' => array('mandatory'=>true, 'rgxp'=>'natural','maxlength'=>5, 'maxval'=>65535, 'tl_class'=>'clr w50'),
|
|
| 143 | 137 |
'sql' => "smallint(5) unsigned NOT NULL default 0" |
| 144 | 138 |
), |
| 139 |
+ 'show_once' => array |
|
| 140 |
+ ( |
|
| 141 |
+ 'exclude' => true, |
|
| 142 |
+ 'filter' => true, |
|
| 143 |
+ 'inputType' => 'checkbox', |
|
| 144 |
+ 'eval' => array('doNotCopy'=>true, 'tl_class'=>'w50 m12'),
|
|
| 145 |
+ 'sql' => "char(1) NOT NULL default '1'" |
|
| 146 |
+ ), |
|
| 145 | 147 |
'published' => array |
| 146 | 148 |
( |
| 147 | 149 |
'exclude' => true, |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,170 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+declare(strict_types=1); |
|
| 4 |
+ |
|
| 5 |
+/* |
|
| 6 |
+ * This file is part of modal bundle for Contao. |
|
| 7 |
+ * |
|
| 8 |
+ * (c) Benjamin Roth |
|
| 9 |
+ * |
|
| 10 |
+ * @license LGPL-3.0-or-later |
|
| 11 |
+ */ |
|
| 12 |
+ |
|
| 13 |
+use Contao\DC_Table; |
|
| 14 |
+use Contao\DataContainer; |
|
| 15 |
+ |
|
| 16 |
+$GLOBALS['TL_DCA']['tl_vr_modal'] = array |
|
| 17 |
+( |
|
| 18 |
+ 'config' => array |
|
| 19 |
+ ( |
|
| 20 |
+ 'dataContainer' => DC_Table::class, |
|
| 21 |
+ 'ctable' => array('tl_content'),
|
|
| 22 |
+ 'switchToEdit' => true, |
|
| 23 |
+ 'enableVersioning' => true, |
|
| 24 |
+ 'markAsCopy' => 'name', |
|
| 25 |
+ 'sql' => array |
|
| 26 |
+ ( |
|
| 27 |
+ 'keys' => array |
|
| 28 |
+ ( |
|
| 29 |
+ 'id' => 'primary' |
|
| 30 |
+ ) |
|
| 31 |
+ ) |
|
| 32 |
+ ), |
|
| 33 |
+ 'list' => array |
|
| 34 |
+ ( |
|
| 35 |
+ 'sorting' => array |
|
| 36 |
+ ( |
|
| 37 |
+ 'mode' => DataContainer::MODE_SORTABLE, |
|
| 38 |
+ 'fields' => array('title ASC'),
|
|
| 39 |
+ 'panelLayout' => 'filter;sort,search,limit', |
|
| 40 |
+ ), |
|
| 41 |
+ 'label' => array |
|
| 42 |
+ ( |
|
| 43 |
+ 'fields' => array('title','delay'),
|
|
| 44 |
+ 'showColumns' => true, |
|
| 45 |
+ 'format' => '%s', |
|
| 46 |
+ ), |
|
| 47 |
+ 'global_operations' => array |
|
| 48 |
+ ( |
|
| 49 |
+ 'all' => array |
|
| 50 |
+ ( |
|
| 51 |
+ 'href' => 'act=select', |
|
| 52 |
+ 'class' => 'header_edit_all', |
|
| 53 |
+ 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"' |
|
| 54 |
+ ) |
|
| 55 |
+ ), |
|
| 56 |
+ 'operations' => array |
|
| 57 |
+ ( |
|
| 58 |
+ 'edit' => array |
|
| 59 |
+ ( |
|
| 60 |
+ 'href' => 'table=tl_content', |
|
| 61 |
+ 'icon' => 'edit.svg' |
|
| 62 |
+ ), |
|
| 63 |
+ 'editheader' => array |
|
| 64 |
+ ( |
|
| 65 |
+ 'href' => 'act=edit', |
|
| 66 |
+ 'icon' => 'header.svg' |
|
| 67 |
+ ), |
|
| 68 |
+ 'copy' => array |
|
| 69 |
+ ( |
|
| 70 |
+ 'href' => 'act=copy', |
|
| 71 |
+ 'icon' => 'copy.svg' |
|
| 72 |
+ ), |
|
| 73 |
+ 'delete' => array |
|
| 74 |
+ ( |
|
| 75 |
+ 'href' => 'act=delete', |
|
| 76 |
+ 'icon' => 'delete.svg', |
|
| 77 |
+ 'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? null) . '\'))return false;Backend.getScrollOffset()"' |
|
| 78 |
+ ), |
|
| 79 |
+ 'toggle' => array |
|
| 80 |
+ ( |
|
| 81 |
+ 'href' => 'act=toggle&field=published', |
|
| 82 |
+ 'icon' => 'visible.svg', |
|
| 83 |
+ 'showInHeader' => true |
|
| 84 |
+ ), |
|
| 85 |
+ 'show' => array |
|
| 86 |
+ ( |
|
| 87 |
+ 'href' => 'act=show', |
|
| 88 |
+ 'icon' => 'show.svg' |
|
| 89 |
+ ) |
|
| 90 |
+ ) |
|
| 91 |
+ ), |
|
| 92 |
+ 'palettes' => array |
|
| 93 |
+ ( |
|
| 94 |
+ '__selector__' => array(''),
|
|
| 95 |
+ 'default' => '{title_legend},title;{config_legend},modal_title,delay;{publish_legend},published,start,stop'
|
|
| 96 |
+ ), |
|
| 97 |
+ 'subpalettes' => array |
|
| 98 |
+ ( |
|
| 99 |
+ |
|
| 100 |
+ ), |
|
| 101 |
+ 'fields' => array |
|
| 102 |
+ ( |
|
| 103 |
+ 'id' => array |
|
| 104 |
+ ( |
|
| 105 |
+ 'sql' => "int(10) unsigned NOT NULL auto_increment" |
|
| 106 |
+ ), |
|
| 107 |
+ 'pid' => array |
|
| 108 |
+ ( |
|
| 109 |
+ 'foreignKey' => 'tl_news_archive.title', |
|
| 110 |
+ 'sql' => "int(10) unsigned NOT NULL default 0", |
|
| 111 |
+ 'relation' => array('type'=>'belongsTo', 'load'=>'lazy')
|
|
| 112 |
+ ), |
|
| 113 |
+ 'tstamp' => array |
|
| 114 |
+ ( |
|
| 115 |
+ 'sorting' => true, |
|
| 116 |
+ 'flag' => DataContainer::SORT_DAY_DESC, |
|
| 117 |
+ 'sql' => "int(10) unsigned NOT NULL default 0" |
|
| 118 |
+ ), |
|
| 119 |
+ 'title' => array |
|
| 120 |
+ ( |
|
| 121 |
+ 'exclude' => true, |
|
| 122 |
+ 'search' => true, |
|
| 123 |
+ 'sorting' => true, |
|
| 124 |
+ 'flag' => DataContainer::SORT_INITIAL_LETTER_ASC, |
|
| 125 |
+ 'inputType' => 'text', |
|
| 126 |
+ 'eval' => array('mandatory'=>true, 'maxlength'=>255, 'tl_class'=>'w50'),
|
|
| 127 |
+ 'sql' => "varchar(255) NOT NULL default ''" |
|
| 128 |
+ ), |
|
| 129 |
+ 'modal_title' => array |
|
| 130 |
+ ( |
|
| 131 |
+ 'exclude' => true, |
|
| 132 |
+ 'inputType' => 'text', |
|
| 133 |
+ 'eval' => array('maxlength'=>255, 'tl_class'=>'w50'),
|
|
| 134 |
+ 'sql' => "varchar(255) NOT NULL default ''" |
|
| 135 |
+ ), |
|
| 136 |
+ 'delay' => array |
|
| 137 |
+ ( |
|
| 138 |
+ 'exclude' => true, |
|
| 139 |
+ 'sorting' => true, |
|
| 140 |
+ 'flag' => DataContainer::SORT_ASC, |
|
| 141 |
+ 'inputType' => 'text', |
|
| 142 |
+ 'eval' => array('mandatory'=>true, 'rgxp'=>'natural','maxlength'=>5, 'maxval'=>65535, 'tl_class'=>'w50'),
|
|
| 143 |
+ 'sql' => "smallint(5) unsigned NOT NULL default 0" |
|
| 144 |
+ ), |
|
| 145 |
+ 'published' => array |
|
| 146 |
+ ( |
|
| 147 |
+ 'exclude' => true, |
|
| 148 |
+ 'toggle' => true, |
|
| 149 |
+ 'filter' => true, |
|
| 150 |
+ 'flag' => DataContainer::SORT_INITIAL_LETTER_ASC, |
|
| 151 |
+ 'inputType' => 'checkbox', |
|
| 152 |
+ 'eval' => array('doNotCopy'=>true),
|
|
| 153 |
+ 'sql' => "char(1) NOT NULL default ''" |
|
| 154 |
+ ), |
|
| 155 |
+ 'start' => array |
|
| 156 |
+ ( |
|
| 157 |
+ 'exclude' => true, |
|
| 158 |
+ 'inputType' => 'text', |
|
| 159 |
+ 'eval' => array('rgxp'=>'datim', 'datepicker'=>true, 'tl_class'=>'w50 wizard'),
|
|
| 160 |
+ 'sql' => "varchar(10) NOT NULL default ''" |
|
| 161 |
+ ), |
|
| 162 |
+ 'stop' => array |
|
| 163 |
+ ( |
|
| 164 |
+ 'exclude' => true, |
|
| 165 |
+ 'inputType' => 'text', |
|
| 166 |
+ 'eval' => array('rgxp'=>'datim', 'datepicker'=>true, 'tl_class'=>'w50 wizard'),
|
|
| 167 |
+ 'sql' => "varchar(10) NOT NULL default ''" |
|
| 168 |
+ ) |
|
| 169 |
+ ) |
|
| 170 |
+); |