去掉无用的模板文件
封装ajax提示方法
This commit is contained in:
@@ -107,6 +107,19 @@ class ModuleController extends DefaultController
|
||||
'filter' => false,
|
||||
],
|
||||
];
|
||||
|
||||
$header['buttons'] = [
|
||||
['name' => '删除', 'icon' => 'fa-remove', 'action' => 'delete', 'display' => $this->access['delete']],
|
||||
['name' => '导出', 'icon' => 'fa-share', 'action' => 'export', 'display' => 1],
|
||||
];
|
||||
|
||||
$header['left_buttons'] = [
|
||||
['name' => '更新', 'color' => 'default', 'icon' => 'fa-refresh', 'action' => 'refresh', 'display' => 1],
|
||||
['name' => '安装', 'color' => 'default', 'icon' => 'fa-cloud-download', 'action' => 'install', 'display' => 1],
|
||||
['name' => '打包', 'color' => 'default', 'icon' => 'fa-cube', 'action' => 'package', 'display' => 1],
|
||||
];
|
||||
|
||||
$header['search_form'] = $search;
|
||||
$query = $search['query'];
|
||||
|
||||
if (Request::method() == 'POST') {
|
||||
@@ -126,23 +139,11 @@ class ModuleController extends DefaultController
|
||||
}
|
||||
return $row;
|
||||
});
|
||||
return $rows->toJson();
|
||||
$ret = $rows->toArray();
|
||||
$ret['header'] = Grid::getColumns($header);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
$header['buttons'] = [
|
||||
['name' => '删除', 'icon' => 'fa-remove', 'action' => 'delete', 'display' => $this->access['delete']],
|
||||
['name' => '导出', 'icon' => 'fa-share', 'action' => 'export', 'display' => 1],
|
||||
];
|
||||
|
||||
$header['left_buttons'] = [
|
||||
['name' => '更新', 'color' => 'default', 'icon' => 'fa-refresh', 'action' => 'refresh', 'display' => 1],
|
||||
['name' => '安装', 'color' => 'default', 'icon' => 'fa-cloud-download', 'action' => 'install', 'display' => 1],
|
||||
['name' => '打包', 'color' => 'default', 'icon' => 'fa-cube', 'action' => 'package', 'display' => 1],
|
||||
];
|
||||
|
||||
$header['search_form'] = $search;
|
||||
$header['js'] = Grid::js($header);
|
||||
|
||||
return $this->display([
|
||||
'header' => $header,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user