|
@@ -70,6 +70,11 @@ class Database
|
|
|
$this->menu = Dever::input('menu');
|
|
|
$this->menu_id = Dever::input('menu_id');
|
|
|
$this->id = Dever::input('update_where_id', Dever::input('where_id'));
|
|
|
+
|
|
|
+ $this->top = Dever::input('top');
|
|
|
+ if ($this->top) {
|
|
|
+ Dever::load('manage/top.update_action', $this->top);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -93,6 +98,8 @@ class Database
|
|
|
'search' => 'project/database/list?{param}',
|
|
|
'add' => 'project/database/update?{param}',
|
|
|
'update' => 'project/database/update?{param}&where_id=' . $id,
|
|
|
+ # 增加快捷更新
|
|
|
+ 'edit' => 'project/database/update?{param}&where_id=' . $id,
|
|
|
'updateAction' => 'database.update_action',
|
|
|
'url' => '',
|
|
|
'delete' => 'database.delete_action?{param}&where_id=' . $id,
|
|
@@ -111,6 +118,8 @@ class Database
|
|
|
$config[$key] = $config['list'];
|
|
|
} elseif (strpos($key, 'add') !== false) {
|
|
|
$config[$key] = $config['add'];
|
|
|
+ } elseif (strpos($key, 'edit') !== false) {
|
|
|
+ $config[$key] = $config['edit'];
|
|
|
}
|
|
|
|
|
|
if (isset($config[$key])) {
|
|
@@ -525,11 +534,9 @@ class Database
|
|
|
);
|
|
|
|
|
|
if (!isset($config['manage']['edit']) && $config['update'] == true) {
|
|
|
- # 3
|
|
|
$config['manage']['_list']['value']['update'] = '编辑';
|
|
|
}
|
|
|
if (!isset($config['manage']['delete']) || (isset($config['manage']['delete']) && $config['manage']['delete'] == true)) {
|
|
|
- # 6
|
|
|
$config['manage']['_list']['value']['delete'] = '删除';
|
|
|
}
|
|
|
if (isset($config['manage']['list'][0]) && is_array($config['manage']['list'][0])) {
|
|
@@ -1792,10 +1799,11 @@ class Database
|
|
|
}
|
|
|
|
|
|
if ($oper == true) {
|
|
|
- if (strpos($kj, 'oper') !== false) {
|
|
|
+ if (strpos($kj, 'edit') !== false) {
|
|
|
+ $result[$k] .= '<a href="javascript:;" onclick="fastEdit($(this), \'' . $this->url($kj, $v['id']) . '\', \''.$vj[0].'\', \''.$vj[1].'\')"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5">' . $vj[0] . '</button></a> ';
|
|
|
+ } elseif (strpos($kj, 'oper') !== false) {
|
|
|
$result[$k] .= '<a href="javascript:;" onclick="load(\'' . Dever::url($pj) . '\')"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5">' . $vj[0] . '</button></a> ';
|
|
|
- }
|
|
|
- elseif (isset($vj[1]) && strpos($vj[1], 'modal|') !== false) {
|
|
|
+ } elseif (isset($vj[1]) && strpos($vj[1], 'modal|') !== false) {
|
|
|
$t = explode('|', $vj[1]);
|
|
|
$result[$k] .= '<a href="#dever_modal" data-toggle="modal" class="btn btn-info btn-rounded waves-effect waves-light m-b-5" onclick=' . $t[1] . ' msg-send="' . $this->value($t[2], $data[$k]) . '">' . $vj[0] . '</a> ';
|
|
|
} elseif (isset($vj[1])) {
|
|
@@ -2010,8 +2018,12 @@ class Database
|
|
|
|
|
|
//print_r($config['manage']['update']);die;
|
|
|
$data = $this->getAdminInfo($data);
|
|
|
+ $col = Dever::input('col');
|
|
|
foreach ($config['struct'] as $k => $v) {
|
|
|
if (isset($v['update'])) {
|
|
|
+ if ($col && !strstr($col, $k)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
//处理权限
|
|
|
if (isset($v['auth'])) {
|
|
|
$auth = $this->value($v['auth'], $data);
|