first commit
This commit is contained in:
32
WebRoot/plugins/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js
vendored
Normal file
32
WebRoot/plugins/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
/**
|
||||
* 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);
|
||||
7
WebRoot/plugins/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.min.js
vendored
Normal file
7
WebRoot/plugins/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.min.js
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
/*
|
||||
* bootstrap-table - v1.12.1 - 2018-03-12
|
||||
* https://github.com/wenzhixin/bootstrap-table
|
||||
* Copyright (c) 2018 zhixin wen
|
||||
* Licensed MIT License
|
||||
*/
|
||||
!function(a){"use strict";a.extend(a.fn.bootstrapTable.defaults,{deferUrl:void 0});var b=a.fn.bootstrapTable.Constructor,c=b.prototype.init;b.prototype.init=function(){c.apply(this,Array.prototype.slice.apply(arguments)),this.options.deferUrl&&(this.options.url=this.options.deferUrl)}}(jQuery);
|
||||
Reference in New Issue
Block a user