|
@@ -5,7 +5,6 @@ use Manage\Lib\Page;
|
|
|
class Data extends Page
|
|
|
{
|
|
|
private $recycler = false;
|
|
|
- private $selection = false;
|
|
|
private $expand = false;
|
|
|
public function __construct($load = '')
|
|
|
{
|
|
@@ -28,7 +27,7 @@ class Data extends Page
|
|
|
$data['exportButton'] = $this->export();
|
|
|
$data['show'] = array
|
|
|
(
|
|
|
- 'selection' => $this->selection,
|
|
|
+ 'selection' => $this->config['selection'] ?? false,
|
|
|
'expand' => $this->expand,
|
|
|
'index' => $this->config['index'] ?? false,
|
|
|
);
|
|
@@ -41,6 +40,10 @@ class Data extends Page
|
|
|
$set = $this->config['set'] ?? array();
|
|
|
$data['field'] = $data['head'] = array();
|
|
|
$data['search'] = $this->search($where);
|
|
|
+ $ids = Dever::input('ids');
|
|
|
+ if ($ids) {
|
|
|
+ $where['id'] = array('in', $ids);
|
|
|
+ }
|
|
|
if (isset($this->config['data'])) {
|
|
|
$result = Dever::call($this->config['data'], array($where, $set));
|
|
|
$data = array_merge($data, $result);
|
|
@@ -272,7 +275,7 @@ class Data extends Page
|
|
|
if (isset($this->config['layout'])) {
|
|
|
continue;
|
|
|
}
|
|
|
- $this->selection = true;
|
|
|
+ $this->config['selection'] = true;
|
|
|
}
|
|
|
$icon = 'Delete';
|
|
|
$button = 'danger';
|
|
@@ -281,7 +284,7 @@ class Data extends Page
|
|
|
if (isset($this->config['layout'])) {
|
|
|
continue;
|
|
|
}
|
|
|
- $this->selection = true;
|
|
|
+ $this->config['selection'] = true;
|
|
|
}
|
|
|
$icon = 'Delete';
|
|
|
$button = 'danger';
|
|
@@ -290,7 +293,7 @@ class Data extends Page
|
|
|
if (isset($this->config['layout'])) {
|
|
|
continue;
|
|
|
}
|
|
|
- $this->selection = true;
|
|
|
+ $this->config['selection'] = true;
|
|
|
}
|
|
|
$icon = 'Notification';
|
|
|
$button = 'warning';
|
|
@@ -299,7 +302,7 @@ class Data extends Page
|
|
|
if (isset($this->config['layout'])) {
|
|
|
continue;
|
|
|
}
|
|
|
- $this->selection = true;
|
|
|
+ $this->config['selection'] = true;
|
|
|
}
|
|
|
$p = Dever::url($p);
|
|
|
$icon = 'Notification';
|