refactor(bootstrap-table): 升级版本到1.14.2
This commit is contained in:
parent
6ee3eedd22
commit
fd4d0abdf6
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -349,14 +349,10 @@ input.pending {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bootstrap-table .fixed-table-body .table {
|
.bootstrap-table .fixed-table-body .table td > a {
|
||||||
border-bottom: none;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bootstrap-table .fixed-table-body .table td > a {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bootstrap-table .fixed-table-toolbar .columns-right .btn-group .dropdown-menu {
|
.bootstrap-table .fixed-table-toolbar .columns-right .btn-group .dropdown-menu {
|
||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,318 +1,282 @@
|
||||||
|
@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;
|
clear: both;
|
||||||
border-collapse: collapse !important;
|
|
||||||
border-radius: 1px;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-toolbar .bs-bars,
|
||||||
.bootstrap-table .table:not(.table-condensed),
|
.bootstrap-table .fixed-table-toolbar .search,
|
||||||
.bootstrap-table .table:not(.table-condensed) > tbody > tr > th,
|
.bootstrap-table .fixed-table-toolbar .columns {
|
||||||
.bootstrap-table .table:not(.table-condensed) > tfoot > tr > th,
|
position: relative;
|
||||||
.bootstrap-table .table:not(.table-condensed) > thead > tr > td,
|
margin-top: 10px;
|
||||||
.bootstrap-table .table:not(.table-condensed) > tbody > tr > td,
|
margin-bottom: 10px;
|
||||||
.bootstrap-table .table:not(.table-condensed) > tfoot > tr > td {
|
|
||||||
padding: 8px;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group {
|
||||||
.bootstrap-table .table.table-no-bordered > thead > tr > th,
|
display: inline-block;
|
||||||
.bootstrap-table .table.table-no-bordered > tbody > tr > td {
|
margin-left: -1px !important;
|
||||||
border-right: 2px solid transparent;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group:first-child > .btn {
|
||||||
.bootstrap-table .table.table-no-bordered > tbody > tr > td:last-child {
|
border-top-left-radius: 4px;
|
||||||
border-right: none;
|
border-bottom-left-radius: 4px;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group:last-child > .btn {
|
||||||
.fixed-table-container {
|
border-top-right-radius: 4px;
|
||||||
position: relative;
|
border-bottom-right-radius: 4px;
|
||||||
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 > .btn {
|
||||||
.fixed-table-container.table-no-bordered {
|
border-radius: 0;
|
||||||
border: 1px solid transparent;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns .dropdown-menu {
|
||||||
.fixed-table-footer,
|
text-align: left;
|
||||||
.fixed-table-header {
|
max-height: 300px;
|
||||||
overflow: hidden;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns label {
|
||||||
.fixed-table-footer {
|
display: block;
|
||||||
border-top: 1px solid #dddddd;
|
padding: 3px 20px;
|
||||||
|
clear: both;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 1.428571429;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns-left {
|
||||||
.fixed-table-body {
|
margin-right: 5px;
|
||||||
overflow-x: auto;
|
|
||||||
overflow-y: auto;
|
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns-right {
|
||||||
.fixed-table-container table {
|
margin-left: 5px;
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-toolbar .pull-right .dropdown-menu {
|
||||||
.fixed-table-container thead th {
|
right: 0;
|
||||||
height: 0;
|
left: auto;
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
border-left: 1px solid #dddddd;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container {
|
||||||
.fixed-table-container thead th:focus {
|
position: relative;
|
||||||
outline: 0 solid transparent;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container.fixed-height:not(.has-footer) {
|
||||||
.fixed-table-container thead th:first-child:not([data-not-first-th]) {
|
border-bottom: 1px solid #dee2e6;
|
||||||
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 .fixed-table-border {
|
||||||
.fixed-table-container thead th .th-inner,
|
border-left: 1px solid #dee2e6;
|
||||||
.fixed-table-container tbody td .th-inner {
|
border-right: 1px solid #dee2e6;
|
||||||
padding: 8px;
|
|
||||||
line-height: 24px;
|
|
||||||
vertical-align: top;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container.fixed-height .table thead th {
|
||||||
.fixed-table-container thead th .sortable {
|
border-bottom: 1px solid #dee2e6;
|
||||||
cursor: pointer;
|
|
||||||
background-position: right;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
padding-right: 30px;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container.fixed-height .table-dark thead th {
|
||||||
.fixed-table-container thead th .both {
|
border-bottom: 1px solid #32383e;
|
||||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC');
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-header {
|
||||||
.fixed-table-container thead th .asc {
|
overflow: hidden;
|
||||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==');
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body {
|
||||||
.fixed-table-container thead th .desc {
|
overflow-x: auto;
|
||||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= ');
|
overflow-y: auto;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading {
|
||||||
.fixed-table-container th.detail {
|
align-items: center;
|
||||||
width: 30px;
|
background: #fff;
|
||||||
|
display: none;
|
||||||
|
justify-content: center;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap {
|
||||||
.fixed-table-container tbody td {
|
align-items: baseline;
|
||||||
border-left: 1px solid #dddddd;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .loading-text {
|
||||||
.fixed-table-container tbody tr:first-child td {
|
font-size: 2rem;
|
||||||
border-top: none;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap {
|
||||||
.fixed-table-container tbody td:first-child {
|
align-items: center;
|
||||||
border-left: none;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot,
|
||||||
/* the same color with .active */
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap:after,
|
||||||
.fixed-table-container tbody .selected td {
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap:before {
|
||||||
background-color: #f5f5f5;
|
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 {
|
||||||
.fixed-table-container .bs-checkbox {
|
animation-delay: 0.3s;
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap:after {
|
||||||
.fixed-table-container input[type="radio"],
|
animation-delay: 0.6s;
|
||||||
.fixed-table-container input[type="checkbox"] {
|
|
||||||
margin: 0 auto !important;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark {
|
||||||
.fixed-table-container .no-records-found {
|
background: #212529;
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-dot,
|
||||||
.fixed-table-pagination div.pagination,
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap:after,
|
||||||
.fixed-table-pagination .pagination-detail {
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap:before {
|
||||||
margin-top: 10px;
|
background: #fff;
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .table {
|
||||||
.fixed-table-pagination div.pagination .pagination {
|
width: 100%;
|
||||||
margin: 0;
|
margin-bottom: 0 !important;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .table th,
|
||||||
.fixed-table-pagination .pagination a {
|
.bootstrap-table .fixed-table-container .table td {
|
||||||
padding: 6px 12px;
|
vertical-align: middle;
|
||||||
line-height: 1.428571429;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th {
|
||||||
.fixed-table-pagination .pagination-info {
|
vertical-align: bottom;
|
||||||
line-height: 34px;
|
padding: 0;
|
||||||
margin-right: 5px;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th:focus {
|
||||||
.fixed-table-pagination .btn-group {
|
outline: 0 solid transparent;
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th.detail {
|
||||||
.fixed-table-pagination .dropup .dropdown-menu {
|
width: 30px;
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th .th-inner {
|
||||||
.fixed-table-pagination .page-list {
|
padding: 0.75rem;
|
||||||
display: inline-block;
|
vertical-align: bottom;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th .sortable {
|
||||||
.fixed-table-toolbar .columns-left {
|
cursor: pointer;
|
||||||
margin-right: 5px;
|
background-position: right;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
padding-right: 30px;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th .both {
|
||||||
.fixed-table-toolbar .columns-right {
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC");
|
||||||
margin-left: 5px;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th .asc {
|
||||||
.fixed-table-toolbar .columns label {
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==");
|
||||||
display: block;
|
|
||||||
padding: 3px 20px;
|
|
||||||
clear: both;
|
|
||||||
font-weight: normal;
|
|
||||||
line-height: 1.428571429;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th .desc {
|
||||||
.fixed-table-toolbar .bs-bars,
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= ");
|
||||||
.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 tbody tr.selected td {
|
||||||
.fixed-table-pagination li.disabled a {
|
background-color: rgba(0, 0, 0, 0.075);
|
||||||
pointer-events: none;
|
|
||||||
cursor: default;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-container .table tbody tr.no-records-found {
|
||||||
.fixed-table-loading {
|
text-align: center;
|
||||||
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 .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;
|
||||||
display: inline-block;
|
|
||||||
margin-left: -1px !important;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-pagination:after {
|
||||||
.fixed-table-toolbar .btn-group > .btn-group > .btn {
|
content: "";
|
||||||
border-radius: 0;
|
display: block;
|
||||||
|
clear: both;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination-detail,
|
||||||
.fixed-table-toolbar .btn-group > .btn-group:first-child > .btn {
|
.bootstrap-table .fixed-table-pagination > .pagination {
|
||||||
border-top-left-radius: 4px;
|
margin-top: 10px;
|
||||||
border-bottom-left-radius: 4px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination-detail .pagination-info {
|
||||||
.fixed-table-toolbar .btn-group > .btn-group:last-child > .btn {
|
line-height: 34px;
|
||||||
border-top-right-radius: 4px;
|
margin-right: 5px;
|
||||||
border-bottom-right-radius: 4px;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list {
|
||||||
.bootstrap-table .table > thead > tr > th {
|
display: inline-block;
|
||||||
vertical-align: bottom;
|
|
||||||
border-bottom: 1px solid #ddd;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list .btn-group {
|
||||||
/* support bootstrap 3 */
|
position: relative;
|
||||||
.bootstrap-table .table thead > tr > th {
|
display: inline-block;
|
||||||
padding: 0;
|
vertical-align: middle;
|
||||||
margin: 0;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list .btn-group .dropdown-menu {
|
||||||
.bootstrap-table .fixed-table-footer tbody > tr > td {
|
margin-bottom: 0;
|
||||||
padding: 0 !important;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination {
|
||||||
.bootstrap-table .fixed-table-footer .table {
|
margin: 0;
|
||||||
border-bottom: none;
|
|
||||||
border-radius: 0;
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
}
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination a {
|
||||||
.bootstrap-table .pull-right .dropdown-menu {
|
padding: 6px 12px;
|
||||||
right: 0;
|
line-height: 1.428571429;
|
||||||
left: auto;
|
}
|
||||||
|
.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 */
|
/* calculate scrollbar width */
|
||||||
p.fixed-table-scroll-inner {
|
div.fixed-table-scroll-inner {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.fixed-table-scroll-outer {
|
div.fixed-table-scroll-outer {
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
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
|
@ -1,179 +1,350 @@
|
||||||
/**
|
(function (global, factory) {
|
||||||
* @author zhixin wen <wenzhixin2010@gmail.com>
|
if (typeof define === "function" && define.amd) {
|
||||||
* extensions: https://github.com/kayalshri/tableExport.jquery.plugin
|
define([], factory);
|
||||||
*/
|
} else if (typeof exports !== "undefined") {
|
||||||
|
factory();
|
||||||
|
} else {
|
||||||
|
var mod = {
|
||||||
|
exports: {}
|
||||||
|
};
|
||||||
|
factory();
|
||||||
|
global.bootstrapTableExport = mod.exports;
|
||||||
|
}
|
||||||
|
})(this, function () {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
(function ($) {
|
function _defineProperty(obj, key, value) {
|
||||||
'use strict';
|
if (key in obj) {
|
||||||
var sprintf = $.fn.bootstrapTable.utils.sprintf;
|
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 = {
|
var TYPE_NAME = {
|
||||||
json: 'JSON',
|
json: 'JSON',
|
||||||
xml: 'XML',
|
xml: 'XML',
|
||||||
png: 'PNG',
|
png: 'PNG',
|
||||||
csv: 'CSV',
|
csv: 'CSV',
|
||||||
txt: 'TXT',
|
txt: 'TXT',
|
||||||
sql: 'SQL',
|
sql: 'SQL',
|
||||||
doc: 'MS-Word',
|
doc: 'MS-Word',
|
||||||
excel: 'MS-Excel',
|
excel: 'MS-Excel',
|
||||||
xlsx: 'MS-Excel (OpenXML)',
|
xlsx: 'MS-Excel (OpenXML)',
|
||||||
powerpoint: 'MS-Powerpoint',
|
powerpoint: 'MS-Powerpoint',
|
||||||
pdf: 'PDF'
|
pdf: 'PDF'
|
||||||
};
|
};
|
||||||
|
|
||||||
$.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));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
$.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(''));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$menu.find('li').click(function () {
|
if (!this.options.showExport) {
|
||||||
var type = $(this).data('type'),
|
return;
|
||||||
doExport = function () {
|
}
|
||||||
|
var $btnGroup = this.$toolbar.find('>.btn-group');
|
||||||
|
this.$export = $btnGroup.find('div.export');
|
||||||
|
|
||||||
if (!!that.options.exportFooter) {
|
if (this.$export.length) {
|
||||||
var data = that.getData();
|
this.updateExportButton();
|
||||||
var $footerRow = that.$tableFooter.find("tr").first();
|
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 = { };
|
this.updateExportButton();
|
||||||
var footerHtml = [];
|
|
||||||
|
|
||||||
$.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();
|
if (typeof exportTypes === 'string') {
|
||||||
footerData[that.columns[index].field] = footerCellHtml == ' ' ? null : footerCellHtml;
|
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
|
if (_isArray) {
|
||||||
footerHtml.push(footerCellHtml);
|
if (_i >= _iterator.length) break;
|
||||||
});
|
_ref = _iterator[_i++];
|
||||||
|
} else {
|
||||||
that.append(footerData);
|
_i = _iterator.next();
|
||||||
|
if (_i.done) break;
|
||||||
var $lastTableRow = that.$body.children().last();
|
_ref = _i.value;
|
||||||
|
|
||||||
$.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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 === ' ' ? 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
|
@ -1,95 +1,119 @@
|
||||||
/**
|
(function (global, factory) {
|
||||||
* @author: YL
|
if (typeof define === "function" && define.amd) {
|
||||||
* @version: v1.0.0
|
define([], factory);
|
||||||
*/
|
} else if (typeof exports !== "undefined") {
|
||||||
!function ($) {
|
factory();
|
||||||
|
} else {
|
||||||
|
var mod = {
|
||||||
|
exports: {}
|
||||||
|
};
|
||||||
|
factory();
|
||||||
|
global.bootstrapTableTreegrid = mod.exports;
|
||||||
|
}
|
||||||
|
})(this, function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
$.extend($.fn.bootstrapTable.defaults, {
|
|
||||||
treeShowField: null,
|
/**
|
||||||
idField: 'id',
|
* @author: YL
|
||||||
parentIdField: 'pid',
|
* @version: v1.0.0
|
||||||
onGetNodes: function (row, data) {
|
*/
|
||||||
|
!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 that = this;
|
||||||
var nodes = [];
|
_initHeader.apply(that, Array.prototype.slice.apply(arguments));
|
||||||
$.each(data, function (i, item) {
|
var treeShowField = that.options.treeShowField;
|
||||||
if (row[that.options.idField] === item[that.options.parentIdField]) {
|
if (treeShowField) {
|
||||||
nodes.push(item);
|
$.each(this.header.fields, function (i, field) {
|
||||||
}
|
if (treeShowField === field) {
|
||||||
});
|
that.treeEnable = true;
|
||||||
return nodes;
|
return false;
|
||||||
},
|
}
|
||||||
onCheckRoot: function (row, data) {
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var initTr = function initTr(item, idx, data, parentDom) {
|
||||||
var that = this;
|
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,
|
// init sub node
|
||||||
_initRow = BootstrapTable.prototype.initRow,
|
var len = nodes.length - 1;
|
||||||
_initHeader = BootstrapTable.prototype.initHeader;
|
for (var i = 0; i <= len; i++) {
|
||||||
|
var node = nodes[i];
|
||||||
// td
|
node._level = item._level + 1;
|
||||||
BootstrapTable.prototype.initHeader = function () {
|
node._parent = item;
|
||||||
var that = this;
|
if (i === len) node._last = 1;
|
||||||
_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;
|
|
||||||
}
|
|
||||||
// jquery.treegrid.js
|
// jquery.treegrid.js
|
||||||
that.options.rowStyle = function (item, idx) {
|
that.options.rowStyle = function (item, idx) {
|
||||||
var x = item[that.options.idField] ? item[that.options.idField] : 0;
|
var res = _rowStyle.apply(that, Array.prototype.slice.apply(arguments));
|
||||||
return {
|
var id = item[that.options.idField] ? item[that.options.idField] : 0;
|
||||||
classes: 'treegrid-' + x
|
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]);
|
initTr.apply(that, [node, $.inArray(node, data), data, parentDom]);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
};
|
||||||
}
|
|
||||||
return _initRow.apply(that, Array.prototype.slice.apply(arguments));
|
// tr
|
||||||
};
|
BootstrapTable.prototype.initRow = function (item, idx, data, parentDom) {
|
||||||
}(jQuery);
|
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);
|
||||||
|
});
|
|
@ -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)});
|
|
@ -1,46 +1,80 @@
|
||||||
/**
|
(function (global, factory) {
|
||||||
* Bootstrap Table Chinese translation
|
if (typeof define === "function" && define.amd) {
|
||||||
* Author: Zhixin Wen<wenzhixin2010@gmail.com>
|
define([], factory);
|
||||||
*/
|
} else if (typeof exports !== "undefined") {
|
||||||
(function ($) {
|
factory();
|
||||||
'use strict';
|
} 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'] = {
|
$.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 '搜索';
|
return '\u603B\u5171 ' + totalRows + ' \u6761\u8BB0\u5F55';
|
||||||
},
|
},
|
||||||
formatNoMatches: function () {
|
formatSearch: function formatSearch() {
|
||||||
return '没有找到匹配的记录';
|
return '搜索';
|
||||||
},
|
},
|
||||||
formatPaginationSwitch: function () {
|
formatNoMatches: function formatNoMatches() {
|
||||||
return '隐藏/显示分页';
|
return '没有找到匹配的记录';
|
||||||
},
|
},
|
||||||
formatRefresh: function () {
|
formatPaginationSwitch: function formatPaginationSwitch() {
|
||||||
return '刷新';
|
return '隐藏/显示分页';
|
||||||
},
|
},
|
||||||
formatToggle: function () {
|
formatRefresh: function formatRefresh() {
|
||||||
return '切换';
|
return '刷新';
|
||||||
},
|
},
|
||||||
formatColumns: function () {
|
formatToggle: function formatToggle() {
|
||||||
return '列';
|
return '切换';
|
||||||
},
|
},
|
||||||
formatExport: function () {
|
formatColumns: function formatColumns() {
|
||||||
return '导出数据';
|
return '列';
|
||||||
},
|
},
|
||||||
formatClearFilters: function () {
|
formatFullscreen: function formatFullscreen() {
|
||||||
return '清空过滤';
|
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']);
|
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']);
|
||||||
|
})(jQuery);
|
||||||
})(jQuery);
|
});
|
|
@ -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)});
|
|
@ -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'
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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];
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue