Ejemplo n.º 1
0
<?php

use yii\web\View;
use yii\helpers\Url;
use yii\helpers\Html;
use app\assets\AppAsset;
use yii\widgets\LinkPager;
AppAsset::register($this);
AppAsset::addCss($this, '@web/static/css/buff.css');
// echo Html::cssFile('@web/static/css/buff.css');
$js = "\n" . 'var buff_url = "' . Url::toRoute(['/buff/checkbuff']) . '";';
$js .= "\n" . 'var comment_url = "' . Url::toRoute(['/buff/checkcomment']) . '";';
$js .= "\n" . 'var check_url = "' . Url::toRoute(['/buff/checkpass']) . '";';
$js .= "\n" . 'var top_url = "' . Url::toRoute(['/buff/checktop']) . '";';
$js .= "\n" . 'var search_url = "' . Url::toRoute(['/buff/index']) . '";';
$js .= "\n" . 'var start_time = "' . ($search['start_time'] ? $search['start_time'] : '') . '";';
$js .= "\n" . 'var end_time = "' . ($search['end_time'] ? $search['end_time'] : '') . '";';
$js .= <<<JS
var top_num = null;
function checkbox(){
    //点击td选中input
    \$('.checkbox-out-td').click(function(){
        var obj=\$(this);
        var input=obj.children('input');
        if (input.prop('checked')) {
            input.prop('checked',false);
        }
        else{
            input.prop('checked',true);
        }
        if (obj.attr('id')=='checkall-out-td') {