Sha256: 4015b85a445ef13f39e9cba5d43c73557af4d084b4a77c6c9fb58805d7e29d90

Contents?: true

Size: 1.08 KB

Versions: 2

Compression:

Stored size: 1.08 KB

Contents

/**
 * When using server-side processing, the default mode of operation for
 * bootstrap-table is to simply throw away any data that currently exists in the
 * table and make a request to the server to get the first page of data to
 * display. This is fine for an empty table, but if you already have the first
 * page of data displayed in the plain HTML, it is a waste of resources. As
 * such, you can use data-defer-url instead of data-url to allow you to instruct
 * bootstrap-table to not make that initial request, rather it will use the data
 * already on the page.
 *
 * @author: Ruben Suarez
 * @webSite: http://rubensa.eu.org
 * @version: v1.0.0
 */

(function($) {
    'use strict';

    $.extend($.fn.bootstrapTable.defaults, {
        deferUrl : undefined
    });

    var BootstrapTable = $.fn.bootstrapTable.Constructor, _init = BootstrapTable.prototype.init;

    BootstrapTable.prototype.init = function() {
        _init.apply(this, Array.prototype.slice.apply(arguments));

        if (this.options.deferUrl) {
            this.options.url = this.options.deferUrl;
        }
    }
})(jQuery);

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bootstrap-table-rails-1.12.2 vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js
bootstrap-table-rails-1.12.1 vendor/assets/javascripts/extensions/bootstrap-table-defer-url.js