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", "provider": "cdnjs",
"library": "bootstrap-table@1.12.1", "library": "bootstrap-table@1.14.2",
"destination": "wwwroot/lib/bootstrap-table/", "destination": "wwwroot/lib/bootstrap-table/",
"files": [ "files": [
"bootstrap-table.min.js", "bootstrap-table.min.js",

View File

@ -613,6 +613,34 @@ li[data-category="1"] .dd3-content .menuType {
word-break: break-all; 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 { pre {
padding: 5px; padding: 5px;
margin: 5px; margin: 5px;

View File

@ -349,10 +349,6 @@ input.pending {
margin-bottom: 15px; margin-bottom: 15px;
} }
.bootstrap-table .fixed-table-body .table {
border-bottom: none;
}
.bootstrap-table .fixed-table-body .table td > a { .bootstrap-table .fixed-table-body .table td > a {
display: block; display: block;
} }

View File

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

View File

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

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,11 +1,134 @@
/** (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 _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> * @author zhixin wen <wenzhixin2010@gmail.com>
* extensions: https://github.com/kayalshri/tableExport.jquery.plugin * extensions: https://github.com/hhurz/tableExport.jquery.plugin
*/ */
(function ($) { (function ($) {
'use strict'; var Utils = $.fn.bootstrapTable.utils;
var sprintf = $.fn.bootstrapTable.utils.sprintf;
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 = { var TYPE_NAME = {
json: 'JSON', json: 'JSON',
@ -24,156 +147,204 @@
$.extend($.fn.bootstrapTable.defaults, { $.extend($.fn.bootstrapTable.defaults, {
showExport: false, showExport: false,
exportDataType: 'basic', // basic, all, selected exportDataType: 'basic', // basic, all, selected
// 'json', 'xml', 'png', 'csv', 'txt', 'sql', 'doc', 'excel', 'powerpoint', 'pdf'
exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'], exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'],
exportOptions: {} exportOptions: {},
exportFooter: false
}); });
$.extend($.fn.bootstrapTable.defaults.icons, { $.extend($.fn.bootstrapTable.defaults.icons, {
export: 'glyphicon-export icon-share' export: bootstrap.icons.export
}); });
$.extend($.fn.bootstrapTable.locales, { $.extend($.fn.bootstrapTable.locales, {
formatExport: function () { formatExport: function formatExport() {
return 'Export data'; return 'Export data';
} }
}); });
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales); $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
var BootstrapTable = $.fn.bootstrapTable.Constructor, $.fn.bootstrapTable.methods.push('exportTable');
_initToolbar = BootstrapTable.prototype.initToolbar;
BootstrapTable.prototype.initToolbar = function () { $.BootstrapTable = function (_$$BootstrapTable) {
this.showToolbar = this.showToolbar || this.options.showExport; _inherits(_class, _$$BootstrapTable);
_initToolbar.apply(this, Array.prototype.slice.apply(arguments)); function _class() {
_classCallCheck(this, _class);
if (this.options.showExport) { return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
var that = this, }
$btnGroup = this.$toolbar.find('>.btn-group'),
$export = $btnGroup.find('div.export');
if (!$export.length) { _createClass(_class, [{
$export = $([ key: 'initToolbar',
'<div class="export btn-group">', value: function initToolbar() {
'<button class="btn' + var _this2 = this;
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);
var $menu = $export.find('.dropdown-menu'), var o = this.options;
exportTypes = this.options.exportTypes;
if (typeof this.options.exportTypes === 'string') { this.showToolbar = this.showToolbar || o.showExport;
var types = this.options.exportTypes.slice(1, -1).replace(/ /g, '').split(',');
exportTypes = []; _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'initToolbar', this).call(this);
$.each(types, function (i, value) {
exportTypes.push(value.slice(1, -1)); if (!this.options.showExport) {
return;
}
var $btnGroup = this.$toolbar.find('>.btn-group');
this.$export = $btnGroup.find('div.export');
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);
this.updateExportButton();
var $menu = this.$export.find('.dropdown-menu');
var exportTypes = o.exportTypes;
if (typeof exportTypes === 'string') {
var types = exportTypes.slice(1, -1).replace(/ /g, '').split(',');
exportTypes = types.map(function (t) {
return t.slice(1, -1);
}); });
} }
$.each(exportTypes, function (i, type) { for (var _iterator = exportTypes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
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)) { if (TYPE_NAME.hasOwnProperty(type)) {
$menu.append(['<li role="menuitem" data-type="' + type + '">', $menu.append(Utils.sprintf(bootstrap.html.dropitem, type, TYPE_NAME[type]));
'<a href="javascript:void(0)">',
TYPE_NAME[type],
'</a>',
'</li>'].join(''));
} }
}
$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);
}); });
}
}, {
key: 'exportTable',
value: function exportTable(options) {
var _this3 = this;
$menu.find('li').click(function () { var o = this.options;
var type = $(this).data('type'), var stateField = this.header.stateField;
doExport = function () { var isCardView = o.cardView;
if (!!that.options.exportFooter) { var doExport = function doExport(callback) {
var data = that.getData(); if (stateField) {
var $footerRow = that.$tableFooter.find("tr").first(); _this3.hideColumn(stateField);
}
if (isCardView) {
_this3.toggleView();
}
var footerData = { }; var data = _this3.getData();
if (o.exportFooter) {
var $footerRow = _this3.$tableFooter.find('tr').first();
var footerData = {};
var footerHtml = []; var footerHtml = [];
$.each($footerRow.children(), function (index, footerCell) { $.each($footerRow.children(), function (index, footerCell) {
var footerCellHtml = $(footerCell).children('.th-inner').first().html();
var footerCellHtml = $(footerCell).children(".th-inner").first().html(); footerData[_this3.columns[index].field] = footerCellHtml === '&nbsp;' ? null : footerCellHtml;
footerData[that.columns[index].field] = footerCellHtml == '&nbsp;' ? null : footerCellHtml;
// grab footer cell text into cell index-based array // grab footer cell text into cell index-based array
footerHtml.push(footerCellHtml); footerHtml.push(footerCellHtml);
}); });
that.append(footerData); _this3.append(footerData);
var $lastTableRow = that.$body.children().last(); var $lastTableRow = _this3.$body.children().last();
$.each($lastTableRow.children(), function (index, lastTableRowCell) { $.each($lastTableRow.children(), function (index, lastTableRowCell) {
$(lastTableRowCell).html(footerHtml[index]); $(lastTableRowCell).html(footerHtml[index]);
}); });
} }
that.$el.tableExport($.extend({}, that.options.exportOptions, { _this3.$el.tableExport($.extend({
type: type, onAfterSaveToFile: function onAfterSaveToFile() {
escape: false if (o.exportFooter) {
})); _this3.load(data);
if (!!that.options.exportFooter) {
that.load(data);
} }
if (stateField) {
_this3.showColumn(stateField);
}
if (isCardView) {
_this3.toggleView();
}
callback();
}
}, o.exportOptions, options));
}; };
var stateField = that.header.stateField; if (o.exportDataType === 'all' && o.pagination) {
var eventName = o.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table';
if (that.options.exportDataType === 'all' && that.options.pagination) { this.$el.one(eventName, function () {
that.$el.one(that.options.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table', function () { doExport(function () {
if (stateField) { _this3.togglePagination();
that.hideColumn(stateField);
}
doExport();
that.togglePagination();
}); });
that.togglePagination(); });
} else if (that.options.exportDataType === 'selected') { this.togglePagination();
var data = that.getData(), } else if (o.exportDataType === 'selected') {
selectedData = that.getSelections(); var data = this.getData();
var selectedData = this.getSelections();
if (!selectedData.length) { if (!selectedData.length) {
return; return;
} }
if (that.options.sidePagination === 'server') { if (o.sidePagination === 'server') {
var dataServer = {total: that.options.totalRows}; data = _defineProperty({
dataServer[that.options.dataField] = data; total: o.totalRows
data = dataServer; }, this.options.dataField, data);
var selectedDataServer = {total: selectedData.length}; selectedData = _defineProperty({
selectedDataServer[that.options.dataField] = selectedData; total: selectedData.length
selectedData = selectedDataServer; }, this.options.dataField, selectedData);
} }
that.load(selectedData); this.load(selectedData);
if (stateField) { doExport(function () {
that.hideColumn(stateField); _this3.load(data);
}
doExport();
that.load(data);
} else {
if (stateField) {
that.hideColumn(stateField);
}
doExport();
}
if (stateField) {
that.showColumn(stateField);
}
}); });
} else {
doExport();
} }
} }
}; }, {
})(jQuery); 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,14 +1,31 @@
/** (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';
/**
* @author: YL * @author: YL
* @version: v1.0.0 * @version: v1.0.0
*/ */
!function ($) { !function ($) {
'use strict'; 'use strict';
$.extend($.fn.bootstrapTable.defaults, { $.extend($.fn.bootstrapTable.defaults, {
treeShowField: null, treeShowField: null,
idField: 'id', idField: 'id',
parentIdField: 'pid', parentIdField: 'pid',
onGetNodes: function (row, data) { rootParentId: null,
onGetNodes: function onGetNodes(row, data) {
var that = this; var that = this;
var nodes = []; var nodes = [];
$.each(data, function (i, item) { $.each(data, function (i, item) {
@ -18,15 +35,22 @@
}); });
return nodes; return nodes;
}, },
onCheckRoot: function (row, data) { onCheckRoot: function onCheckRoot(row, data) {
var that = this; var that = this;
return !row[that.options.parentIdField]; return that.options.rootParentId === row[that.options.parentIdField] || !row[that.options.parentIdField];
} }
}); });
var BootstrapTable = $.fn.bootstrapTable.Constructor, var BootstrapTable = $.fn.bootstrapTable.Constructor,
_init = BootstrapTable.prototype.init,
_initRow = BootstrapTable.prototype.initRow, _initRow = BootstrapTable.prototype.initRow,
_initHeader = BootstrapTable.prototype.initHeader; _initHeader = BootstrapTable.prototype.initHeader,
_rowStyle = null;
BootstrapTable.prototype.init = function () {
_rowStyle = this.options.rowStyle;
_init.apply(this, Array.prototype.slice.apply(arguments));
};
// td // td
BootstrapTable.prototype.initHeader = function () { BootstrapTable.prototype.initHeader = function () {
@ -43,7 +67,7 @@
} }
}; };
var initTr = function (item, idx, data, parentDom) { var initTr = function initTr(item, idx, data, parentDom) {
var that = this; var that = this;
var nodes = that.options.onGetNodes.apply(that, [item, data]); var nodes = that.options.onGetNodes.apply(that, [item, data]);
item._nodes = nodes; item._nodes = nodes;
@ -55,15 +79,14 @@
var node = nodes[i]; var node = nodes[i];
node._level = item._level + 1; node._level = item._level + 1;
node._parent = item; node._parent = item;
if (i === len) if (i === len) node._last = 1;
node._last = 1;
// jquery.treegrid.js // jquery.treegrid.js
that.options.rowStyle = function (item, idx) { that.options.rowStyle = function (item, idx) {
var res = _rowStyle.apply(that, Array.prototype.slice.apply(arguments));
var id = item[that.options.idField] ? item[that.options.idField] : 0; var id = item[that.options.idField] ? item[that.options.idField] : 0;
var pid = item[that.options.parentIdField] ? item[that.options.parentIdField] : 0; var pid = item[that.options.parentIdField] ? item[that.options.parentIdField] : 0;
return { res.classes = [res.classes || '', 'treegrid-' + id, 'treegrid-parent-' + pid].join(' ');
classes: 'treegrid-' + id + ' treegrid-parent-' + pid return res;
};
}; };
initTr.apply(that, [node, $.inArray(node, data), data, parentDom]); initTr.apply(that, [node, $.inArray(node, data), data, parentDom]);
} }
@ -80,10 +103,10 @@
} }
// jquery.treegrid.js // jquery.treegrid.js
that.options.rowStyle = function (item, idx) { 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; var x = item[that.options.idField] ? item[that.options.idField] : 0;
return { res.classes = [res.classes || '', 'treegrid-' + x].join(' ');
classes: 'treegrid-' + x return res;
};
}; };
initTr.apply(that, [item, idx, data, parentDom]); initTr.apply(that, [item, idx, data, parentDom]);
return true; return true;
@ -92,4 +115,5 @@
} }
return _initRow.apply(that, Array.prototype.slice.apply(arguments)); return _initRow.apply(that, Array.prototype.slice.apply(arguments));
}; };
}(jQuery); }(jQuery);
});

View File

@ -1,7 +1,10 @@
/* /**
* bootstrap-table - v1.12.1 - 2018-03-12 * bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
* https://github.com/wenzhixin/bootstrap-table *
* Copyright (c) 2018 zhixin wen * @version v1.14.2
* Licensed MIT License * @homepage https://bootstrap-table.com
*/ * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
!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); * @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 @@
/** (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 * Bootstrap Table Chinese translation
* Author: Zhixin Wen<wenzhixin2010@gmail.com> * Author: Zhixin Wen<wenzhixin2010@gmail.com>
*/ */
(function ($) { (function ($) {
'use strict';
$.fn.bootstrapTable.locales['zh-CN'] = { $.fn.bootstrapTable.locales['zh-CN'] = {
formatLoadingMessage: function () { formatLoadingMessage: function formatLoadingMessage() {
return '正在努力地加载数据中,请稍候……'; return '正在努力地加载数据中,请稍候';
}, },
formatRecordsPerPage: function (pageNumber) { formatRecordsPerPage: function formatRecordsPerPage(pageNumber) {
return '每页显示 ' + pageNumber + ' 条记录'; return '\u6BCF\u9875\u663E\u793A ' + pageNumber + ' \u6761\u8BB0\u5F55';
}, },
formatShowingRows: function (pageFrom, pageTo, totalRows) { formatShowingRows: function formatShowingRows(pageFrom, pageTo, totalRows) {
return '显示第 ' + pageFrom + ' 到第 ' + pageTo + ' 条记录,总共 ' + totalRows + ' 条记录'; return '\u663E\u793A\u7B2C ' + pageFrom + ' \u5230\u7B2C ' + pageTo + ' \u6761\u8BB0\u5F55\uFF0C\u603B\u5171 ' + totalRows + ' \u6761\u8BB0\u5F55';
}, },
formatSearch: function () { formatDetailPagination: function formatDetailPagination(totalRows) {
return '\u603B\u5171 ' + totalRows + ' \u6761\u8BB0\u5F55';
},
formatSearch: function formatSearch() {
return '搜索'; return '搜索';
}, },
formatNoMatches: function () { formatNoMatches: function formatNoMatches() {
return '没有找到匹配的记录'; return '没有找到匹配的记录';
}, },
formatPaginationSwitch: function () { formatPaginationSwitch: function formatPaginationSwitch() {
return '隐藏/显示分页'; return '隐藏/显示分页';
}, },
formatRefresh: function () { formatRefresh: function formatRefresh() {
return '刷新'; return '刷新';
}, },
formatToggle: function () { formatToggle: function formatToggle() {
return '切换'; return '切换';
}, },
formatColumns: function () { formatColumns: function formatColumns() {
return '列'; return '列';
}, },
formatExport: function () { formatFullscreen: function formatFullscreen() {
return '全屏';
},
formatAllRows: function formatAllRows() {
return '所有';
},
formatAutoRefresh: function formatAutoRefresh() {
return '自动刷新';
},
formatExport: function formatExport() {
return '导出数据'; return '导出数据';
}, },
formatClearFilters: function () { formatClearFilters: function formatClearFilters() {
return '清空过滤'; return '清空过滤';
},
formatJumpto: function formatJumpto() {
return '跳转';
},
formatAdvancedSearch: function formatAdvancedSearch() {
return '高级搜索';
},
formatAdvancedCloseButton: function formatAdvancedCloseButton() {
return '关闭';
} }
}; };
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']); $.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 * bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
* https://github.com/wenzhixin/bootstrap-table *
* Copyright (c) 2018 zhixin wen * @version v1.14.2
* Licensed MIT License * @homepage https://bootstrap-table.com
*/ * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
!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); * @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) { smartTable: function (options) {
var settings = $.extend({ var settings = $.extend({
toolbar: '#toolbar', //工具按钮用哪个容器 toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性* cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
pagination: true, //是否显示分页(* pagination: true, //是否显示分页(*
sortOrder: "asc", //排序方式 sortOrder: "asc", //排序方式
@ -470,8 +469,7 @@
// fix bug bootstrap-table 1.12.1 showToggle // fix bug bootstrap-table 1.12.1 showToggle
if ($.fn.bootstrapTable) { if ($.fn.bootstrapTable) {
$.extend($.fn.bootstrapTable.defaults.icons, { $.extend($.fn.bootstrapTable.defaults.icons, {
toggle: 'fa-toggle-off', refresh: 'fa-refresh'
export: 'fa-download'
}); });
} }

View File

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