first commit
This commit is contained in:
8
WebRoot/plugins/bootstrap-table/extensions/page-jumpto/bootstrap-table-jumpto.css
vendored
Normal file
8
WebRoot/plugins/bootstrap-table/extensions/page-jumpto/bootstrap-table-jumpto.css
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
.jumpto input {
|
||||
height: 31px;
|
||||
width: 50px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
50
WebRoot/plugins/bootstrap-table/extensions/page-jumpto/bootstrap-table-jumpto.js
vendored
Normal file
50
WebRoot/plugins/bootstrap-table/extensions/page-jumpto/bootstrap-table-jumpto.js
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @author Jay <jwang@dizsoft.com>
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
'use strict';
|
||||
var sprintf = $.fn.bootstrapTable.utils.sprintf;
|
||||
|
||||
$.extend($.fn.bootstrapTable.defaults, {
|
||||
showJumpto: false,
|
||||
exportOptions: {}
|
||||
});
|
||||
|
||||
$.extend($.fn.bootstrapTable.locales, {
|
||||
formatJumpto: function () {
|
||||
return 'GO';
|
||||
}
|
||||
});
|
||||
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
|
||||
|
||||
var BootstrapTable = $.fn.bootstrapTable.Constructor,
|
||||
_initPagination = BootstrapTable.prototype.initPagination;
|
||||
|
||||
BootstrapTable.prototype.initPagination = function () {
|
||||
_initPagination.apply(this, Array.prototype.slice.apply(arguments));
|
||||
|
||||
if (this.options.showJumpto) {
|
||||
var that = this,
|
||||
$pageGroup = this.$pagination.find('ul.pagination'),
|
||||
$jumpto = $pageGroup.find('li.jumpto');
|
||||
|
||||
if (!$jumpto.length) {
|
||||
$jumpto = $([
|
||||
'<li class="jumpto">',
|
||||
'<input type="text" class="form-control">',
|
||||
'<button class="btn' +
|
||||
sprintf(' btn-%s', this.options.buttonsClass) +
|
||||
sprintf(' btn-%s', this.options.iconSize) +
|
||||
'" title="' + this.options.formatJumpto() + '" ' +
|
||||
' type="button">'+this.options.formatJumpto(),
|
||||
'</button>',
|
||||
'</li>'].join('')).appendTo($pageGroup);
|
||||
|
||||
$jumpto.find('button').click(function () {
|
||||
that.selectPage(parseInt($jumpto.find('input').val()));
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
||||
7
WebRoot/plugins/bootstrap-table/extensions/page-jumpto/bootstrap-table-jumpto.min.js
vendored
Normal file
7
WebRoot/plugins/bootstrap-table/extensions/page-jumpto/bootstrap-table-jumpto.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";var b=a.fn.bootstrapTable.utils.sprintf;a.extend(a.fn.bootstrapTable.defaults,{showJumpto:!1,exportOptions:{}}),a.extend(a.fn.bootstrapTable.locales,{formatJumpto:function(){return"GO"}}),a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales);var c=a.fn.bootstrapTable.Constructor,d=c.prototype.initPagination;c.prototype.initPagination=function(){if(d.apply(this,Array.prototype.slice.apply(arguments)),this.options.showJumpto){var c=this,e=this.$pagination.find("ul.pagination"),f=e.find("li.jumpto");f.length||(f=a(['<li class="jumpto">','<input type="text" class="form-control">','<button class="btn'+b(" btn-%s",this.options.buttonsClass)+b(" btn-%s",this.options.iconSize)+'" title="'+this.options.formatJumpto()+'" type="button">'+this.options.formatJumpto(),"</button>","</li>"].join("")).appendTo(e),f.find("button").click(function(){c.selectPage(parseInt(f.find("input").val()))}))}}}(jQuery);
|
||||
Reference in New Issue
Block a user