123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- {include file="common/header"/}
- <div class="LM-container">
- <div class="LM-main">
- <fieldset class="layui-elem-field layui-field-title">
- <legend>{:lang('config group')}{:lang('list')}</legend>
- </fieldset>
- <table class="layui-table layui-hide" id="list" lay-filter="list"></table>
- </div>
- </div>
- <script type="text/html" id="action">
- <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">{:lang('del')}</a>
- </script>
- {include file="common/footer"/}
- <script>
- layui.use(['form', 'table'], function () {
- var $ = layui.jquery,
- form = layui.form,
- table = layui.table;
- var info = {:json_encode($info)};
- var tableIn = table.render({
- elem: '#list',
- data:info,
- cols: [[
- {checkbox: true, fixed: true},
- {field: 'id', title: 'ID', width: 80, sort: true},
- {field: 'title', title: '分组标题', width: 250,sort: true},
- {field: 'name', title: '分组名', width: 120,sort: true},
- {title:'操作',width:120, toolbar: '#action',align:"center"}
- ]],
- limits: [10, 15, 20, 25, 50, 100],
- limit: 15,
- page: false
- });
- table.on('tool(list)', function(obj){
- var data = obj.data;
- var id = data.id;
- if(obj.event === 'del'){
- layer.confirm('{:lang("Are you sure you want to delete it")}', function(index){
- loading =layer.load(1, {shade: [0.1,'#fff']});
- $.post("{:url('configGroupDel')}",{id:data.id},function(res){
- layer.close(loading);
- if(res.code>0){
- layer.msg(res.msg,{time:1000,icon:1});
- obj.del();
- }else{
- layer.msg(res.msg,{time:1000,icon:2});
- }
- });
- });
- }
- });
- });
- </script>
|