refactor(bootstrap-table): 升级版本到1.14.2

This commit is contained in:
Argo Zhang 2019-05-25 13:33:29 +08:00
parent 6ee3eedd22
commit fd4d0abdf6
16 changed files with 3789 additions and 3080 deletions

View File

@ -47,7 +47,7 @@
},
{
"provider": "cdnjs",
"library": "bootstrap-table@1.12.1",
"library": "bootstrap-table@1.14.2",
"destination": "wwwroot/lib/bootstrap-table/",
"files": [
"bootstrap-table.min.js",

View File

@ -613,6 +613,34 @@ li[data-category="1"] .dd3-content .menuType {
word-break: break-all;
}
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .loading-text {
font-size: 0.875rem;
}
.bootstrap-table td, .bootstrap-table .fixed-table-container .table thead th .th-inner {
padding: 0.5rem;
}
.bootstrap-table .fixed-table-container .table thead th .th-inner.sortable {
padding-right: 30px;
}
.bootstrap-table .table tbody tr:nth-of-type(odd) {
background-color: rgba(0,0,0,.05);
}
.bootstrap-table .fixed-table-container .fixed-table-body {
border-radius: 4px;
}
.bootstrap-table .fixed-table-container .fixed-table-body .table .bs-checkbox label {
margin-bottom: 0;
}
.bootstrap-table .fixed-table-container .fixed-table-body .table .bs-checkbox label input[type='checkbox'] {
cursor: pointer;
}
pre {
padding: 5px;
margin: 5px;

View File

@ -349,14 +349,10 @@ input.pending {
margin-bottom: 15px;
}
.bootstrap-table .fixed-table-body .table {
border-bottom: none;
.bootstrap-table .fixed-table-body .table td > a {
display: block;
}
.bootstrap-table .fixed-table-body .table td > a {
display: block;
}
.bootstrap-table .fixed-table-toolbar .columns-right .btn-group .dropdown-menu {
padding-top: 8px;
}

View File

@ -87,7 +87,7 @@ $(function () {
},
events: {
'click .menu': function (e, value, row, index) {
var $plus = $(this).prev();
var $plus = $(e.target).prev();
if ($plus.hasClass('fa')) {
$plus.trigger('click');
}
@ -142,15 +142,15 @@ $(function () {
idField: "Id",
treeShowField: 'Name',
parentIdField: 'ParentId',
onPreBody: function(data) {
if($('#txt_parent_menus_name').val() !== '') {
onPreBody: function (data) {
if ($('#txt_parent_menus_name').val() !== '' || $('#sel_menus_res').val() === '2') {
this.treeShowField = false;
}
else {
this.treeShowField = 'Name';
}
var bt = $table.data('bootstrap.table');
if(bt) {
if (bt) {
bt.treeEnable = !!this.treeShowField;
}
},

View File

@ -1,318 +1,282 @@
@charset "UTF-8";
/**
* @author zhixin wen <wenzhixin2010@gmail.com>
* version: 1.12.1
* version: 1.14.2
* https://github.com/wenzhixin/bootstrap-table/
*/
.bootstrap-table .table {
margin-bottom: 0 !important;
border-bottom: 1px solid #dddddd;
border-collapse: collapse !important;
border-radius: 1px;
.bootstrap-table .fixed-table-toolbar:after {
content: "";
display: block;
clear: both;
}
.bootstrap-table .table:not(.table-condensed),
.bootstrap-table .table:not(.table-condensed) > tbody > tr > th,
.bootstrap-table .table:not(.table-condensed) > tfoot > tr > th,
.bootstrap-table .table:not(.table-condensed) > thead > tr > td,
.bootstrap-table .table:not(.table-condensed) > tbody > tr > td,
.bootstrap-table .table:not(.table-condensed) > tfoot > tr > td {
padding: 8px;
.bootstrap-table .fixed-table-toolbar .bs-bars,
.bootstrap-table .fixed-table-toolbar .search,
.bootstrap-table .fixed-table-toolbar .columns {
position: relative;
margin-top: 10px;
margin-bottom: 10px;
}
.bootstrap-table .table.table-no-bordered > thead > tr > th,
.bootstrap-table .table.table-no-bordered > tbody > tr > td {
border-right: 2px solid transparent;
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group {
display: inline-block;
margin-left: -1px !important;
}
.bootstrap-table .table.table-no-bordered > tbody > tr > td:last-child {
border-right: none;
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group:first-child > .btn {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.fixed-table-container {
position: relative;
clear: both;
border: 1px solid #dddddd;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group:last-child > .btn {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.fixed-table-container.table-no-bordered {
border: 1px solid transparent;
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group > .btn {
border-radius: 0;
}
.fixed-table-footer,
.fixed-table-header {
overflow: hidden;
.bootstrap-table .fixed-table-toolbar .columns .dropdown-menu {
text-align: left;
max-height: 300px;
overflow: auto;
}
.fixed-table-footer {
border-top: 1px solid #dddddd;
.bootstrap-table .fixed-table-toolbar .columns label {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.428571429;
}
.fixed-table-body {
overflow-x: auto;
overflow-y: auto;
height: 100%;
.bootstrap-table .fixed-table-toolbar .columns-left {
margin-right: 5px;
}
.fixed-table-container table {
width: 100%;
.bootstrap-table .fixed-table-toolbar .columns-right {
margin-left: 5px;
}
.fixed-table-container thead th {
height: 0;
padding: 0;
margin: 0;
border-left: 1px solid #dddddd;
.bootstrap-table .fixed-table-toolbar .pull-right .dropdown-menu {
right: 0;
left: auto;
}
.fixed-table-container thead th:focus {
outline: 0 solid transparent;
.bootstrap-table .fixed-table-container {
position: relative;
clear: both;
}
.fixed-table-container thead th:first-child:not([data-not-first-th]) {
border-left: none;
border-top-left-radius: 4px;
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
.bootstrap-table .fixed-table-container.fixed-height:not(.has-footer) {
border-bottom: 1px solid #dee2e6;
}
.fixed-table-container thead th .th-inner,
.fixed-table-container tbody td .th-inner {
padding: 8px;
line-height: 24px;
vertical-align: top;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.bootstrap-table .fixed-table-container.fixed-height .fixed-table-border {
border-left: 1px solid #dee2e6;
border-right: 1px solid #dee2e6;
}
.fixed-table-container thead th .sortable {
cursor: pointer;
background-position: right;
background-repeat: no-repeat;
padding-right: 30px;
.bootstrap-table .fixed-table-container.fixed-height .table thead th {
border-bottom: 1px solid #dee2e6;
}
.fixed-table-container thead th .both {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC');
.bootstrap-table .fixed-table-container.fixed-height .table-dark thead th {
border-bottom: 1px solid #32383e;
}
.fixed-table-container thead th .asc {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==');
.bootstrap-table .fixed-table-container .fixed-table-header {
overflow: hidden;
}
.fixed-table-container thead th .desc {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= ');
.bootstrap-table .fixed-table-container .fixed-table-body {
overflow-x: auto;
overflow-y: auto;
height: 100%;
}
.fixed-table-container th.detail {
width: 30px;
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading {
align-items: center;
background: #fff;
display: none;
justify-content: center;
position: absolute;
bottom: 0;
width: 100%;
z-index: 1000;
}
.fixed-table-container tbody td {
border-left: 1px solid #dddddd;
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap {
align-items: baseline;
display: flex;
justify-content: center;
}
.fixed-table-container tbody tr:first-child td {
border-top: none;
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .loading-text {
font-size: 2rem;
margin-right: 6px;
}
.fixed-table-container tbody td:first-child {
border-left: none;
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap {
align-items: center;
display: flex;
justify-content: center;
}
/* the same color with .active */
.fixed-table-container tbody .selected td {
background-color: #f5f5f5;
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot,
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap:after,
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap:before {
content: "";
animation-duration: 1.5s;
animation-iteration-count: infinite;
animation-name: LOADING;
background: #212529;
border-radius: 50%;
display: block;
height: 5px;
margin: 0 4px;
opacity: 0;
width: 5px;
}
.fixed-table-container .bs-checkbox {
text-align: center;
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot {
animation-delay: 0.3s;
}
.fixed-table-container input[type="radio"],
.fixed-table-container input[type="checkbox"] {
margin: 0 auto !important;
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap:after {
animation-delay: 0.6s;
}
.fixed-table-container .no-records-found {
text-align: center;
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark {
background: #212529;
}
.fixed-table-pagination div.pagination,
.fixed-table-pagination .pagination-detail {
margin-top: 10px;
margin-bottom: 10px;
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-dot,
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap:after,
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap:before {
background: #fff;
}
.fixed-table-pagination div.pagination .pagination {
margin: 0;
.bootstrap-table .fixed-table-container .table {
width: 100%;
margin-bottom: 0 !important;
}
.fixed-table-pagination .pagination a {
padding: 6px 12px;
line-height: 1.428571429;
.bootstrap-table .fixed-table-container .table th,
.bootstrap-table .fixed-table-container .table td {
vertical-align: middle;
box-sizing: border-box;
}
.fixed-table-pagination .pagination-info {
line-height: 34px;
margin-right: 5px;
.bootstrap-table .fixed-table-container .table thead th {
vertical-align: bottom;
padding: 0;
margin: 0;
}
.fixed-table-pagination .btn-group {
position: relative;
display: inline-block;
vertical-align: middle;
.bootstrap-table .fixed-table-container .table thead th:focus {
outline: 0 solid transparent;
}
.fixed-table-pagination .dropup .dropdown-menu {
margin-bottom: 0;
.bootstrap-table .fixed-table-container .table thead th.detail {
width: 30px;
}
.fixed-table-pagination .page-list {
display: inline-block;
.bootstrap-table .fixed-table-container .table thead th .th-inner {
padding: 0.75rem;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fixed-table-toolbar .columns-left {
margin-right: 5px;
.bootstrap-table .fixed-table-container .table thead th .sortable {
cursor: pointer;
background-position: right;
background-repeat: no-repeat;
padding-right: 30px;
}
.fixed-table-toolbar .columns-right {
margin-left: 5px;
.bootstrap-table .fixed-table-container .table thead th .both {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC");
}
.fixed-table-toolbar .columns label {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.428571429;
.bootstrap-table .fixed-table-container .table thead th .asc {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==");
}
.fixed-table-toolbar .bs-bars,
.fixed-table-toolbar .search,
.fixed-table-toolbar .columns {
position: relative;
margin-top: 10px;
margin-bottom: 10px;
line-height: 34px;
.bootstrap-table .fixed-table-container .table thead th .desc {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= ");
}
.fixed-table-pagination li.disabled a {
pointer-events: none;
cursor: default;
.bootstrap-table .fixed-table-container .table tbody tr.selected td {
background-color: rgba(0, 0, 0, 0.075);
}
.fixed-table-loading {
display: none;
position: absolute;
top: 42px;
right: 0;
bottom: 0;
left: 0;
z-index: 99;
background-color: #fff;
text-align: center;
.bootstrap-table .fixed-table-container .table tbody tr.no-records-found {
text-align: center;
}
.fixed-table-body .card-view .title {
font-weight: bold;
display: inline-block;
min-width: 30%;
text-align: left !important;
.bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-title {
font-weight: bold;
display: inline-block;
min-width: 30%;
text-align: left !important;
}
/* support bootstrap 2 */
.fixed-table-body thead th .th-inner {
box-sizing: border-box;
.bootstrap-table .fixed-table-container .table .bs-checkbox {
text-align: center;
}
.table th, .table td {
vertical-align: middle;
box-sizing: border-box;
.bootstrap-table .fixed-table-container .table input[type=radio],
.bootstrap-table .fixed-table-container .table input[type=checkbox] {
margin: 0 auto !important;
}
.fixed-table-toolbar .dropdown-menu {
text-align: left;
max-height: 300px;
overflow: auto;
.bootstrap-table .fixed-table-container .table.table-sm .th-inner {
padding: 0.3rem;
}
.fixed-table-toolbar .btn-group > .btn-group {
display: inline-block;
margin-left: -1px !important;
.bootstrap-table .fixed-table-container .fixed-table-footer {
overflow: hidden;
}
.fixed-table-toolbar .btn-group > .btn-group > .btn {
border-radius: 0;
.bootstrap-table .fixed-table-pagination:after {
content: "";
display: block;
clear: both;
}
.fixed-table-toolbar .btn-group > .btn-group:first-child > .btn {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
.bootstrap-table .fixed-table-pagination > .pagination-detail,
.bootstrap-table .fixed-table-pagination > .pagination {
margin-top: 10px;
margin-bottom: 10px;
}
.fixed-table-toolbar .btn-group > .btn-group:last-child > .btn {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
.bootstrap-table .fixed-table-pagination > .pagination-detail .pagination-info {
line-height: 34px;
margin-right: 5px;
}
.bootstrap-table .table > thead > tr > th {
vertical-align: bottom;
border-bottom: 1px solid #ddd;
.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list {
display: inline-block;
}
/* support bootstrap 3 */
.bootstrap-table .table thead > tr > th {
padding: 0;
margin: 0;
.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list .btn-group {
position: relative;
display: inline-block;
vertical-align: middle;
}
.bootstrap-table .fixed-table-footer tbody > tr > td {
padding: 0 !important;
.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list .btn-group .dropdown-menu {
margin-bottom: 0;
}
.bootstrap-table .fixed-table-footer .table {
border-bottom: none;
border-radius: 0;
padding: 0 !important;
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination {
margin: 0;
}
.bootstrap-table .pull-right .dropdown-menu {
right: 0;
left: auto;
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination a {
padding: 6px 12px;
line-height: 1.428571429;
}
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a {
color: #c8c8c8;
}
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a:before {
content: "⬅";
}
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a:after {
content: "➡";
}
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.disabled a {
pointer-events: none;
cursor: default;
}
.bootstrap-table.fullscreen {
position: fixed;
top: 0;
left: 0;
z-index: 1050;
width: 100% !important;
background: #FFF;
}
/* calculate scrollbar width */
p.fixed-table-scroll-inner {
width: 100%;
height: 200px;
div.fixed-table-scroll-inner {
width: 100%;
height: 200px;
}
div.fixed-table-scroll-outer {
top: 0;
left: 0;
visibility: hidden;
width: 200px;
height: 150px;
overflow: hidden;
top: 0;
left: 0;
visibility: hidden;
width: 200px;
height: 150px;
overflow: hidden;
}
/* for get correct heights */
.fixed-table-toolbar:after, .fixed-table-pagination:after {
content: "";
display: block;
clear: both;
@keyframes LOADING {
0% {
opacity: 0;
}
50% {
opacity: 1;
}
to {
opacity: 0;
}
}
.fullscreen {
position: fixed;
top: 0;
left: 0;
z-index: 1050;
width: 100%!important;
background: #FFF;
}
/*# sourceMappingURL=bootstrap-table.css.map */

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,179 +1,350 @@
/**
* @author zhixin wen <wenzhixin2010@gmail.com>
* extensions: https://github.com/kayalshri/tableExport.jquery.plugin
*/
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define([], factory);
} else if (typeof exports !== "undefined") {
factory();
} else {
var mod = {
exports: {}
};
factory();
global.bootstrapTableExport = mod.exports;
}
})(this, function () {
'use strict';
(function ($) {
'use strict';
var sprintf = $.fn.bootstrapTable.utils.sprintf;
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
var _get = function get(object, property, receiver) {
if (object === null) object = Function.prototype;
var desc = Object.getOwnPropertyDescriptor(object, property);
if (desc === undefined) {
var parent = Object.getPrototypeOf(object);
if (parent === null) {
return undefined;
} else {
return get(parent, property, receiver);
}
} else if ("value" in desc) {
return desc.value;
} else {
var getter = desc.get;
if (getter === undefined) {
return undefined;
}
return getter.call(receiver);
}
};
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
/**
* @author zhixin wen <wenzhixin2010@gmail.com>
* extensions: https://github.com/hhurz/tableExport.jquery.plugin
*/
(function ($) {
var Utils = $.fn.bootstrapTable.utils;
var bootstrap = {
3: {
icons: {
export: 'glyphicon-export icon-share'
},
html: {
dropmenu: '<ul class="dropdown-menu" role="menu"></ul>',
dropitem: '<li role="menuitem" data-type="%s"><a href="javascript:">%s</a></li>'
}
},
4: {
icons: {
export: 'fa-download'
},
html: {
dropmenu: '<div class="dropdown-menu dropdown-menu-right"></div>',
dropitem: '<a class="dropdown-item" data-type="%s" href="javascript:">%s</a>'
}
}
}[Utils.bootstrapVersion];
var TYPE_NAME = {
json: 'JSON',
xml: 'XML',
png: 'PNG',
csv: 'CSV',
txt: 'TXT',
sql: 'SQL',
doc: 'MS-Word',
excel: 'MS-Excel',
xlsx: 'MS-Excel (OpenXML)',
powerpoint: 'MS-Powerpoint',
pdf: 'PDF'
json: 'JSON',
xml: 'XML',
png: 'PNG',
csv: 'CSV',
txt: 'TXT',
sql: 'SQL',
doc: 'MS-Word',
excel: 'MS-Excel',
xlsx: 'MS-Excel (OpenXML)',
powerpoint: 'MS-Powerpoint',
pdf: 'PDF'
};
$.extend($.fn.bootstrapTable.defaults, {
showExport: false,
exportDataType: 'basic', // basic, all, selected
// 'json', 'xml', 'png', 'csv', 'txt', 'sql', 'doc', 'excel', 'powerpoint', 'pdf'
exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'],
exportOptions: {}
showExport: false,
exportDataType: 'basic', // basic, all, selected
exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'],
exportOptions: {},
exportFooter: false
});
$.extend($.fn.bootstrapTable.defaults.icons, {
export: 'glyphicon-export icon-share'
export: bootstrap.icons.export
});
$.extend($.fn.bootstrapTable.locales, {
formatExport: function () {
return 'Export data';
}
formatExport: function formatExport() {
return 'Export data';
}
});
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
var BootstrapTable = $.fn.bootstrapTable.Constructor,
_initToolbar = BootstrapTable.prototype.initToolbar;
$.fn.bootstrapTable.methods.push('exportTable');
BootstrapTable.prototype.initToolbar = function () {
this.showToolbar = this.showToolbar || this.options.showExport;
$.BootstrapTable = function (_$$BootstrapTable) {
_inherits(_class, _$$BootstrapTable);
_initToolbar.apply(this, Array.prototype.slice.apply(arguments));
function _class() {
_classCallCheck(this, _class);
if (this.options.showExport) {
var that = this,
$btnGroup = this.$toolbar.find('>.btn-group'),
$export = $btnGroup.find('div.export');
return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
}
if (!$export.length) {
$export = $([
'<div class="export btn-group">',
'<button class="btn' +
sprintf(' btn-%s', this.options.buttonsClass) +
sprintf(' btn-%s', this.options.iconSize) +
' dropdown-toggle" aria-label="export type" ' +
'title="' + this.options.formatExport() + '" ' +
'data-toggle="dropdown" type="button">',
sprintf('<i class="%s %s"></i> ', this.options.iconsPrefix, this.options.icons.export),
'<span class="caret"></span>',
'</button>',
'<ul class="dropdown-menu" role="menu">',
'</ul>',
'</div>'].join('')).appendTo($btnGroup);
_createClass(_class, [{
key: 'initToolbar',
value: function initToolbar() {
var _this2 = this;
var $menu = $export.find('.dropdown-menu'),
exportTypes = this.options.exportTypes;
var o = this.options;
if (typeof this.options.exportTypes === 'string') {
var types = this.options.exportTypes.slice(1, -1).replace(/ /g, '').split(',');
this.showToolbar = this.showToolbar || o.showExport;
exportTypes = [];
$.each(types, function (i, value) {
exportTypes.push(value.slice(1, -1));
});
}
$.each(exportTypes, function (i, type) {
if (TYPE_NAME.hasOwnProperty(type)) {
$menu.append(['<li role="menuitem" data-type="' + type + '">',
'<a href="javascript:void(0)">',
TYPE_NAME[type],
'</a>',
'</li>'].join(''));
}
});
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'initToolbar', this).call(this);
$menu.find('li').click(function () {
var type = $(this).data('type'),
doExport = function () {
if (!this.options.showExport) {
return;
}
var $btnGroup = this.$toolbar.find('>.btn-group');
this.$export = $btnGroup.find('div.export');
if (!!that.options.exportFooter) {
var data = that.getData();
var $footerRow = that.$tableFooter.find("tr").first();
if (this.$export.length) {
this.updateExportButton();
return;
}
this.$export = $('\n <div class="export btn-group">\n <button class="btn btn-' + o.buttonsClass + ' btn-' + o.iconSize + ' dropdown-toggle"\n aria-label="export type"\n title="' + o.formatExport() + '"\n data-toggle="dropdown"\n type="button">\n <i class="' + o.iconsPrefix + ' ' + o.icons.export + '"></i>\n <span class="caret"></span>\n </button>\n ' + bootstrap.html.dropmenu + '\n </div>\n ').appendTo($btnGroup);
var footerData = { };
var footerHtml = [];
this.updateExportButton();
$.each($footerRow.children(), function (index, footerCell) {
var $menu = this.$export.find('.dropdown-menu');
var exportTypes = o.exportTypes;
var footerCellHtml = $(footerCell).children(".th-inner").first().html();
footerData[that.columns[index].field] = footerCellHtml == '&nbsp;' ? null : footerCellHtml;
if (typeof exportTypes === 'string') {
var types = exportTypes.slice(1, -1).replace(/ /g, '').split(',');
exportTypes = types.map(function (t) {
return t.slice(1, -1);
});
}
for (var _iterator = exportTypes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
// grab footer cell text into cell index-based array
footerHtml.push(footerCellHtml);
});
that.append(footerData);
var $lastTableRow = that.$body.children().last();
$.each($lastTableRow.children(), function (index, lastTableRowCell) {
$(lastTableRowCell).html(footerHtml[index]);
});
}
that.$el.tableExport($.extend({}, that.options.exportOptions, {
type: type,
escape: false
}));
if (!!that.options.exportFooter) {
that.load(data);
}
};
var stateField = that.header.stateField;
if (that.options.exportDataType === 'all' && that.options.pagination) {
that.$el.one(that.options.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table', function () {
if (stateField) {
that.hideColumn(stateField);
}
doExport();
that.togglePagination();
});
that.togglePagination();
} else if (that.options.exportDataType === 'selected') {
var data = that.getData(),
selectedData = that.getSelections();
if (!selectedData.length) {
return;
}
if (that.options.sidePagination === 'server') {
var dataServer = {total: that.options.totalRows};
dataServer[that.options.dataField] = data;
data = dataServer;
var selectedDataServer = {total: selectedData.length};
selectedDataServer[that.options.dataField] = selectedData;
selectedData = selectedDataServer;
}
that.load(selectedData);
if (stateField) {
that.hideColumn(stateField);
}
doExport();
that.load(data);
} else {
if (stateField) {
that.hideColumn(stateField);
}
doExport();
}
if (stateField) {
that.showColumn(stateField);
}
});
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var type = _ref;
if (TYPE_NAME.hasOwnProperty(type)) {
$menu.append(Utils.sprintf(bootstrap.html.dropitem, type, TYPE_NAME[type]));
}
}
$menu.find('>li, >a').click(function (_ref2) {
var currentTarget = _ref2.currentTarget;
var type = $(currentTarget).data('type');
var exportOptions = {
type: type,
escape: false
};
_this2.exportTable(exportOptions);
});
}
};
})(jQuery);
}, {
key: 'exportTable',
value: function exportTable(options) {
var _this3 = this;
var o = this.options;
var stateField = this.header.stateField;
var isCardView = o.cardView;
var doExport = function doExport(callback) {
if (stateField) {
_this3.hideColumn(stateField);
}
if (isCardView) {
_this3.toggleView();
}
var data = _this3.getData();
if (o.exportFooter) {
var $footerRow = _this3.$tableFooter.find('tr').first();
var footerData = {};
var footerHtml = [];
$.each($footerRow.children(), function (index, footerCell) {
var footerCellHtml = $(footerCell).children('.th-inner').first().html();
footerData[_this3.columns[index].field] = footerCellHtml === '&nbsp;' ? null : footerCellHtml;
// grab footer cell text into cell index-based array
footerHtml.push(footerCellHtml);
});
_this3.append(footerData);
var $lastTableRow = _this3.$body.children().last();
$.each($lastTableRow.children(), function (index, lastTableRowCell) {
$(lastTableRowCell).html(footerHtml[index]);
});
}
_this3.$el.tableExport($.extend({
onAfterSaveToFile: function onAfterSaveToFile() {
if (o.exportFooter) {
_this3.load(data);
}
if (stateField) {
_this3.showColumn(stateField);
}
if (isCardView) {
_this3.toggleView();
}
callback();
}
}, o.exportOptions, options));
};
if (o.exportDataType === 'all' && o.pagination) {
var eventName = o.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table';
this.$el.one(eventName, function () {
doExport(function () {
_this3.togglePagination();
});
});
this.togglePagination();
} else if (o.exportDataType === 'selected') {
var data = this.getData();
var selectedData = this.getSelections();
if (!selectedData.length) {
return;
}
if (o.sidePagination === 'server') {
data = _defineProperty({
total: o.totalRows
}, this.options.dataField, data);
selectedData = _defineProperty({
total: selectedData.length
}, this.options.dataField, selectedData);
}
this.load(selectedData);
doExport(function () {
_this3.load(data);
});
} else {
doExport();
}
}
}, {
key: 'updateSelected',
value: function updateSelected() {
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'updateSelected', this).call(this);
this.updateExportButton();
}
}, {
key: 'updateExportButton',
value: function updateExportButton() {
if (this.options.exportDataType === 'selected') {
this.$export.find('> button').prop('disabled', !this.getSelections().length);
}
}
}]);
return _class;
}($.BootstrapTable);
})(jQuery);
});

File diff suppressed because one or more lines are too long

View File

@ -1,95 +1,119 @@
/**
* @author: YL
* @version: v1.0.0
*/
!function ($) {
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define([], factory);
} else if (typeof exports !== "undefined") {
factory();
} else {
var mod = {
exports: {}
};
factory();
global.bootstrapTableTreegrid = mod.exports;
}
})(this, function () {
'use strict';
$.extend($.fn.bootstrapTable.defaults, {
treeShowField: null,
idField: 'id',
parentIdField: 'pid',
onGetNodes: function (row, data) {
/**
* @author: YL
* @version: v1.0.0
*/
!function ($) {
'use strict';
$.extend($.fn.bootstrapTable.defaults, {
treeShowField: null,
idField: 'id',
parentIdField: 'pid',
rootParentId: null,
onGetNodes: function onGetNodes(row, data) {
var that = this;
var nodes = [];
$.each(data, function (i, item) {
if (row[that.options.idField] === item[that.options.parentIdField]) {
nodes.push(item);
}
});
return nodes;
},
onCheckRoot: function onCheckRoot(row, data) {
var that = this;
return that.options.rootParentId === row[that.options.parentIdField] || !row[that.options.parentIdField];
}
});
var BootstrapTable = $.fn.bootstrapTable.Constructor,
_init = BootstrapTable.prototype.init,
_initRow = BootstrapTable.prototype.initRow,
_initHeader = BootstrapTable.prototype.initHeader,
_rowStyle = null;
BootstrapTable.prototype.init = function () {
_rowStyle = this.options.rowStyle;
_init.apply(this, Array.prototype.slice.apply(arguments));
};
// td
BootstrapTable.prototype.initHeader = function () {
var that = this;
var nodes = [];
$.each(data, function (i, item) {
if (row[that.options.idField] === item[that.options.parentIdField]) {
nodes.push(item);
}
});
return nodes;
},
onCheckRoot: function (row, data) {
_initHeader.apply(that, Array.prototype.slice.apply(arguments));
var treeShowField = that.options.treeShowField;
if (treeShowField) {
$.each(this.header.fields, function (i, field) {
if (treeShowField === field) {
that.treeEnable = true;
return false;
}
});
}
};
var initTr = function initTr(item, idx, data, parentDom) {
var that = this;
return !row[that.options.parentIdField];
}
});
var nodes = that.options.onGetNodes.apply(that, [item, data]);
item._nodes = nodes;
parentDom.append(_initRow.apply(that, [item, idx, data, parentDom]));
var BootstrapTable = $.fn.bootstrapTable.Constructor,
_initRow = BootstrapTable.prototype.initRow,
_initHeader = BootstrapTable.prototype.initHeader;
// td
BootstrapTable.prototype.initHeader = function () {
var that = this;
_initHeader.apply(that, Array.prototype.slice.apply(arguments));
var treeShowField = that.options.treeShowField;
if (treeShowField) {
$.each(this.header.fields, function (i, field) {
if (treeShowField === field) {
that.treeEnable = true;
return false;
}
});
}
};
var initTr = function (item, idx, data, parentDom) {
var that = this;
var nodes = that.options.onGetNodes.apply(that, [item, data]);
item._nodes = nodes;
parentDom.append(_initRow.apply(that, [item, idx, data, parentDom]));
// init sub node
var len = nodes.length - 1;
for (var i = 0; i <= len; i++) {
var node = nodes[i];
node._level = item._level + 1;
node._parent = item;
if (i === len)
node._last = 1;
// jquery.treegrid.js
that.options.rowStyle = function (item, idx) {
var id = item[that.options.idField] ? item[that.options.idField] : 0;
var pid = item[that.options.parentIdField] ? item[that.options.parentIdField] : 0;
return {
classes: 'treegrid-' + id + ' treegrid-parent-' + pid
};
};
initTr.apply(that, [node, $.inArray(node, data), data, parentDom]);
}
};
// tr
BootstrapTable.prototype.initRow = function (item, idx, data, parentDom) {
var that = this;
if (that.treeEnable) {
// init root node
if (that.options.onCheckRoot.apply(that, [item, data])) {
if (item._level === undefined) {
item._level = 0;
}
// init sub node
var len = nodes.length - 1;
for (var i = 0; i <= len; i++) {
var node = nodes[i];
node._level = item._level + 1;
node._parent = item;
if (i === len) node._last = 1;
// jquery.treegrid.js
that.options.rowStyle = function (item, idx) {
var x = item[that.options.idField] ? item[that.options.idField] : 0;
return {
classes: 'treegrid-' + x
};
var res = _rowStyle.apply(that, Array.prototype.slice.apply(arguments));
var id = item[that.options.idField] ? item[that.options.idField] : 0;
var pid = item[that.options.parentIdField] ? item[that.options.parentIdField] : 0;
res.classes = [res.classes || '', 'treegrid-' + id, 'treegrid-parent-' + pid].join(' ');
return res;
};
initTr.apply(that, [item, idx, data, parentDom]);
return true;
initTr.apply(that, [node, $.inArray(node, data), data, parentDom]);
}
return false;
}
return _initRow.apply(that, Array.prototype.slice.apply(arguments));
};
}(jQuery);
};
// tr
BootstrapTable.prototype.initRow = function (item, idx, data, parentDom) {
var that = this;
if (that.treeEnable) {
// init root node
if (that.options.onCheckRoot.apply(that, [item, data])) {
if (item._level === undefined) {
item._level = 0;
}
// jquery.treegrid.js
that.options.rowStyle = function (item, idx) {
var res = _rowStyle.apply(that, Array.prototype.slice.apply(arguments));
var x = item[that.options.idField] ? item[that.options.idField] : 0;
res.classes = [res.classes || '', 'treegrid-' + x].join(' ');
return res;
};
initTr.apply(that, [item, idx, data, parentDom]);
return true;
}
return false;
}
return _initRow.apply(that, Array.prototype.slice.apply(arguments));
};
}(jQuery);
});

View File

@ -1,7 +1,10 @@
/*
* 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,{treeShowField:null,idField:"id",parentIdField:"pid",onGetNodes:function(b,c){var d=this,e=[];return a.each(c,function(a,c){b[d.options.idField]===c[d.options.parentIdField]&&e.push(c)}),e},onCheckRoot:function(a){var b=this;return!a[b.options.parentIdField]}});var b=a.fn.bootstrapTable.Constructor,c=b.prototype.initRow,d=b.prototype.initHeader;b.prototype.initHeader=function(){var b=this;d.apply(b,Array.prototype.slice.apply(arguments));var c=b.options.treeShowField;c&&a.each(this.header.fields,function(a,d){return c===d?(b.treeEnable=!0,!1):void 0})};var e=function(b,d,f,g){var h=this,i=h.options.onGetNodes.apply(h,[b,f]);b._nodes=i,g.append(c.apply(h,[b,d,f,g]));for(var j=i.length-1,k=0;j>=k;k++){var l=i[k];l._level=b._level+1,l._parent=b,k===j&&(l._last=1),h.options.rowStyle=function(a){var b=a[h.options.idField]?a[h.options.idField]:0,c=a[h.options.parentIdField]?a[h.options.parentIdField]:0;return{classes:"treegrid-"+b+" treegrid-parent-"+c}},e.apply(h,[l,a.inArray(l,f),f,g])}};b.prototype.initRow=function(a,b,d,f){var g=this;return g.treeEnable?g.options.onCheckRoot.apply(g,[a,d])?(void 0===a._level&&(a._level=0),g.options.rowStyle=function(a){var b=a[g.options.idField]?a[g.options.idField]:0;return{classes:"treegrid-"+b}},e.apply(g,[a,b,d,f]),!0):!1:c.apply(g,Array.prototype.slice.apply(arguments))}}(jQuery);
/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.14.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
* @license MIT
*/
(function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableTreegrid={exports:{}}.exports}})(this,function(){'use strict';!function(a){a.extend(a.fn.bootstrapTable.defaults,{treeShowField:null,idField:'id',parentIdField:'pid',rootParentId:null,onGetNodes:function(b,c){var d=this,e=[];return a.each(c,function(a,c){b[d.options.idField]===c[d.options.parentIdField]&&e.push(c)}),e},onCheckRoot:function(a){var b=this;return b.options.rootParentId===a[b.options.parentIdField]||!a[b.options.parentIdField]}});var b=a.fn.bootstrapTable.Constructor,c=b.prototype.init,d=b.prototype.initRow,e=b.prototype.initHeader,f=null;b.prototype.init=function(){f=this.options.rowStyle,c.apply(this,Array.prototype.slice.apply(arguments))},b.prototype.initHeader=function(){var b=this;e.apply(b,Array.prototype.slice.apply(arguments));var c=b.options.treeShowField;c&&a.each(this.header.fields,function(a,d){if(c===d)return b.treeEnable=!0,!1})};var g=function(b,c,e,h){var j=this,k=j.options.onGetNodes.apply(j,[b,e]);b._nodes=k,h.append(d.apply(j,[b,c,e,h]));for(var l,m=k.length-1,n=0;n<=m;n++)l=k[n],l._level=b._level+1,l._parent=b,n===m&&(l._last=1),j.options.rowStyle=function(a){var b=f.apply(j,Array.prototype.slice.apply(arguments)),c=a[j.options.idField]?a[j.options.idField]:0,d=a[j.options.parentIdField]?a[j.options.parentIdField]:0;return b.classes=[b.classes||'','treegrid-'+c,'treegrid-parent-'+d].join(' '),b},g.apply(j,[l,a.inArray(l,e),e,h])};b.prototype.initRow=function(a,b,c,e){var h=this;return h.treeEnable?!!h.options.onCheckRoot.apply(h,[a,c])&&(void 0===a._level&&(a._level=0),h.options.rowStyle=function(a){var b=f.apply(h,Array.prototype.slice.apply(arguments)),c=a[h.options.idField]?a[h.options.idField]:0;return b.classes=[b.classes||'','treegrid-'+c].join(' '),b},g.apply(h,[a,b,c,e]),!0):d.apply(h,Array.prototype.slice.apply(arguments))}}(jQuery)});

View File

@ -1,46 +1,80 @@
/**
* Bootstrap Table Chinese translation
* Author: Zhixin Wen<wenzhixin2010@gmail.com>
*/
(function ($) {
'use strict';
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define([], factory);
} else if (typeof exports !== "undefined") {
factory();
} else {
var mod = {
exports: {}
};
factory();
global.bootstrapTableZhCN = mod.exports;
}
})(this, function () {
'use strict';
/**
* Bootstrap Table Chinese translation
* Author: Zhixin Wen<wenzhixin2010@gmail.com>
*/
(function ($) {
$.fn.bootstrapTable.locales['zh-CN'] = {
formatLoadingMessage: function () {
return '正在努力地加载数据中,请稍候……';
},
formatRecordsPerPage: function (pageNumber) {
return '每页显示 ' + pageNumber + ' 条记录';
},
formatShowingRows: function (pageFrom, pageTo, totalRows) {
return '显示第 ' + pageFrom + ' 到第 ' + pageTo + ' 条记录,总共 ' + totalRows + ' 条记录';
},
formatSearch: function () {
return '搜索';
},
formatNoMatches: function () {
return '没有找到匹配的记录';
},
formatPaginationSwitch: function () {
return '隐藏/显示分页';
},
formatRefresh: function () {
return '刷新';
},
formatToggle: function () {
return '切换';
},
formatColumns: function () {
return '列';
},
formatExport: function () {
return '导出数据';
},
formatClearFilters: function () {
return '清空过滤';
}
formatLoadingMessage: function formatLoadingMessage() {
return '正在努力地加载数据中,请稍候';
},
formatRecordsPerPage: function formatRecordsPerPage(pageNumber) {
return '\u6BCF\u9875\u663E\u793A ' + pageNumber + ' \u6761\u8BB0\u5F55';
},
formatShowingRows: function formatShowingRows(pageFrom, pageTo, totalRows) {
return '\u663E\u793A\u7B2C ' + pageFrom + ' \u5230\u7B2C ' + pageTo + ' \u6761\u8BB0\u5F55\uFF0C\u603B\u5171 ' + totalRows + ' \u6761\u8BB0\u5F55';
},
formatDetailPagination: function formatDetailPagination(totalRows) {
return '\u603B\u5171 ' + totalRows + ' \u6761\u8BB0\u5F55';
},
formatSearch: function formatSearch() {
return '搜索';
},
formatNoMatches: function formatNoMatches() {
return '没有找到匹配的记录';
},
formatPaginationSwitch: function formatPaginationSwitch() {
return '隐藏/显示分页';
},
formatRefresh: function formatRefresh() {
return '刷新';
},
formatToggle: function formatToggle() {
return '切换';
},
formatColumns: function formatColumns() {
return '列';
},
formatFullscreen: function formatFullscreen() {
return '全屏';
},
formatAllRows: function formatAllRows() {
return '所有';
},
formatAutoRefresh: function formatAutoRefresh() {
return '自动刷新';
},
formatExport: function formatExport() {
return '导出数据';
},
formatClearFilters: function formatClearFilters() {
return '清空过滤';
},
formatJumpto: function formatJumpto() {
return '跳转';
},
formatAdvancedSearch: function formatAdvancedSearch() {
return '高级搜索';
},
formatAdvancedCloseButton: function formatAdvancedCloseButton() {
return '关闭';
}
};
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']);
})(jQuery);
})(jQuery);
});

View File

@ -1,7 +1,10 @@
/*
* 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.fn.bootstrapTable.locales["zh-CN"]={formatLoadingMessage:function(){return"正在努力地加载数据中,请稍候……"},formatRecordsPerPage:function(a){return"每页显示 "+a+" 条记录"},formatShowingRows:function(a,b,c){return"显示第 "+a+" 到第 "+b+" 条记录,总共 "+c+" 条记录"},formatSearch:function(){return"搜索"},formatNoMatches:function(){return"没有找到匹配的记录"},formatPaginationSwitch:function(){return"隐藏/显示分页"},formatRefresh:function(){return"刷新"},formatToggle:function(){return"切换"},formatColumns:function(){return"列"},formatExport:function(){return"导出数据"},formatClearFilters:function(){return"清空过滤"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["zh-CN"])}(jQuery);
/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.14.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
* @license MIT
*/
(function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableZhCN={exports:{}}.exports}})(this,function(){'use strict';(function(a){a.fn.bootstrapTable.locales['zh-CN']={formatLoadingMessage:function(){return'\u6B63\u5728\u52AA\u529B\u5730\u52A0\u8F7D\u6570\u636E\u4E2D\uFF0C\u8BF7\u7A0D\u5019'},formatRecordsPerPage:function(a){return'\u6BCF\u9875\u663E\u793A '+a+' \u6761\u8BB0\u5F55'},formatShowingRows:function(a,b,c){return'\u663E\u793A\u7B2C '+a+' \u5230\u7B2C '+b+' \u6761\u8BB0\u5F55\uFF0C\u603B\u5171 '+c+' \u6761\u8BB0\u5F55'},formatDetailPagination:function(a){return'\u603B\u5171 '+a+' \u6761\u8BB0\u5F55'},formatSearch:function(){return'\u641C\u7D22'},formatNoMatches:function(){return'\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u8BB0\u5F55'},formatPaginationSwitch:function(){return'\u9690\u85CF/\u663E\u793A\u5206\u9875'},formatRefresh:function(){return'\u5237\u65B0'},formatToggle:function(){return'\u5207\u6362'},formatColumns:function(){return'\u5217'},formatFullscreen:function(){return'\u5168\u5C4F'},formatAllRows:function(){return'\u6240\u6709'},formatAutoRefresh:function(){return'\u81EA\u52A8\u5237\u65B0'},formatExport:function(){return'\u5BFC\u51FA\u6570\u636E'},formatClearFilters:function(){return'\u6E05\u7A7A\u8FC7\u6EE4'},formatJumpto:function(){return'\u8DF3\u8F6C'},formatAdvancedSearch:function(){return'\u9AD8\u7EA7\u641C\u7D22'},formatAdvancedCloseButton:function(){return'\u5173\u95ED'}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales['zh-CN'])})(jQuery)});

View File

@ -312,7 +312,6 @@
smartTable: function (options) {
var settings = $.extend({
toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
pagination: true, //是否显示分页(*
sortOrder: "asc", //排序方式
@ -470,8 +469,7 @@
// fix bug bootstrap-table 1.12.1 showToggle
if ($.fn.bootstrapTable) {
$.extend($.fn.bootstrapTable.defaults.icons, {
toggle: 'fa-toggle-off',
export: 'fa-download'
refresh: 'fa-refresh'
});
}

View File

@ -246,7 +246,7 @@
}, function () {
$.logData.push({ url: op.url, data: data });
setTimeout(function () {
var idField = findIdField($(op.table));
var idField = findIdField(op.table);
var iDs = data.map(function (element, index) {
return element[idField];
});