正在显示
2 个修改的文件
包含
9 行增加
和
4 行删除
@@ -8,12 +8,9 @@ | @@ -8,12 +8,9 @@ | ||
8 | <div id="toolbar" class="toolbar"> | 8 | <div id="toolbar" class="toolbar"> |
9 | <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a> | 9 | <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a> |
10 | <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a> | 10 | <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a> |
11 | - <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('school/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a> | ||
12 | - <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('school/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a> | ||
13 | 11 | ||
14 | 12 | ||
15 | <div class="dropdown btn-group {:$auth->check('school/multi')?'':'hide'}"> | 13 | <div class="dropdown btn-group {:$auth->check('school/multi')?'':'hide'}"> |
16 | - <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a> | ||
17 | <ul class="dropdown-menu text-left" role="menu"> | 14 | <ul class="dropdown-menu text-left" role="menu"> |
18 | <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li> | 15 | <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li> |
19 | <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li> | 16 | <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li> |
@@ -17,6 +17,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -17,6 +17,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
17 | 17 | ||
18 | var table = $("#table"); | 18 | var table = $("#table"); |
19 | 19 | ||
20 | + //顶部搜索栏 | ||
21 | + table.on('post-common-search.bs.table', function (event, table) { | ||
22 | + var form = $("form", table.$commonsearch); | ||
23 | + //类型名称 | ||
24 | + $("input[name='title']", form).addClass("selectpage").data("source", "school/index").data("primaryKey", "id").data("field", "title").data("orderBy", "id desc"); | ||
25 | + Form.events.cxselect(form); | ||
26 | + Form.events.selectpage(form); | ||
27 | + }); | ||
20 | // 初始化表格 | 28 | // 初始化表格 |
21 | table.bootstrapTable({ | 29 | table.bootstrapTable({ |
22 | url: $.fn.bootstrapTable.defaults.extend.index_url, | 30 | url: $.fn.bootstrapTable.defaults.extend.index_url, |
@@ -31,7 +39,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -31,7 +39,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
31 | columns: [ | 39 | columns: [ |
32 | [ | 40 | [ |
33 | {checkbox: true}, | 41 | {checkbox: true}, |
34 | - {field: 'id', title: __('Id')}, | 42 | + {field: 'id', title: __('ID'), operate: false}, |
35 | {field: 'title', title: __('Title'), operate: 'LIKE'}, | 43 | {field: 'title', title: __('Title'), operate: 'LIKE'}, |
36 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | 44 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} |
37 | ] | 45 | ] |
-
请 注册 或 登录 后发表评论