/* * bootstrap-table - v1.11.11 - 2023-06-28 https://github.com/wenzhixin/bootstrap-table * Copyright (c) 2017 zhixin wen * Licensed MIT License */ "use strict";!function(a){var h=10,r=40,f=800;var c=null,i=(a.extend(a.fn.bootstrapTable.defaults,{fixedColumns:!1,fixedNumber:0,fixedRightNumber:0}),a.fn.bootstrapTable.Constructor),e=i.prototype.initBody,t=i.prototype.initContainer,d=i.prototype.trigger,o=i.prototype.hideLoading,s=i.prototype.updateSelected;i.prototype.fixedColumnsSupported=function(){var i=this;return i.options.fixedColumns&&!i.options.detailView&&!i.options.cardView},i.prototype.initFixedContainer=function(){this.options.fixedNumber&&(0==this.$tableContainer.find(".fixed-columns").length&&this.$tableContainer.append('
'),this.$fixedColumns=this.$tableContainer.find(".fixed-columns")),this.options.fixedRightNumber&&(0==this.$tableContainer.find(".fixed-columns-right").length&&this.$tableContainer.append('
'),this.$fixedColumnsRight=this.$tableContainer.find(".fixed-columns-right"))},i.prototype.initContainer=function(){t.apply(this,Array.prototype.slice.apply(arguments)),this.initFixedContainer()},i.prototype.initBody=function(){e.apply(this,Array.prototype.slice.apply(arguments)),!this.fixedColumnsSupported()||this.options.showHeader&&this.options.height||(this.initFixedColumnsBody(),this.initFixedColumnsEvents())},i.prototype.trigger=function(){d.apply(this,Array.prototype.slice.apply(arguments)),"pre-body"===arguments[0]&&this.options.cardView&&this.$tableBody.css("height","auto"),"toggle"===arguments[0]&&(arguments[1]?(this.$tableBody.css("height","auto"),this.$fixedColumns&&this.$fixedColumns.hide(),this.$fixedColumnsRight&&this.$fixedColumnsRight.hide()):(this.$tableBody.css("height","100%"),this.$fixedColumns&&this.$fixedColumns.show(),this.$fixedColumnsRight&&this.$fixedColumnsRight.show(),this.$fixedHeaderRight&&this.$fixedHeaderRight.scrollLeft(this.$tableBody.find("table").width()),this.$fixedBodyRight&&this.$fixedBodyRight.scrollLeft(this.$tableBody.find("table").width()))),this.fixedColumnsSupported()&&("post-header"===arguments[0]?this.initFixedColumnsHeader():"scroll-body"===arguments[0]?(this.needFixedColumns&&this.options.fixedNumber&&this.$fixedBody&&this.$fixedBody.scrollTop(this.$tableBody.scrollTop()),this.needFixedColumns&&this.options.fixedRightNumber&&this.$fixedBodyRight&&this.$fixedBodyRight.scrollTop(this.$tableBody.scrollTop())):"load-success"===arguments[0]&&this.hideLoading())},i.prototype.updateSelected=function(){var l=this;s.apply(this,Array.prototype.slice.apply(arguments)),this.fixedColumnsSupported()&&this.$tableBody.find("tr").each(function(i,e){var e=a(e),d=e.data("index"),o=e.attr("class"),s='[name="'+l.options.selectItemName+'"]',n=e.find(s);void 0!==d&&(e=function(i,e){var t=e.find('tr[data-index="'+d+'"]');t.attr("class",o),n.length&&t.find(s).prop("checked",n.prop("checked")),l.$selectAll.length&&i.add(e).find('[name="btSelectAll"]').prop("checked",l.$selectAll.prop("checked"))},l.$fixedBody&&l.options.fixedNumber&&e(l.$fixedHeader,l.$fixedBody),l.$fixedBodyRight)&&l.options.fixedRightNumber&&e(l.$fixedHeaderRight,l.$fixedBodyRight)})},i.prototype.hideLoading=function(){o.apply(this,Array.prototype.slice.apply(arguments)),this.needFixedColumns&&this.options.fixedNumber&&this.$fixedColumns.find(".fixed-table-loading").hide(),this.needFixedColumns&&this.options.fixedRightNumber&&this.$fixedColumnsRight.find(".fixed-table-loading").hide()},i.prototype.initFixedColumnsHeader=function(){function i(i,e){return i.find(".fixed-table-header").remove(),i.append(t.$tableHeader.clone(!0)),i.find(".fixed-table-header").css("margin-right",""),i.css({width:t.getFixedColumnsWidth(e)}),i.find(".fixed-table-header")}var t=this;this.options.height?this.needFixedColumns=this.$tableHeader.outerWidth(!0)l.clientWidth?(null===c&&(t=a("

").addClass("fixed-table-scroll-inner"),e=i=void 0,(d=a("

").addClass("fixed-table-scroll-outer")).append(t),a("body").append(d),i=t[0].offsetWidth,d.css("overflow","scroll"),i===(e=t[0].offsetWidth)&&(e=d[0].clientWidth),d.remove(),c=i-e),c):0,d=a(".fixed-table-pagination",h.$tableContainer).height();void 0!==h.options.height&&(d=0),o.css({height:"calc(100% - "+(d+t)+"px)"}),n.css({height:"calc(100% - "+s.height()+"px)",overflow:"hidden"})}o.find(".fixed-table-body").remove(),o.append(h.$tableBody.clone(!0));var n=o.find(".fixed-table-body"),l=h.$tableBody.get(0);return a(window).on("resize",i),i(),n}var h=this;this.needFixedColumns&&this.options.fixedNumber&&(this.$fixedBody=i(this.$fixedColumns,this.$fixedHeader)),this.needFixedColumns&&this.options.fixedRightNumber&&(this.$fixedBodyRight=i(this.$fixedColumnsRight,this.$fixedHeaderRight),this.$fixedBodyRight.scrollLeft(this.$fixedBodyRight.find("table").width()),this.$fixedBodyRight.css("overflow-y","hidden"))},i.prototype.getFixedColumnsWidth=function(i){var e=this.getVisibleFields(),t=0,d=this.options.fixedNumber;i&&(e=e.reverse(),d=this.options.fixedRightNumber,this.$fixedColumnsRight.css("right",(i=this.$tableBody)[0].scrollHeight>i[0].clientHeight?15:0));for(var o=0;o table > tbody > tr[data-index] > td").off("click dblclick").on("click dblclick",function(i){var e=a(this).closest("tr[data-index]").data("index");a(l.$selectItem[e]).closest("tr[data-index]").find(">td:eq("+a(this).index()+")").trigger("click")})),a("div.fixed-table-body").off("scroll"),this.$tableBody.off("scroll").on("scroll",function(i){l.$tableHeader.scrollLeft(0),0 table > tbody > tr[data-index] > td").off("click dblclick").on("click dblclick",function(i){var e=a(this).closest("tr[data-index]").data("index");a(l.$selectItem[e]).closest("tr[data-index]").find(">td:eq("+a(this).index()+")").trigger("click")})),this.options.filterControl&&a(this.$fixedColumns).off("keyup change").on("keyup change",function(i){var i=a(i.target),e=i.val(),t=i.parents("th").data("field"),t=l.$header.find('th[data-field="'+t+'"]');i.is("input")?t.find("input").val(e):i.is("select")&&((i=t.find("select")).find("option[selected]").removeAttr("selected"),i.find('option[value="'+e+'"]').attr("selected",!0)),l.triggerSearch()})}}(jQuery);