| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <include file="public@header"/>
- </head>
- <body>
- <div class="wrap js-check-wrap">
- <form class="well form-inline margin-top-20" method="post" action="{:url('AdminActivity/select')}">
- 关键字:
- <input type="text" class="form-control" name="keyword" style="width: 200px;display:inline;"
- value="{$keyword|default=''}" placeholder="请输入关键字...">
- <input type="submit" class="btn btn-primary" value="搜索"/>
- <a class="btn btn-danger" href="{:url('AdminActivity/select')}">清空</a>
- </form>
- <form method="post" class="js-ajax-form">
- <table class="table table-hover table-bordered table-list">
- <thead>
- <tr>
- <th width="16">
- </th>
- <th width="50">ID</th>
- <th>活动名称</th>
- </tr>
- </thead>
- <tbody>
- <foreach name="activity" item="vo">
- <tr>
- <td>
- <input type="radio" class="js-check" name="id" data-title="{$vo.title}" data-user_id="{$vo.user_id}" value="{$vo.id}">
- </td>
- <td>{$vo.id}</td>
- <td>{$vo.title}</td>
- </tr>
- </foreach>
- </tbody>
- </table>
- </form>
- </div>
- <script src="__STATIC__/js/admin.js"></script>
- <script>
- Wind.css('layer');
- $('.data-item-tr').click(function (e) {
- var $this = $(this);
- if ($(e.target).is('input')) {
- return;
- }
- var $input = $this.find('input');
- if ($input.is(':checked')) {
- $input.prop('checked', false);
- } else {
- $input.prop('checked', true);
- }
- });
- function confirm() {
- if ($('.js-check:checked').length == 0) {
- return false;
- } else {
- return {
- id: $('.js-check:checked').val(),
- title: $('.js-check:checked').data('title'),
- user_id: $('.js-check:checked').data('user_id'),
- };
- }
- }
- </script>
- </body>
- </html>
|