后台UI更新
This commit is contained in:
@@ -19,15 +19,15 @@ class Client extends Admin{
|
|||||||
* @title 系统首页
|
* @title 系统首页
|
||||||
*/
|
*/
|
||||||
public function index(ClientModel $client){
|
public function index(ClientModel $client){
|
||||||
|
if ($this->request->isAjax()) {
|
||||||
$res = $client->paginate(25, false, array(
|
$res = $client->paginate(25, false, array(
|
||||||
'query' => $this->request->param()
|
'query' => $this->request->param()
|
||||||
));
|
));
|
||||||
|
$data = $res->toArray();
|
||||||
$data['list'] = $res;
|
|
||||||
$data['page'] = $res->render();
|
|
||||||
$this->data['data'] = $data;
|
$this->data['data'] = $data;
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title 添加客户端
|
* @title 添加客户端
|
||||||
|
|||||||
@@ -26,4 +26,46 @@ class Menu extends Admin{
|
|||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 编辑菜单
|
||||||
|
*/
|
||||||
|
public function edit(){
|
||||||
|
if($this->request->isAjax()){
|
||||||
|
$menu = new MenuModel();
|
||||||
|
|
||||||
|
$res = $menu->select();
|
||||||
|
|
||||||
|
$this->data['data'] = $res;
|
||||||
|
return $this->data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 添加菜单
|
||||||
|
*/
|
||||||
|
public function add(){
|
||||||
|
if($this->request->isAjax()){
|
||||||
|
$menu = new MenuModel();
|
||||||
|
|
||||||
|
$res = $menu->select();
|
||||||
|
|
||||||
|
$this->data['data'] = $res;
|
||||||
|
return $this->data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 移除菜单
|
||||||
|
*/
|
||||||
|
public function remove(){
|
||||||
|
if($this->request->isAjax()){
|
||||||
|
$menu = new MenuModel();
|
||||||
|
|
||||||
|
$res = $menu->select();
|
||||||
|
|
||||||
|
$this->data['data'] = $res;
|
||||||
|
return $this->data;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,172 +0,0 @@
|
|||||||
$(function () {
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of all the available skins
|
|
||||||
*
|
|
||||||
* @type Array
|
|
||||||
*/
|
|
||||||
var mySkins = [
|
|
||||||
'skin-blue',
|
|
||||||
'skin-black',
|
|
||||||
'skin-red',
|
|
||||||
'skin-yellow',
|
|
||||||
'skin-purple',
|
|
||||||
'skin-green',
|
|
||||||
'skin-blue-light',
|
|
||||||
'skin-black-light',
|
|
||||||
'skin-red-light',
|
|
||||||
'skin-yellow-light',
|
|
||||||
'skin-purple-light',
|
|
||||||
'skin-green-light'
|
|
||||||
]
|
|
||||||
|
|
||||||
var $skinsList = $('<ul />', {'class': 'list-unstyled clearfix'})
|
|
||||||
|
|
||||||
// Dark sidebar skins
|
|
||||||
var $skinBlue =
|
|
||||||
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
|
|
||||||
.append('<a href="javascript:void(0)" data-skin="skin-blue" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 7px; background: #367fa9"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
|
|
||||||
+ '</a>'
|
|
||||||
+ '<p class="text-center no-margin">蓝黑</p>')
|
|
||||||
$skinsList.append($skinBlue)
|
|
||||||
var $skinBlack =
|
|
||||||
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
|
|
||||||
.append('<a href="javascript:void(0)" data-skin="skin-black" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
|
|
||||||
+ '<div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix"><span style="display:block; width: 20%; float: left; height: 7px; background: #fefefe"></span><span style="display:block; width: 80%; float: left; height: 7px; background: #fefefe"></span></div>'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
|
|
||||||
+ '</a>'
|
|
||||||
+ '<p class="text-center no-margin">白黑</p>')
|
|
||||||
$skinsList.append($skinBlack)
|
|
||||||
var $skinPurple =
|
|
||||||
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
|
|
||||||
.append('<a href="javascript:void(0)" data-skin="skin-purple" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
|
|
||||||
+ '</a>'
|
|
||||||
+ '<p class="text-center no-margin">紫黑</p>')
|
|
||||||
$skinsList.append($skinPurple)
|
|
||||||
var $skinGreen =
|
|
||||||
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
|
|
||||||
.append('<a href="javascript:void(0)" data-skin="skin-green" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
|
|
||||||
+ '</a>'
|
|
||||||
+ '<p class="text-center no-margin">绿黑</p>')
|
|
||||||
$skinsList.append($skinGreen)
|
|
||||||
var $skinRed =
|
|
||||||
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
|
|
||||||
.append('<a href="javascript:void(0)" data-skin="skin-red" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
|
|
||||||
+ '</a>'
|
|
||||||
+ '<p class="text-center no-margin">红黑</p>')
|
|
||||||
$skinsList.append($skinRed)
|
|
||||||
var $skinYellow =
|
|
||||||
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
|
|
||||||
.append('<a href="javascript:void(0)" data-skin="skin-yellow" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
|
|
||||||
+ '</a>'
|
|
||||||
+ '<p class="text-center no-margin">黄黑</p>')
|
|
||||||
$skinsList.append($skinYellow)
|
|
||||||
|
|
||||||
// Light sidebar skins
|
|
||||||
var $skinBlueLight =
|
|
||||||
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
|
|
||||||
.append('<a href="javascript:void(0)" data-skin="skin-blue-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 7px; background: #367fa9"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
|
|
||||||
+ '</a>'
|
|
||||||
+ '<p class="text-center no-margin" style="font-size: 12px">亮蓝</p>')
|
|
||||||
$skinsList.append($skinBlueLight)
|
|
||||||
var $skinBlackLight =
|
|
||||||
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
|
|
||||||
.append('<a href="javascript:void(0)" data-skin="skin-black-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
|
|
||||||
+ '<div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix"><span style="display:block; width: 20%; float: left; height: 7px; background: #fefefe"></span><span style="display:block; width: 80%; float: left; height: 7px; background: #fefefe"></span></div>'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
|
|
||||||
+ '</a>'
|
|
||||||
+ '<p class="text-center no-margin" style="font-size: 12px">亮</p>')
|
|
||||||
$skinsList.append($skinBlackLight)
|
|
||||||
var $skinPurpleLight =
|
|
||||||
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
|
|
||||||
.append('<a href="javascript:void(0)" data-skin="skin-purple-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
|
|
||||||
+ '</a>'
|
|
||||||
+ '<p class="text-center no-margin" style="font-size: 12px">亮紫</p>')
|
|
||||||
$skinsList.append($skinPurpleLight)
|
|
||||||
var $skinGreenLight =
|
|
||||||
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
|
|
||||||
.append('<a href="javascript:void(0)" data-skin="skin-green-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
|
|
||||||
+ '</a>'
|
|
||||||
+ '<p class="text-center no-margin" style="font-size: 12px">亮绿</p>')
|
|
||||||
$skinsList.append($skinGreenLight)
|
|
||||||
var $skinRedLight =
|
|
||||||
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
|
|
||||||
.append('<a href="javascript:void(0)" data-skin="skin-red-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
|
|
||||||
+ '</a>'
|
|
||||||
+ '<p class="text-center no-margin" style="font-size: 12px">亮红</p>')
|
|
||||||
$skinsList.append($skinRedLight)
|
|
||||||
var $skinYellowLight =
|
|
||||||
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
|
|
||||||
.append('<a href="javascript:void(0)" data-skin="skin-yellow-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
|
|
||||||
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
|
|
||||||
+ '</a>'
|
|
||||||
+ '<p class="text-center no-margin" style="font-size: 12px">亮黄</p>')
|
|
||||||
$skinsList.append($skinYellowLight)
|
|
||||||
|
|
||||||
$('[data-skin-box] > .content').append($skinsList);
|
|
||||||
|
|
||||||
setup();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Replaces the old skin with the new skin
|
|
||||||
* @param String cls the new skin class
|
|
||||||
* @returns Boolean false to prevent link's default action
|
|
||||||
*/
|
|
||||||
function changeSkin(cls) {
|
|
||||||
$.each(mySkins, function (i) {
|
|
||||||
$('body').removeClass(mySkins[i])
|
|
||||||
})
|
|
||||||
|
|
||||||
$('body').addClass(cls)
|
|
||||||
store('skin', cls)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieve default settings and apply them to the template
|
|
||||||
*
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
function setup() {
|
|
||||||
var tmp = get('skin') || 'skin-blue';
|
|
||||||
if (tmp && $.inArray(tmp, mySkins) >= 0){
|
|
||||||
changeSkin(tmp)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add the change skin listener
|
|
||||||
$('[data-skin]').on('click', function (e) {
|
|
||||||
if ($(this).hasClass('knob'))
|
|
||||||
return
|
|
||||||
e.preventDefault()
|
|
||||||
changeSkin($(this).data('skin'))
|
|
||||||
})
|
|
||||||
|
|
||||||
$('[data-toggle="control-sidebar"]').click(function(){
|
|
||||||
$("[data-skin-box]").animate({right:"0"}, 500);
|
|
||||||
})
|
|
||||||
|
|
||||||
$('.tool-bar').click(function(){
|
|
||||||
$("[data-skin-box]").animate({right:"-320px"}, 500);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
@@ -12,11 +12,18 @@
|
|||||||
<!-- Ionicons -->
|
<!-- Ionicons -->
|
||||||
<link rel="stylesheet" href="__static__/plugins/Ionicons/css/ionicons.min.css">
|
<link rel="stylesheet" href="__static__/plugins/Ionicons/css/ionicons.min.css">
|
||||||
<!-- Theme style -->
|
<!-- Theme style -->
|
||||||
<link rel="stylesheet" href="__css__/AdminLTE.min.css">
|
<link rel="stylesheet" href="__css__/sentcms.min.css">
|
||||||
<link rel="stylesheet" href="__css__/style.css?v={$sent_version}">
|
<link rel="stylesheet" href="__css__/style.css?v={$sent_version}">
|
||||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||||
folder instead of downloading all of them to reduce the load. -->
|
folder instead of downloading all of them to reduce the load. -->
|
||||||
<link rel="stylesheet" href="__css__/skins/_all-skins.min.css">
|
<link rel="stylesheet" href="__css__/themes.css">
|
||||||
|
<!-- jQuery 3 -->
|
||||||
|
<script src="__static__/plugins/jquery/dist/jquery.min.js"></script>
|
||||||
|
<!-- Bootstrap 3.3.7 -->
|
||||||
|
<script src="__static__/plugins/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||||
|
<!-- Slimscroll -->
|
||||||
|
<script src="__static__/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
|
||||||
|
<script src="__static__/plugins/layer/layer.js"></script>
|
||||||
|
|
||||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||||
@@ -48,13 +55,6 @@ folder instead of downloading all of them to reduce the load. -->
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- jQuery 3 -->
|
|
||||||
<script src="__static__/plugins/jquery/dist/jquery.min.js"></script>
|
|
||||||
<!-- Bootstrap 3.3.7 -->
|
|
||||||
<script src="__static__/plugins/bootstrap/dist/js/bootstrap.min.js"></script>
|
|
||||||
<!-- Slimscroll -->
|
|
||||||
<script src="__static__/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
|
|
||||||
<script src="__static__/plugins/layer/layer.js"></script>
|
|
||||||
<!-- AdminLTE App -->
|
<!-- AdminLTE App -->
|
||||||
<script src="__static__/common/js/core.js?v={$sent_version}"></script>
|
<script src="__static__/common/js/core.js?v={$sent_version}"></script>
|
||||||
<script src="__js__/sentcms.js?v={$sent_version}"></script>
|
<script src="__js__/sentcms.js?v={$sent_version}"></script>
|
||||||
|
|||||||
@@ -4,50 +4,84 @@
|
|||||||
<header class="box-header with-border">
|
<header class="box-header with-border">
|
||||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a class="btn btn-primary" href="{:url('/admin/client/add')}">新 增</a>
|
|
||||||
<button class="btn btn-danger ajax-post confirm" url="{:url('/admin/client/del')}" target-form="ids">删 除</button>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="table-responsive clearfix">
|
|
||||||
<table class="table table-hover">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
<thead>
|
<a class="btn btn-success" onclick="$.operate.add()">
|
||||||
<tr>
|
<i class="fa fa-plus"></i> 新增
|
||||||
<th width="30"><input class="checkbox check-all" type="checkbox"></th>
|
</a>
|
||||||
<th>ID</th>
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||||
<th>名称</th>
|
<i class="fa fa-edit"></i> 修改
|
||||||
<th>APPID</th>
|
</a>
|
||||||
<th>APPSECRET</th>
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||||
<th>创建时间</th>
|
<i class="fa fa-remove"></i> 删除
|
||||||
<th>更新时间</th>
|
</a>
|
||||||
<th>操作</th>
|
</div>
|
||||||
</tr>
|
|
||||||
</thead>
|
<div class="table-striped">
|
||||||
<tbody>
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
{volist name="list" id="item"}
|
|
||||||
<tr>
|
|
||||||
<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$item['id']}"></td>
|
|
||||||
<td>{$item['id']}</td>
|
|
||||||
<td>{$item['title']}</td>
|
|
||||||
<td>{$item['appid']}</td>
|
|
||||||
<td>{$item['appsecret']}</td>
|
|
||||||
<td>{$item['create_time']}</td>
|
|
||||||
<td>{$item['update_time']}</td>
|
|
||||||
<td>
|
|
||||||
<a href="{:url('/admin/client/edit', array('id'=>$item['id']))}">编辑</a>
|
|
||||||
<a href="{:url('/admin/client/del', array('id'=>$item['id']))}" class="ajax-post confirm">删除</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/volist}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{$page|raw}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
|
<!-- bootstrap-table 表格插件 -->
|
||||||
|
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var isLoadModule = true;
|
$(function(){
|
||||||
|
var editFlag = "";
|
||||||
|
var removeFlag = "";
|
||||||
|
var resetPwdFlag = "";
|
||||||
|
|
||||||
|
$.table.init({
|
||||||
|
url: "/admin/client/index",
|
||||||
|
createUrl: "/admin/client/add",
|
||||||
|
updateUrl: "/admin/client/edit/id/{id}",
|
||||||
|
removeUrl: "/admin/client/remove",
|
||||||
|
sortName: "id",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "客户端",
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'title',
|
||||||
|
title: '客户端名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appid',
|
||||||
|
title: 'APPID'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appsecret',
|
||||||
|
title: 'APP秘钥'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'create_time',
|
||||||
|
title: '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
@@ -1,16 +1,14 @@
|
|||||||
{extend name="admin/base"/}
|
{extend name="admin/base"/}
|
||||||
|
|
||||||
{block name="body"}
|
{block name="body"}
|
||||||
<Card style="width:350px">
|
<!-- Default box -->
|
||||||
<p slot="title">
|
<div class="box box-primary">
|
||||||
<Icon type="ios-film-outline"></Icon>
|
<div class="box-header with-border">
|
||||||
Classic film
|
<h3 class="box-title">{$mate_title|default="更新缓存"}</h3>
|
||||||
</p>
|
<div class="box-tools pull-right">
|
||||||
<Input v-model="value" placeholder="Enter something..." style="width: 300px" />
|
</div>
|
||||||
</Card>
|
</div>
|
||||||
{/block}
|
<div class="box-body">
|
||||||
{block name="script"}
|
</div>
|
||||||
<script type="text/javascript">
|
</div>
|
||||||
var isLoadModule = true;
|
|
||||||
</script>
|
|
||||||
{/block}
|
{/block}
|
||||||
@@ -12,11 +12,11 @@
|
|||||||
<!-- Ionicons -->
|
<!-- Ionicons -->
|
||||||
<link rel="stylesheet" href="__static__/plugins/Ionicons/css/ionicons.min.css">
|
<link rel="stylesheet" href="__static__/plugins/Ionicons/css/ionicons.min.css">
|
||||||
<!-- Theme style -->
|
<!-- Theme style -->
|
||||||
<link rel="stylesheet" href="__css__/AdminLTE.min.css">
|
<link rel="stylesheet" href="__css__/sentcms.min.css">
|
||||||
<link rel="stylesheet" href="__css__/style.css?v={$sent_version}">
|
<link rel="stylesheet" href="__css__/style.css?v={$sent_version}">
|
||||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||||
folder instead of downloading all of them to reduce the load. -->
|
folder instead of downloading all of them to reduce the load. -->
|
||||||
<link rel="stylesheet" href="__css__/skins/_all-skins.min.css">
|
<link rel="stylesheet" href="__css__/themes.css">
|
||||||
|
|
||||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||||
@@ -165,10 +165,32 @@ folder instead of downloading all of them to reduce the load. -->
|
|||||||
</aside>
|
</aside>
|
||||||
<!-- Content Wrapper. Contains page content -->
|
<!-- Content Wrapper. Contains page content -->
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
<div class="page-tab">
|
||||||
|
<span class="button" data-action="scroll" data-type="left"><i class="fa fa-backward"></i></span>
|
||||||
|
<div class="tab-list">
|
||||||
|
<div class="page-tabs-content">
|
||||||
|
<a href="javascript:;" class="home active menuTab" data-id="/admin/system/dashboard"><span>首页</span></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dropdown" data-tab-action="nav">
|
||||||
|
<span class="button">相关操作 <i class="fa fa-angle-double-down"></i></span>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href="#" data-action="close" data-type="current"><i class="fa fa-times"></i> 关闭当前</a></li>
|
||||||
|
<li><a href="#" data-action="close" data-type="other"><i class="fa fa-times-rectangle-o"></i> 关闭其他</a></li>
|
||||||
|
<li><a href="#" data-action="close" data-type="left"><i class="fa fa-mail-reply"></i> 关闭左侧</a></li>
|
||||||
|
<li><a href="#" data-action="close" data-type="right"><i class="fa fa-mail-forward"></i> 关闭右侧</a></li>
|
||||||
|
<li><a href="#" data-action="close" data-type="all"><i class="fa fa-times-rectangle"></i> 关闭全部</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<span class="button" data-action="scroll" data-type="right"><i class="fa fa-forward"></i></span>
|
||||||
|
<span class="button refresh"><i class="fa fa-refresh"></i> 刷新</span>
|
||||||
|
</div>
|
||||||
|
<div class="mainContent" id="content-main">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<iframe src="/admin/index/dashboard.html" frameborder="0" width="100%" name="main-body"></iframe>
|
<iframe src="/admin/index/dashboard.html" class="sent_iframe" data-id="/admin/system/dashboard" frameborder="0" width="100%" name="main-body"></iframe>
|
||||||
<!-- /.content -->
|
<!-- /.content -->
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<!-- Main Footer -->
|
<!-- Main Footer -->
|
||||||
<footer class="main-footer">
|
<footer class="main-footer">
|
||||||
<!-- To the right -->
|
<!-- To the right -->
|
||||||
@@ -195,10 +217,12 @@ folder instead of downloading all of them to reduce the load. -->
|
|||||||
<!-- Slimscroll -->
|
<!-- Slimscroll -->
|
||||||
<script src="__static__/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
|
<script src="__static__/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
|
||||||
<script src="__static__/plugins/layer/layer.js"></script>
|
<script src="__static__/plugins/layer/layer.js"></script>
|
||||||
|
<script src="__static__/plugins/blockUI/jquery.blockUI.js"></script>
|
||||||
|
<script src="__js__/page.js?v={$sent_version}"></script>
|
||||||
<!-- AdminLTE App -->
|
<!-- AdminLTE App -->
|
||||||
<script src="__static__/common/js/core.js?v={$sent_version}"></script>
|
<script src="__static__/common/js/core.js?v={$sent_version}"></script>
|
||||||
<script src="__js__/sentcms.js?v={$sent_version}"></script>
|
<script src="__js__/sentcms.js?v={$sent_version}"></script>
|
||||||
<!-- AdminLTE for demo purposes -->
|
<!-- AdminLTE for demo purposes -->
|
||||||
<script src="__js__/app.js?v={$sent_version}"></script>
|
<script src="__js__/index.js?v={$sent_version}"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -11,10 +11,8 @@
|
|||||||
<!-- Font Awesome -->
|
<!-- Font Awesome -->
|
||||||
<link rel="stylesheet" href="__static__/plugins/font-awesome/css/font-awesome.min.css">
|
<link rel="stylesheet" href="__static__/plugins/font-awesome/css/font-awesome.min.css">
|
||||||
<!-- Theme style -->
|
<!-- Theme style -->
|
||||||
<link rel="stylesheet" href="__css__/AdminLTE.min.css">
|
<link rel="stylesheet" href="__css__/sentcms.min.css">
|
||||||
<link rel="stylesheet" href="__css__/style.css">
|
<link rel="stylesheet" href="__css__/style.css">
|
||||||
<!-- iCheck -->
|
|
||||||
<link rel="stylesheet" href="__static__/plugins/iCheck/square/blue.css">
|
|
||||||
|
|
||||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||||
|
|||||||
@@ -1,120 +1,91 @@
|
|||||||
{extend name="admin/base"/}
|
{extend name="admin/base"/}
|
||||||
{block name="style"}
|
{block name="head"}
|
||||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
<script type="text/javascript" src="__static__/plugins/bootstrap-treetable/bootstrap-treetable.js"></script>
|
||||||
{/block}
|
{/block}
|
||||||
{block name="body"}
|
{block name="body"}
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<header class="box-header with-border">
|
<header class="box-header with-border">
|
||||||
<div class="pull-left">
|
<h3 class="box-title">菜单管理</h3>
|
||||||
<h2>{present name="data"}[ {$data['title']} ] 子{/present}菜单管理</h2>
|
|
||||||
</div>
|
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<!-- <div class="search-form pull-left">
|
|
||||||
<div class="form-group">
|
|
||||||
<input type="text" name="title" class="form-control" value="{:input('title')}"
|
|
||||||
placeholder="请输入菜单名称">
|
|
||||||
<span class="input-group-btn"><a class="btn btn-default" href="javascript:;" id="search" url="__SELF__"><i class="icon-search"></i></a></span>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<a class="btn btn-primary" href="{:url('add',array('pid'=>input('get.pid',0)))}">新 增</a>
|
|
||||||
<button class="btn btn-danger ajax-post confirm" url="{:url('del')}" target-form="ids">删 除</button>
|
|
||||||
<a class="btn btn-success" href="{:url('import',array('pid'=>input('get.pid',0)))}">导 入</a>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<form class="ids">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
<div class="table-responsive clearfix">
|
<a class="btn btn-success" onclick="$.operate.add(0)">
|
||||||
<table class="table table-hover">
|
<i class="fa fa-plus"></i> 新增
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th class="row-selected">
|
|
||||||
<input class="checkbox check-all" type="checkbox">
|
|
||||||
</th>
|
|
||||||
<th>ID</th>
|
|
||||||
<th>名称</th>
|
|
||||||
<th>上级菜单</th>
|
|
||||||
<th>分组</th>
|
|
||||||
<th>URL</th>
|
|
||||||
<th>排序</th>
|
|
||||||
<th>仅开发者模式显示</th>
|
|
||||||
<th>隐藏</th>
|
|
||||||
<th>操作</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
{notempty name="list"}
|
|
||||||
{volist name="list" id="menu"}
|
|
||||||
<tr>
|
|
||||||
<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$menu.id}"></td>
|
|
||||||
<td>{$menu.id}</td>
|
|
||||||
<td>
|
|
||||||
{$menu['level_show']}
|
|
||||||
<a href="#" class="editable editable-click" data-id="{$menu['id']}" data-name="title" data-type="text" data-pk="{$menu['id']}" data-url="{:url('editable')}">{$menu['title']}</a>
|
|
||||||
<a class="add-sub-cate" title="添加子分类" href="{:url('add?pid='.$menu['id'])}">
|
|
||||||
<i class="fa fa-plus-square"></i>
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
<a class="btn btn-primary" onclick="$.operate.edit()">
|
||||||
<td>{$menu.up_title|default='无'}</td>
|
<i class="fa fa-edit"></i> 修改
|
||||||
<td>{$menu.group}</td>
|
|
||||||
<td>{$menu.url}</td>
|
|
||||||
<td><a href="#" class="editable editable-click" data-id="{$menu['id']}" data-name="sort" data-type="text" data-pk="{$menu['id']}" data-url="{:url('editable')}">{$menu['sort']}</a></td>
|
|
||||||
<td>
|
|
||||||
<a href="{:url('toogleDev',array('id'=>$menu['id'],'value'=>abs($menu['is_dev']-1)))}"
|
|
||||||
class="ajax-get">
|
|
||||||
{$menu.is_dev_text}
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
<a class="btn btn-info" id="expandAllBtn">
|
||||||
<td>
|
<i class="fa fa-exchange"></i> 展开/折叠
|
||||||
<a href="{:url('toogleHide',array('id'=>$menu['id'],'value'=>abs($menu['hide']-1)))}"
|
|
||||||
class="ajax-get">
|
|
||||||
{$menu.hide_text}
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a title="编辑" href="{:url('edit?id='.$menu['id'])}">编辑</a>
|
|
||||||
<a class="confirm ajax-get" title="删除" href="{:url('del?id='.$menu['id'])}">删除</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/volist}
|
|
||||||
{else/}
|
|
||||||
<td colspan="10" class="text-center"> aOh! 暂时还没有内容!</td>
|
|
||||||
{/notempty}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
<div class="table-striped">
|
||||||
|
<table id="bootstrap-tree-table"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-editable.min.js"></script>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function(){
|
||||||
$.fn.editable.defaults.mode = 'popup';
|
var addFlag = "";
|
||||||
$.fn.editableform.buttons = '<button type="submit" class="btn btn-success editable-submit btn-mini"><i class="fa fa-check-square-o fa-white"></i></button>' +
|
var editFlag = "";
|
||||||
'<button type="button" class="btn editable-cancel btn-mini"><i class="fa fa-times"></i></button>';
|
var removeFlag = "";
|
||||||
$('.editable').editable();
|
|
||||||
//搜索功能
|
$.treeTable.init({
|
||||||
$("#search").click(function () {
|
code: "id",
|
||||||
var url = $(this).attr('url');
|
parentCode: "pid",
|
||||||
var query = $('.search-form').find('input').serialize();
|
uniqueId: "id",
|
||||||
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
|
expandAll: false,
|
||||||
query = query.replace(/^&/g, '');
|
expandFirst: false,
|
||||||
if (url.indexOf('?') > 0) {
|
url: "/admin/menu/index",
|
||||||
url += '&' + query;
|
createUrl: "/admin/menu/add/{id}",
|
||||||
|
updateUrl: "/admin/menu/edit/{id}",
|
||||||
|
removeUrl: "/admin/menu/remove/{id}",
|
||||||
|
modalName: "菜单",
|
||||||
|
columns:[
|
||||||
|
{field: 'selectItem', radio: true},
|
||||||
|
{
|
||||||
|
title: '菜单名称',
|
||||||
|
field: 'title',
|
||||||
|
width: '20%',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
if ($.common.isEmpty(row.icon)) {
|
||||||
|
return row.title;
|
||||||
} else {
|
} else {
|
||||||
url += '?' + query;
|
return '<i class="' + row.icon + '"></i> <span class="nav-label">' + row.title + '</span>';
|
||||||
}
|
}
|
||||||
window.location.href = url;
|
|
||||||
});
|
|
||||||
//回车搜索
|
|
||||||
$(".search-input").keyup(function (e) {
|
|
||||||
if (e.keyCode === 13) {
|
|
||||||
$("#search").click();
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'sort',
|
||||||
|
title: '排序',
|
||||||
|
width: '10%',
|
||||||
|
align: "left"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'url',
|
||||||
|
title: '请求地址',
|
||||||
|
width: '15%',
|
||||||
|
align: "left"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
width: '20%',
|
||||||
|
align: "left",
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.menuId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.menuId + '\')"><i class="fa fa-plus"></i>新增</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.menuId + '\')"><i class="fa fa-trash"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
});
|
});
|
||||||
});
|
})
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
Reference in New Issue
Block a user