src/main/webapp/resources/assets2/js/footable/js/footable.paginate.js

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

(function ($, w, undefined) {
    if (w.footable === undefined || w.footable === null)
        throw new Error('Please check and make sure footable.js is included in the page and is loaded prior to this script.');

    var defaults = {
        paginate: true,
        pageSize: 10,
        pageNavigation: '.pagination',
        firstText: '«',
        previousText: '‹',
        nextText: '›',
        lastText: '»'
    };

    function pageInfo(ft) {
        var $table = $(ft.table), $tbody = $table.find('> tbody');
        this.pageNavigation = $table.data('page-navigation') || ft.options.pageNavigation;
        this.pageSize = $table.data('page-size') || ft.options.pageSize;
        this.firstText = $table.data('page-first-text') || ft.options.firstText;
        this.previousText = $table.data('page-previous-text') || ft.options.previousText;
        this.nextText = $table.data('page-next-text') || ft.options.nextText;
        this.lastText = $table.data('page-last-text') || ft.options.lastText;
        this.currentPage = 0;
        this.pages = [];
        this.control = false;
    }

    function Paginate() {
        var p = this;
        p.name = 'Footable Paginate';

        p.init = function (ft) {
            if (ft.options.paginate === true) {
                if ($(ft.table).data('page') === false) return;
                p.footable = ft;
                $(ft.table)
                    .unbind('.paging')
                    .bind({
                        'footable_initialized.paging footable_row_removed.paging footable_redrawn.paging footable_sorted.paging footable_filtered.paging': function () {
                            p.setupPaging();
                        }
                    })
                    //save the filter object onto the table so we can access it later
                    .data('footable-paging', p);
            }
        };

        p.setupPaging = function () {
            var ft = p.footable,
                $tbody = $(ft.table).find('> tbody');

            if (!ft.pageInfo) {
                ft.pageInfo = new pageInfo(ft);
            }

            p.createPages(ft, $tbody);
            p.createNavigation(ft, $tbody);
            p.fillPage(ft, $tbody, ft.pageInfo.currentPage);
        };

后面还有 131 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。