mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
added 新增文本框的readOnly支持,新增缓存Key管理,新增keys模型
This commit is contained in:
parent
3607c78027
commit
81d0ff6739
16
application/admin/controller/CacheType.php
Normal file
16
application/admin/controller/CacheType.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* 项目缓存Key管理
|
||||
* @since 2016-11-30
|
||||
* @author zhaoxiang <zhaoxiang051405@gmail.com>
|
||||
*/
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
|
||||
class CacheType {
|
||||
|
||||
const FILTER_LIST_KEY = 'ApiAdmin:FilterList';
|
||||
const APP_LIST_KEY = 'ApiAdmin:AppList';
|
||||
|
||||
}
|
@ -9,5 +9,6 @@ namespace app\admin\model;
|
||||
|
||||
|
||||
class Keys extends Base {
|
||||
|
||||
protected $autoWriteTimestamp = true;
|
||||
protected $createTime = 'addTime';
|
||||
}
|
@ -114,7 +114,7 @@
|
||||
*/
|
||||
function buildInput( inputObj ) {
|
||||
var formHtml = '<div><div class="col-xs-8 form-group"><label>'+ inputObj.info +'</label>';
|
||||
var placeholder = '', value = '', disabled = '';
|
||||
var placeholder = '', value = '', disabled = '', readOnly = '';
|
||||
if( inputObj.attr.placeholder){
|
||||
placeholder = 'placeholder="'+ inputObj.attr.placeholder +'"';
|
||||
}
|
||||
@ -124,7 +124,10 @@
|
||||
if( inputObj.attr.disabled ){
|
||||
disabled = 'disabled';
|
||||
}
|
||||
formHtml += '<input type="text" class="form-control" '+ placeholder +' '+ disabled +' '+ value +' name="'+ inputObj.attr.name +'"></div>';
|
||||
if( inputObj.attr.readOnly ){
|
||||
readOnly = 'readOnly';
|
||||
}
|
||||
formHtml += '<input type="text" class="form-control" '+ placeholder +' '+ disabled +' '+ readOnly +' '+ value +' name="'+ inputObj.attr.name +'"></div>';
|
||||
if( inputObj.description && inputObj.description.length ){
|
||||
formHtml += ' <div class="col-xs-4 form-group" style="margin-top: 30px"><span class="label label-info">'+ inputObj.description +'</span></div>';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user