mirror of https://gitee.com/karson/fastadmin.git
parent
cdc72a61d3
commit
75981bdb74
|
|
@ -93,6 +93,9 @@ class Configvalue extends Backend
|
||||||
$row = $this->model->get(['id' => $ids]);
|
$row = $this->model->get(['id' => $ids]);
|
||||||
if (!$row)
|
if (!$row)
|
||||||
$this->error(__('No Results were found'));
|
$this->error(__('No Results were found'));
|
||||||
|
// 状态为locked时不允许编辑
|
||||||
|
if ($row['status'] == 'locked')
|
||||||
|
$this->error(__('The current item can not be edited'));
|
||||||
if ($this->request->isPost())
|
if ($this->request->isPost())
|
||||||
{
|
{
|
||||||
$this->code = -1;
|
$this->code = -1;
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ body {
|
||||||
.tab-addtabs .tab-pane {
|
.tab-addtabs .tab-pane {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* RIBBON
|
* RIBBON
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -7221,7 +7221,7 @@ define('table',['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment',
|
||||||
valign: 'middle',
|
valign: 'middle',
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
firsttd: 'tbody tr td:first-child',
|
firsttd: 'tbody tr td:first-child:not(:has(div.card-views))',
|
||||||
toolbar: '.toolbar',
|
toolbar: '.toolbar',
|
||||||
refreshbtn: '.btn-refresh',
|
refreshbtn: '.btn-refresh',
|
||||||
addbtn: '.btn-add',
|
addbtn: '.btn-add',
|
||||||
|
|
@ -7424,20 +7424,24 @@ define('table',['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment',
|
||||||
// 单元格数据格式化
|
// 单元格数据格式化
|
||||||
formatter: {
|
formatter: {
|
||||||
icon: function (value, row, index) {
|
icon: function (value, row, index) {
|
||||||
|
value = value.indexOf(" ") > -1 ? value : "fa fa-" + value;
|
||||||
//渲染fontawesome图标
|
//渲染fontawesome图标
|
||||||
return '<i class="fa fa-' + value + '"></i> ' + value;
|
return '<i class="' + value + '"></i> ' + value;
|
||||||
},
|
},
|
||||||
image: function (value, row, index) {
|
image: function (value, row, index) {
|
||||||
return '<img class="img-rounded img-sm" src="' + (value.indexOf("http") === 0 ? '' : Config.upload.cdnurl) + value + '" />';
|
return '<img class="img-rounded img-sm" src="' + (value.indexOf("http") === 0 ? '' : Config.upload.cdnurl) + value + '" />';
|
||||||
},
|
},
|
||||||
status: function (value, row, index) {
|
status: function (value, row, index, custom) {
|
||||||
//渲染状态
|
//颜色状态数组,可使用red/yellow/aqua/blue/navy/teal/olive/lime/fuchsia/purple/maroon
|
||||||
var html = '';
|
var colorArr = {normal: 'success', hidden: 'grey', deleted: 'danger', locked: 'info'};
|
||||||
if (value == 'normal') {
|
//如果有自定义状态,可以按需传入
|
||||||
html = '<span class="text-success"><i class="fa fa-circle"></i> ' + __('Normal') + '</span>';
|
if (typeof custom !== 'undefined') {
|
||||||
} else {
|
colorArr = $.extend(colorArr, custom);
|
||||||
html = '<span class="text-default"><i class="fa fa-circle"></i> ' + __('Hidden') + '</span>';
|
|
||||||
}
|
}
|
||||||
|
var color = value && typeof colorArr[value] !== 'undefined' ? colorArr[value] : 'primary';
|
||||||
|
value = value[0].toUpperCase() + value.substr(1);
|
||||||
|
//渲染状态
|
||||||
|
var html = '<span class="text-' + color + '"><i class="fa fa-circle"></i> ' + __(value) + '</span>';
|
||||||
return html;
|
return html;
|
||||||
},
|
},
|
||||||
url: function (value, row, index) {
|
url: function (value, row, index) {
|
||||||
|
|
|
||||||
|
|
@ -244,20 +244,24 @@ define(['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment', 'bootstr
|
||||||
// 单元格数据格式化
|
// 单元格数据格式化
|
||||||
formatter: {
|
formatter: {
|
||||||
icon: function (value, row, index) {
|
icon: function (value, row, index) {
|
||||||
|
value = value.indexOf(" ") > -1 ? value : "fa fa-" + value;
|
||||||
//渲染fontawesome图标
|
//渲染fontawesome图标
|
||||||
return '<i class="fa fa-' + value + '"></i> ' + value;
|
return '<i class="' + value + '"></i> ' + value;
|
||||||
},
|
},
|
||||||
image: function (value, row, index) {
|
image: function (value, row, index) {
|
||||||
return '<img class="img-rounded img-sm" src="' + (value.indexOf("http") === 0 ? '' : Config.upload.cdnurl) + value + '" />';
|
return '<img class="img-rounded img-sm" src="' + (value.indexOf("http") === 0 ? '' : Config.upload.cdnurl) + value + '" />';
|
||||||
},
|
},
|
||||||
status: function (value, row, index) {
|
status: function (value, row, index, custom) {
|
||||||
//渲染状态
|
//颜色状态数组,可使用red/yellow/aqua/blue/navy/teal/olive/lime/fuchsia/purple/maroon
|
||||||
var html = '';
|
var colorArr = {normal: 'success', hidden: 'grey', deleted: 'danger', locked: 'info'};
|
||||||
if (value == 'normal') {
|
//如果有自定义状态,可以按需传入
|
||||||
html = '<span class="text-success"><i class="fa fa-circle"></i> ' + __('Normal') + '</span>';
|
if (typeof custom !== 'undefined') {
|
||||||
} else {
|
colorArr = $.extend(colorArr, custom);
|
||||||
html = '<span class="text-default"><i class="fa fa-circle"></i> ' + __('Hidden') + '</span>';
|
|
||||||
}
|
}
|
||||||
|
var color = value && typeof colorArr[value] !== 'undefined' ? colorArr[value] : 'primary';
|
||||||
|
value = value[0].toUpperCase() + value.substr(1);
|
||||||
|
//渲染状态
|
||||||
|
var html = '<span class="text-' + color + '"><i class="fa fa-circle"></i> ' + __(value) + '</span>';
|
||||||
return html;
|
return html;
|
||||||
},
|
},
|
||||||
url: function (value, row, index) {
|
url: function (value, row, index) {
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,8 @@ body {
|
||||||
.tab-pane {
|
.tab-pane {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
-webkit-overflow-scrolling:touch;
|
||||||
|
overflow:auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue