1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| var table = $('#eventtable').DataTable({ "processing":true, "serverSide":true, "stateSave": true, "ajax": "{% url 'event:eventlist' %}", "autoWidth":true, "lengthMenu": [10,50, 100], "displayLength": 10, "info":false, "columns": [ { "class":'details-control', "orderable": true, "data": null, "defaultContent": '', }, {"data": "event_title"}, {"data": "event_deadline"}, {"data": "event_level"}, {"data": "event_workload"}, {"data": "event_label"}, {"data": "event_status"}, {"data": "button"}, ], "order": [[2, 'asc']], "language": { "processing": "处理中...", "lengthMenu": "显示 _MENU_ 项结果", "zeroRecords": "没有找到相应的结果", "info": "第 _START_ 至 _END_ 行,共 _TOTAL_ 行", "infoEmpty": "第 0 至 0 项结果,共 0 项", "infoFiltered": "(由 _MAX_ 项结果过滤)", "infoPostFix": "", "url": "", "thousands": "'", "emptyTable": "表中数据为空", "loadingRecords": "载入中...", "infoThousands": ",", "paginate": { "first": "首页", "previous": "上页", "next": "下页", "last": "末页" } }, "sDom": "<'row'<'col-md-6'<'#toolbar'>><'col-md-6'f>>" + "t" + "<'row'<'col-md-5 sm-center'li><'col-md-7 text-right sm-center'p>>" } ); $("#toolbar").append('<a href="{% url "event:eventedit" %}"><button type="button" class="btn btn-primary"><i class="fa fa-plus-square"></i>  新建代办</button></a>')
|