/* * bootstrap-table - v1.11.9 - 2022-10-27 https://github.com/wenzhixin/bootstrap-table * Copyright (c) 2017 zhixin wen * Licensed MIT License */ "use strict";!function(h){var a=10,r=40,f=800;var c=null,i=(h.extend(h.fn.bootstrapTable.defaults,{fixedColumns:!1,fixedNumber:0,fixedRightNumber:0}),h.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.fixedColumnsSupported()&&(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=h(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)o.clientWidth?(null===c&&(o=h("

").addClass("fixed-table-scroll-inner"),t=n=void 0,(s=h("

").addClass("fixed-table-scroll-outer")).append(o),h("body").append(s),n=o[0].offsetWidth,s.css("overflow","scroll"),n===(t=o[0].offsetWidth)&&(t=s[0].clientWidth),s.remove(),c=n-t),c):0,s=h(".fixed-table-pagination",l.$tableContainer).height(),n=(void 0!==l.options.height&&(s=0),l.$tableContainer.outerHeight(!0)-o-s+1);return i.css({height:n,"min-height":"calc(100% - "+(s+o)+"px)"}),d.css({height:n-e.height(),"min-height":"calc(100% - "+e.height()+"px)",overflow:"hidden"}),d}var l=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=h(this).closest("tr[data-index]").data("index");h(l.$selectItem[e]).closest("tr[data-index]").find(">td:eq("+h(this).index()+")").trigger("click")})),h("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=h(this).closest("tr[data-index]").data("index");h(l.$selectItem[e]).closest("tr[data-index]").find(">td:eq("+h(this).index()+")").trigger("click")})),this.options.filterControl&&h(this.$fixedColumns).off("keyup change").on("keyup change",function(i){var i=h(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);