对于yii用 CPagination分页url解析问题

Yii自带的CPagination对表格分页后,将URL解析成static/locus/area_id/0/start/2013-09-24/end/2013-10-17/page/2.html格式时,前文写的排序会不起作用,所以将URL转换成/static/locus.html?area_id=0&start=2013-09-24&end=2013-10-17&id=area_id&order=1

$(function(){
        var prefix = "/admin/static/locus";
        $(".yiiPager li a").each(function(){
            var href = $(this).attr("href")
                .replace(prefix + "/", "")
                .replace(".html", "")
                .replace(/([^/]+)\/([^/]*)/g, "$1=$2")
                .replace(/\//g, "&");
            $(this).attr("href", prefix + ".html?" + href);
        });
    });

你可能感兴趣的:(yii,CPagination)