Upgrade to 3.7.0
This commit is contained in:
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+2
-1
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Cms\App;
|
||||
use Kirby\Data\Data;
|
||||
use Kirby\Toolkit\A;
|
||||
|
||||
@@ -62,7 +63,7 @@ return [
|
||||
},
|
||||
'toPages' => function ($value = null) {
|
||||
$pages = [];
|
||||
$kirby = kirby();
|
||||
$kirby = App::instance();
|
||||
|
||||
foreach (Data::decode($value, 'yaml') as $id) {
|
||||
if (is_array($id) === true) {
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+11
@@ -106,6 +106,7 @@ return [
|
||||
},
|
||||
'columns' => function () {
|
||||
$columns = [];
|
||||
$mobile = 0;
|
||||
|
||||
if (empty($this->columns)) {
|
||||
foreach ($this->fields as $field) {
|
||||
@@ -133,6 +134,10 @@ return [
|
||||
continue;
|
||||
}
|
||||
|
||||
if (($columnProps['mobile'] ?? false) === true) {
|
||||
$mobile++;
|
||||
}
|
||||
|
||||
$columns[$columnName] = array_merge($columnProps, [
|
||||
'type' => $field['type'],
|
||||
'label' => $field['label'] ?? $field['name']
|
||||
@@ -140,6 +145,12 @@ return [
|
||||
}
|
||||
}
|
||||
|
||||
// make the first column visible on mobile
|
||||
// if no other mobile columns are defined
|
||||
if ($mobile === 0) {
|
||||
$columns[array_key_first($columns)]['mobile'] = true;
|
||||
}
|
||||
|
||||
return $columns;
|
||||
}
|
||||
],
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Executable
+41
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'mixins' => ['options'],
|
||||
'props' => [
|
||||
/**
|
||||
* Unset inherited props
|
||||
*/
|
||||
'after' => null,
|
||||
'before' => null,
|
||||
'icon' => null,
|
||||
'placeholder' => null,
|
||||
|
||||
/**
|
||||
* Toggles will automatically span the full width of the field. With the grow option, you can disable this behaviour for a more compact layout.
|
||||
*/
|
||||
'grow' => function (bool $grow = true) {
|
||||
return $grow;
|
||||
},
|
||||
/**
|
||||
* If `false` all labels will be hidden for icon-only toggles.
|
||||
*/
|
||||
'labels' => function (bool $labels = true) {
|
||||
return $labels;
|
||||
},
|
||||
/**
|
||||
* A toggle can be deactivated on click. If reset is `false` deactivating a toggle is no longer possible.
|
||||
*/
|
||||
'reset' => function (bool $reset = true) {
|
||||
return $reset;
|
||||
}
|
||||
],
|
||||
'computed' => [
|
||||
'default' => function () {
|
||||
return $this->sanitizeOption($this->default);
|
||||
},
|
||||
'value' => function () {
|
||||
return $this->sanitizeOption($this->value) ?? '';
|
||||
},
|
||||
]
|
||||
];
|
||||
Regular → Executable
Regular → Executable
+2
-1
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Cms\App;
|
||||
use Kirby\Data\Data;
|
||||
use Kirby\Toolkit\A;
|
||||
|
||||
@@ -58,7 +59,7 @@ return [
|
||||
},
|
||||
'toUsers' => function ($value = null) {
|
||||
$users = [];
|
||||
$kirby = kirby();
|
||||
$kirby = App::instance();
|
||||
|
||||
foreach (Data::decode($value, 'yaml') as $email) {
|
||||
if (is_array($email) === true) {
|
||||
|
||||
Regular → Executable
Reference in New Issue
Block a user