");if(this.options.cardView){y.push(m('',this.header.fields.length))}if(!this.options.cardView&&this.options.detailView){y.push(" ",'',m('',this.options.iconsPrefix,this.options.icons.detailOpen),""," | ")}j.each(this.header.fields,function(I,L){var P="",M=o(C,L,z.options.escape),K="",E={},Q="",J=z.header.classes[I],G="",O="",R="",H="",F=z.columns[I];if(z.fromHtml&&typeof M==="undefined"){return}if(!F.visible){return}if(z.options.cardView&&!F.cardVisible){return}r=m('style="%s"',s.concat(z.header.styles[I]).join("; "));if(C["_"+L+"_id"]){Q=m(' id="%s"',C["_"+L+"_id"])}if(C["_"+L+"_class"]){J=m(' class="%s"',C["_"+L+"_class"])}if(C["_"+L+"_rowspan"]){O=m(' rowspan="%s"',C["_"+L+"_rowspan"])}if(C["_"+L+"_colspan"]){R=m(' colspan="%s"',C["_"+L+"_colspan"])}if(C["_"+L+"_title"]){H=m(' title="%s"',C["_"+L+"_title"])}E=q(z.header,z.header.cellStyles[I],[M,C,w,L],E);if(E.classes){J=m(' class="%s"',E.classes)}if(E.css){var D=[];for(var N in E.css){D.push(N+": "+E.css[N])}r=m('style="%s"',D.concat(z.header.styles[I]).join("; "))}M=q(F,z.header.formatters[I],[M,C,w],M);if(C["_"+L+"_data"]&&!j.isEmptyObject(C["_"+L+"_data"])){j.each(C["_"+L+"_data"],function(T,S){if(T==="index"){return}G+=m(' data-%s="%s"',T,S)})}if(F.checkbox||F.radio){K=F.checkbox?"checkbox":K;K=F.radio?"radio":K;P=[m(z.options.cardView?' ':' ',F["class"]||""),"",z.header.formatters[I]&&typeof M==="string"?M:"",z.options.cardView?"":" | "].join("");C[z.header.stateField]=M===true||(M&&M.checked)}else{M=typeof M==="undefined"||M===null?z.options.undefinedText:M;P=z.options.cardView?[' ',z.options.showHeader?m('%s',r,c(z.columns,"field","title",L)):"",m('%s',M)," "].join(""):[m(" ",Q,J,r,G,O,R,H),M," | "].join("");if(z.options.cardView&&z.options.smartDisplay&&M===""){P=' '}}y.push(P)});if(this.options.cardView){y.push(" | ")}y.push("")}if(!y.length){y.push('',m('%s | ',this.$header.find("th").length,this.options.formatNoMatches()),"
")}this.$body.html(y.join(""));if(!x){this.scrollTo(0)}this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(J){var D=j(this),F=D.parent(),M=z.data[F.data("index")],H=D[0].cellIndex,G=z.getVisibleFields(),K=G[z.options.detailView&&!z.options.cardView?H-1:H],E=z.columns[i(z.columns,K)],L=o(M,K,z.options.escape);if(D.find(".detail-icon").length){return}z.trigger(J.type==="click"?"click-cell":"dbl-click-cell",K,L,M,D);z.trigger(J.type==="click"?"click-row":"dbl-click-row",M,F,K);if(J.type==="click"&&z.options.clickToSelect&&E.clickToSelect){var I=F.find(m('[name="%s"]',z.options.selectItemName));if(I.length){I[0].click()}}});this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(){var H=j(this),G=H.parent().parent(),E=G.data("index"),I=v[E];if(G.next().is("tr.detail-view")){H.find("i").attr("class",m("%s %s",z.options.iconsPrefix,z.options.icons.detailOpen));G.next().remove();z.trigger("collapse-row",E,I)}else{H.find("i").attr("class",m("%s %s",z.options.iconsPrefix,z.options.icons.detailClose));G.after(m(' |
',G.find("td").length));var D=G.next().find("td");var F=q(z.options,z.options.detailFormatter,[E,I,D],"");if(D.length===1){D.append(F)}z.trigger("expand-row",E,I,D)}z.resetView()});this.$selectItem=this.$body.find(m('[name="%s"]',this.options.selectItemName));this.$selectItem.off("click").on("click",function(E){E.stopImmediatePropagation();var F=j(this),D=F.prop("checked"),G=z.data[F.data("index")];if(z.options.maintainSelected&&j(this).is(":radio")){j.each(z.options.data,function(H,I){I[z.header.stateField]=false})}G[z.header.stateField]=D;if(z.options.singleSelect){z.$selectItem.not(this).each(function(){z.data[j(this).data("index")][z.header.stateField]=false});z.$selectItem.filter(":checked").not(this).prop("checked",false)}z.updateSelected();z.trigger(D?"check":"uncheck",G,F)});j.each(this.header.events,function(G,F){if(!F){return}if(typeof F==="string"){F=q(null,F)}var H=z.header.fields[G],D=j.inArray(H,z.getVisibleFields());if(z.options.detailView&&!z.options.cardView){D+=1}for(var E in F){z.$body.find(">tr:not(.no-records-found)").each(function(){var M=j(this),N=M.find(z.options.cardView?".card-view":"td").eq(D),J=E.indexOf(" "),I=E.substring(0,J),K=E.substring(J+1),L=F[E];N.find(K).off(I).on(I,function(Q){var O=M.data("index"),R=z.data[O],P=R[H];L.apply(this,[Q,P,R,O])})})}});this.updateSelected();this.resetView();this.trigger("post-body",v)};e.prototype.initServer=function(r,w,s){var u=this,v={},x={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder},t;if(this.options.pagination){x.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize;x.pageNumber=this.options.pageNumber}if(!this.options.firstLoad&&isFirstLoad){isFirstLoad=false;return}if(!(s||this.options.url)&&!this.options.ajax){return}if(this.options.queryParamsType==="limit"){x={search:x.searchText,sort:x.sortName,order:x.sortOrder};if(this.options.pagination){x.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1);x.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize}}if(!(j.isEmptyObject(this.filterColumnsPartial))){x.filter=JSON.stringify(this.filterColumnsPartial,null)}v=q(this.options,this.options.queryParams,[x],v);j.extend(v,w||{});if(v===false){return}if(!r){this.$tableLoading.show()}t=j.extend({},q(null,this.options.ajaxOptions),{type:this.options.method,url:s||this.options.url,data:this.options.contentType==="application/json"&&this.options.method==="post"?JSON.stringify(v):v,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(y){y=q(u.options,u.options.responseHandler,[y],y);u.load(y);u.trigger("load-success",y);if(!r){u.$tableLoading.hide()}},error:function(y){u.trigger("load-error",y.status,y);if(!r){u.$tableLoading.hide()}}});if(this.options.ajax){q(this,this.options.ajax,[t],null)}else{if(this._xhr&&this._xhr.readyState!==4){this._xhr.abort()}this._xhr=j.ajax(t)}};e.prototype.initSearchText=function(){if(this.options.search){if(this.options.searchText!==""){var r=this.$toolbar.find(".search input");r.val(this.options.searchText);this.onSearch({currentTarget:r})}}};e.prototype.getCaret=function(){var r=this;j.each(this.$header.find("th"),function(s,t){j(t).find(".sortable").removeClass("desc asc").addClass((j(t).data("field")===r.options.sortName||j(t).data("sortName")===r.options.sortName)?r.options.sortOrder:"both")})};e.prototype.updateSelected=function(){var r=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;var s=j(".left-fixed-table-columns input[name=btSelectItem]");if(s.length>0){r=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===s.filter(":enabled").filter(":checked").length}this.$selectAll.add(this.$selectAll_).prop("checked",r);this.$selectItem.each(function(){j(this).closest("tr")[j(this).prop("checked")?"addClass":"removeClass"]("selected")})};e.prototype.updateRows=function(){var r=this;this.$selectItem.each(function(){r.data[j(this).data("index")][r.header.stateField]=j(this).prop("checked")})};e.prototype.resetRows=function(){var r=this;j.each(this.data,function(s,t){r.$selectAll.prop("checked",false);r.$selectItem.prop("checked",false);if(r.header.stateField){t[r.header.stateField]=false}})};e.prototype.trigger=function(s){var r=Array.prototype.slice.call(arguments,1);s+=".bs.table";this.options[e.EVENTS[s]].apply(this.options,r);this.$el.trigger(j.Event(s),r);this.options.onAll(s,r);this.$el.trigger(j.Event("all.bs.table"),[s,r])};e.prototype.resetHeader=function(){clearTimeout(this.timeoutId_);this.timeoutId_=setTimeout(j.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)};e.prototype.fitHeader=function(){var t=this,u,r,x,y;if(t.$el.is(":hidden")){t.timeoutId_=setTimeout(j.proxy(t.fitHeader,t),100);return}u=this.$tableBody.get(0);r=u.scrollWidth>u.clientWidth&&u.scrollHeight>u.clientHeight+this.$header.outerHeight()?a():0;this.$el.css("margin-top",-this.$header.outerHeight());x=j(":focus");if(x.length>0){var z=x.parents("th");if(z.length>0){var A=z.attr("data-field");if(A!==undefined){var s=this.$header.find("[data-field='"+A+"']");if(s.length>0){s.find(":input").addClass("focus-temp")}}}}this.$header_=this.$header.clone(true,true);this.$selectAll_=this.$header_.find('[name="btSelectAll"]');this.$tableHeader.css({"margin-right":r}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_);y=j(".focus-temp:visible:eq(0)");if(y.length>0){y.focus();this.$header.find(".focus-temp").removeClass("focus-temp")}this.$header.find("th[data-field]").each(function(B){t.$header_.find(m('th[data-field="%s"]',j(this).data("field"))).data(j(this).data())});var w=this.getVisibleFields(),v=this.$header_.find("th");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(C){var E=j(this),B=C;if(t.options.detailView&&!t.options.cardView){if(C===0){t.$header_.find("th.detail").find(".fht-cell").width(E.innerWidth())}B=C-1}var D=t.$header_.find(m('th[data-field="%s"]',w[B]));if(D.length>1){D=j(v[E[0].cellIndex])}D.find(".fht-cell").width(E.innerWidth())});this.$tableBody.off("scroll").on("scroll",function(){t.$tableHeader.scrollLeft(j(this).scrollLeft());if(t.options.showFooter&&!t.options.cardView){t.$tableFooter.scrollLeft(j(this).scrollLeft())}});t.trigger("post-header")};e.prototype.resetFooter=function(){var s=this,t=s.getData(),r=[];if(!this.options.showFooter||this.options.cardView){return}if(!this.options.cardView&&this.options.detailView){r.push(' | ')}j.each(this.columns,function(x,z){var w,B="",v="",A=[],y={},u=m(' class="%s"',z["class"]);if(!z.visible){return}if(s.options.cardView&&(!z.cardVisible)){return}B=m("text-align: %s; ",z.falign?z.falign:z.align);v=m("vertical-align: %s; ",z.valign);y=q(null,s.options.footerStyle);if(y&&y.css){for(w in y.css){A.push(w+": "+y.css[w])}}r.push("");r.push(' ');r.push(q(z,z.footerFormatter,[t]," ")||" ");r.push(" ");r.push('');r.push("");r.push(" | ")});this.$tableFooter.find("tr").html(r.join(""));this.$tableFooter.show();clearTimeout(this.timeoutFooter_);this.timeoutFooter_=setTimeout(j.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0)};e.prototype.fitFooter=function(){var u=this,r,t,s;clearTimeout(this.timeoutFooter_);if(this.$el.is(":hidden")){this.timeoutFooter_=setTimeout(j.proxy(this.fitFooter,this),100);return}t=this.$el.css("width");s=t>this.$tableBody.width()?a():0;this.$tableFooter.css({"margin-right":s}).find("table").css("width",t).attr("class",this.$el.attr("class"));r=this.$tableFooter.find("td");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(v){var w=j(this);r.eq(v).find(".fht-cell").width(w.innerWidth()+1)})};e.prototype.toggleColumn=function(r,s,u){if(r===-1){return}this.columns[r].visible=s;this.initHeader();this.initSearch();this.initPagination();this.initBody();if(this.options.showColumns){var t=this.$toolbar.find(".keep-open input").prop("disabled",false);if(u){t.filter(m('[value="%s"]',r)).prop("checked",s)}if(t.filter(":checked").length<=this.options.minimumCountColumns){t.filter(":checked").prop("disabled",true)}}};e.prototype.toggleRow=function(r,t,s){if(r===-1){return}this.$body.find(typeof r!=="undefined"?m('tr[data-index="%s"]',r):m('tr[data-uniqueid="%s"]',t))[s?"show":"hide"]()};e.prototype.getVisibleFields=function(){var s=this,r=[];j.each(this.header.fields,function(t,v){var u=s.columns[i(s.columns,v)];if(!u.visible){return}r.push(v)});return r};e.prototype.resetView=function(u){var s=0;if(u&&u.height){this.options.height=u.height}this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length);if(this.options.height){var t=d(this.$toolbar),v=d(this.$pagination),r=this.options.height-t-v;this.$tableContainer.css("height",r+"px")}if(this.options.cardView){this.$el.css("margin-top","0");this.$tableContainer.css("padding-bottom","0");this.$tableFooter.hide();return}if(this.options.showHeader&&this.options.height){this.$tableHeader.show();this.resetHeader();s+=this.$header.outerHeight()}else{this.$tableHeader.hide();this.trigger("post-header")}if(this.options.showFooter){this.resetFooter();if(this.options.height){s+=this.$tableFooter.outerHeight()+1}}this.getCaret();this.$tableContainer.css("padding-bottom",s+"px");this.trigger("reset-view")};e.prototype.getData=function(r){return(this.searchText||!j.isEmptyObject(this.filterColumns)||!j.isEmptyObject(this.filterColumnsPartial))?(r?this.data.slice(this.pageFrom-1,this.pageTo):this.data):(r?this.options.data.slice(this.pageFrom-1,this.pageTo):this.options.data)};e.prototype.load=function(s){var r=false;if(this.options.sidePagination==="server"){this.options.totalRows=s.total;r=s.fixedScroll;s=s[this.options.dataField]}else{if(!j.isArray(s)){r=s.fixedScroll;s=s.data}}this.initData(s);this.initSearch();this.initPagination();this.initBody(r)};e.prototype.append=function(r){this.initData(r,"append");this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.prepend=function(r){this.initData(r,"prepend");this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.remove=function(u){var r=this.options.data.length,s,t;if(!u.hasOwnProperty("field")||!u.hasOwnProperty("values")){return}for(s=r-1;s>=0;s--){t=this.options.data[s];if(!t.hasOwnProperty(u.field)){continue}if(j.inArray(t[u.field],u.values)!==-1){this.options.data.splice(s,1)}}if(r===this.options.data.length){return}this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.removeAll=function(){if(this.options.data.length>0){this.options.data.splice(0,this.options.data.length);this.initSearch();this.initPagination();this.initBody(true)}};e.prototype.getRowByUniqueId=function(x){var w=this.options.uniqueId,r=this.options.data.length,s=null,t,v,u;for(t=r-1;t>=0;t--){v=this.options.data[t];if(v.hasOwnProperty(w)){u=v[w]}else{if(v._data.hasOwnProperty(w)){u=v._data[w]}else{continue}}if(typeof u==="string"){x=x.toString()}else{if(typeof u==="number"){if((Number(u)===u)&&(u%1===0)){x=parseInt(x)}else{if((u===Number(u))&&(u!==0)){x=parseFloat(x)}}}}if(u===x){s=v;break}}return s};e.prototype.removeByUniqueId=function(t){var r=this.options.data.length,s=this.getRowByUniqueId(t);if(s){this.options.data.splice(this.options.data.indexOf(s),1)}if(r===this.options.data.length){return}this.initSearch();this.initPagination();this.initBody(true)};e.prototype.updateByUniqueId=function(t){var r=this;var s=j.isArray(t)?t:[t];j.each(s,function(u,w){var v;if(!w.hasOwnProperty("id")||!w.hasOwnProperty("row")){return}v=j.inArray(r.getRowByUniqueId(w.id),r.options.data);if(v===-1){return}j.extend(r.options.data[v],w.row)});this.initSearch();this.initSort();this.initBody(true)};e.prototype.insertRow=function(r){if(!r.hasOwnProperty("index")||!r.hasOwnProperty("row")){return}this.data.splice(r.index,0,r.row);this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.updateRow=function(t){var r=this;var s=j.isArray(t)?t:[t];j.each(s,function(u,v){if(!v.hasOwnProperty("index")||!v.hasOwnProperty("row")){return}j.extend(r.options.data[v.index],v.row)});this.initSearch();this.initSort();this.initBody(true)};e.prototype.showRow=function(r){if(!r.hasOwnProperty("index")&&!r.hasOwnProperty("uniqueId")){return}this.toggleRow(r.index,r.uniqueId,true)};e.prototype.hideRow=function(r){if(!r.hasOwnProperty("index")&&!r.hasOwnProperty("uniqueId")){return}this.toggleRow(r.index,r.uniqueId,false)};e.prototype.getRowsHidden=function(r){var t=j(this.$body[0]).children().filter(":hidden"),s=0;if(r){for(;str"),r;if(this.options.detailView&&!this.options.cardView){t+=1}r=x.eq(y).find(">td").eq(t);if(y<0||t<0||y>=this.data.length){return}for(w=y;wtd").eq(v).hide()}}r.attr("rowspan",u).attr("colspan",s).show()};e.prototype.updateCell=function(r){if(!r.hasOwnProperty("index")||!r.hasOwnProperty("field")||!r.hasOwnProperty("value")){return}this.data[r.index][r.field]=r.value;if(r.reinit===false){return}this.initSort();this.initBody(true)};e.prototype.getOptions=function(){return this.options};e.prototype.getSelections=function(){var r=this;return j.grep(this.options.data,function(s){return s[r.header.stateField]})};e.prototype.getAllSelections=function(){var r=this;return j.grep(this.options.data,function(s){return s[r.header.stateField]})};e.prototype.checkAll=function(){this.checkAll_(true)};e.prototype.uncheckAll=function(){this.checkAll_(false)};e.prototype.checkInvert=function(){var s=this;var t=s.$selectItem.filter(":enabled");var r=t.filter(":checked");t.each(function(){j(this).prop("checked",!j(this).prop("checked"))});s.updateRows();s.updateSelected();s.trigger("uncheck-some",r);r=s.getSelections();s.trigger("check-some",r)};e.prototype.checkAll_=function(r){var s;if(!r){s=this.getSelections()}this.$selectAll.add(this.$selectAll_).prop("checked",r);this.$selectItem.filter(":enabled").prop("checked",r);this.updateRows();if(r){s=this.getSelections()}this.trigger(r?"check-all":"uncheck-all",s)};e.prototype.check=function(r){this.check_(true,r)};e.prototype.uncheck=function(r){this.check_(false,r)};e.prototype.check_=function(t,r){var s=this.$selectItem.filter(m('[data-index="%s"]',r)).prop("checked",t);
-this.data[r][this.header.stateField]=t;this.updateSelected();this.trigger(t?"check":"uncheck",this.data[r],s)};e.prototype.checkBy=function(r){this.checkBy_(true,r)};e.prototype.uncheckBy=function(r){this.checkBy_(false,r)};e.prototype.checkBy_=function(s,u){if(!u.hasOwnProperty("field")||!u.hasOwnProperty("values")){return}var r=this,t=[];j.each(this.options.data,function(v,x){if(!x.hasOwnProperty(u.field)){return false}if(j.inArray(x[u.field],u.values)!==-1){var w=r.$selectItem.filter(":enabled").filter(m('[data-index="%s"]',v)).prop("checked",s);x[r.header.stateField]=s;t.push(x);r.trigger(s?"check":"uncheck",x,w)}});this.updateSelected();this.trigger(s?"check-some":"uncheck-some",t)};e.prototype.destroy=function(){this.$el.insertBefore(this.$container);j(this.options.toolbar).insertBefore(this.$el);this.$container.next().remove();this.$container.remove();this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")};e.prototype.showLoading=function(){this.$tableLoading.show()};e.prototype.hideLoading=function(){this.$tableLoading.hide()};e.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var r=this.$toolbar.find('button[name="paginationSwitch"] i');if(this.options.pagination){r.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown)}else{r.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp)}this.updatePagination()};e.prototype.refresh=function(r){if(r&&r.url){this.options.pageNumber=1}if(selectionIds.length>0){selectionIds=[]}this.initServer(r&&r.silent,r&&r.query,r&&r.url);this.trigger("refresh",r)};e.prototype.resetWidth=function(){if(this.options.showHeader&&this.options.height){this.fitHeader()}if(this.options.showFooter){this.fitFooter()}};e.prototype.showColumn=function(r){this.toggleColumn(i(this.columns,r),true,true)};e.prototype.hideColumn=function(r){this.toggleColumn(i(this.columns,r),false,true)};e.prototype.getHiddenColumns=function(){return j.grep(this.columns,function(r){return !r.visible})};e.prototype.getVisibleColumns=function(){return j.grep(this.columns,function(r){return r.visible})};e.prototype.toggleAllColumns=function(r){j.each(this.columns,function(t,u){this.columns[t].visible=r});this.initHeader();this.initSearch();this.initPagination();this.initBody();if(this.options.showColumns){var s=this.$toolbar.find(".keep-open input").prop("disabled",false);if(s.filter(":checked").length<=this.options.minimumCountColumns){s.filter(":checked").prop("disabled",true)}}};e.prototype.showAllColumns=function(){this.toggleAllColumns(true)};e.prototype.hideAllColumns=function(){this.toggleAllColumns(false)};e.prototype.filterBy=function(r){this.filterColumns=j.isEmptyObject(r)?{}:r;this.options.pageNumber=1;this.initSearch();this.updatePagination()};e.prototype.scrollTo=function(r){if(typeof r==="string"){r=r==="bottom"?this.$tableBody[0].scrollHeight:0}if(typeof r==="number"){this.$tableBody.scrollTop(r)}if(typeof r==="undefined"){return this.$tableBody.scrollTop()}};e.prototype.getScrollPosition=function(){return this.scrollTo()};e.prototype.selectPage=function(r){if(r>0&&r<=this.options.totalPages){this.options.pageNumber=r;this.updatePagination()}};e.prototype.prevPage=function(){if(this.options.pageNumber>1){this.options.pageNumber--;this.updatePagination()}};e.prototype.nextPage=function(){if(this.options.pageNumber tr[data-index="%s"]',r));if(t.next().is("tr.detail-view")===(s?false:true)){t.find("> td > .detail-icon").click()}};e.prototype.expandRow=function(r){this.expandRow_(true,r)};e.prototype.collapseRow=function(r){this.expandRow_(false,r)};e.prototype.expandAllRows=function(r){if(r){var w=this.$body.find(m('> tr[data-index="%s"]',0)),x=this,u=null,v=false,s=-1;if(!w.next().is("tr.detail-view")){w.find("> td > .detail-icon").click();v=true}else{if(!w.next().next().is("tr.detail-view")){w.next().find(".detail-icon").click();v=true}}if(v){try{s=setInterval(function(){u=x.$body.find("tr.detail-view").last().find(".detail-icon");if(u.length>0){u.click()}else{clearInterval(s)}},1)}catch(z){clearInterval(s)}}}else{var y=this.$body.children();for(var t=0;t0){selectionIds=[]}if(selectionRows.length>0){selectionRows=[]}this.initServer(r&&r.silent,r&&r.query,r&&r.url);this.trigger("refresh",r)};e.prototype.resetWidth=function(){if(this.options.showHeader&&this.options.height){this.fitHeader()}if(this.options.showFooter){this.fitFooter()}};e.prototype.showColumn=function(r){this.toggleColumn(i(this.columns,r),true,true)};e.prototype.hideColumn=function(r){this.toggleColumn(i(this.columns,r),false,true)};e.prototype.getHiddenColumns=function(){return j.grep(this.columns,function(r){return !r.visible})};e.prototype.getVisibleColumns=function(){return j.grep(this.columns,function(r){return r.visible})};e.prototype.toggleAllColumns=function(r){j.each(this.columns,function(t,u){this.columns[t].visible=r});this.initHeader();this.initSearch();this.initPagination();this.initBody();if(this.options.showColumns){var s=this.$toolbar.find(".keep-open input").prop("disabled",false);if(s.filter(":checked").length<=this.options.minimumCountColumns){s.filter(":checked").prop("disabled",true)}}};e.prototype.showAllColumns=function(){this.toggleAllColumns(true)};e.prototype.hideAllColumns=function(){this.toggleAllColumns(false)};e.prototype.filterBy=function(r){this.filterColumns=j.isEmptyObject(r)?{}:r;this.options.pageNumber=1;this.initSearch();this.updatePagination()};e.prototype.scrollTo=function(r){if(typeof r==="string"){r=r==="bottom"?this.$tableBody[0].scrollHeight:0}if(typeof r==="number"){this.$tableBody.scrollTop(r)}if(typeof r==="undefined"){return this.$tableBody.scrollTop()}};e.prototype.getScrollPosition=function(){return this.scrollTo()};e.prototype.selectPage=function(r){if(r>0&&r<=this.options.totalPages){this.options.pageNumber=r;this.updatePagination()}};e.prototype.prevPage=function(){if(this.options.pageNumber>1){this.options.pageNumber--;this.updatePagination()}};e.prototype.nextPage=function(){if(this.options.pageNumber tr[data-index="%s"]',r));if(t.next().is("tr.detail-view")===(s?false:true)){t.find("> td > .detail-icon").click()}};e.prototype.expandRow=function(r){this.expandRow_(true,r)};e.prototype.collapseRow=function(r){this.expandRow_(false,r)};e.prototype.expandAllRows=function(r){if(r){var w=this.$body.find(m('> tr[data-index="%s"]',0)),x=this,u=null,v=false,s=-1;if(!w.next().is("tr.detail-view")){w.find("> td > .detail-icon").click();v=true}else{if(!w.next().next().is("tr.detail-view")){w.next().find(".detail-icon").click();v=true}}if(v){try{s=setInterval(function(){u=x.$body.find("tr.detail-view").last().find(".detail-icon");if(u.length>0){u.click()}else{clearInterval(s)}},1)}catch(z){clearInterval(s)}}}else{var y=this.$body.children();for(var t=0;t -1 ? 'union' : 'difference';
+ selectionIds = _[func](selectionIds, rowIds);
+ selectionRows = _[func](selectionRows, rows);
+ }
+ });
// 触发行点击事件 加载成功事件
$.btTable.on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table load-success.bs.table", function () {
// 工具栏按钮控制
@@ -148,15 +158,6 @@
// 非单个禁用
$('#' + $.table._option.toolbar + ' .single').toggleClass('disabled', rows.length!=1);
});
- // 绑定选中事件、取消事件、全部选中、全部取消
- $.btTable.on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rows) {
- // 复选框分页保留保存选中数组
- var rowIds = $.table.affectedRowIds(rows);
- if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
- func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
- selectionIds = _[func](selectionIds, rowIds);
- }
- });
// 图片预览事件
$.btTable.on('click', '.img-circle', function() {
var src = $(this).attr('src');
@@ -365,7 +366,9 @@
return row[column];
});
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
- rows = rows.concat(selectionIds);
+ rows = $.map(selectionRows, function (row) {
+ return row[column];
+ });
}
return $.common.uniqueFn(rows);
},
@@ -388,7 +391,9 @@
return row[$.table._option.columns[1].field];
});
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
- rows = rows.concat(selectionIds);
+ rows = $.map(selectionRows, function (row) {
+ return row[$.table._option.columns[1].field];
+ });
}
return $.common.uniqueFn(rows);
},
@@ -1348,7 +1353,11 @@
formToJSON: function(formId) {
var json = {};
$.each($("#" + formId).serializeArray(), function(i, field) {
- json[field.name] = field.value;
+ if(json[field.name]) {
+ json[field.name] += ("," + field.value);
+ } else {
+ json[field.name] = field.value;
+ }
});
return json;
}
diff --git a/ruoyi-admin/src/main/resources/templates/demo/form/autocomplete.html b/ruoyi-admin/src/main/resources/templates/demo/form/autocomplete.html
index 5db41bfc4..a9e9ade08 100644
--- a/ruoyi-admin/src/main/resources/templates/demo/form/autocomplete.html
+++ b/ruoyi-admin/src/main/resources/templates/demo/form/autocomplete.html
@@ -99,7 +99,7 @@
@@ -145,7 +145,7 @@
diff --git a/ruoyi-admin/src/main/resources/templates/demo/form/datetime.html b/ruoyi-admin/src/main/resources/templates/demo/form/datetime.html
index f159f3d88..591ba101b 100644
--- a/ruoyi-admin/src/main/resources/templates/demo/form/datetime.html
+++ b/ruoyi-admin/src/main/resources/templates/demo/form/datetime.html
@@ -57,7 +57,7 @@
@@ -111,7 +111,7 @@
diff --git a/ruoyi-admin/src/main/resources/templates/demo/form/duallistbox.html b/ruoyi-admin/src/main/resources/templates/demo/form/duallistbox.html
index a8a55ddf1..ef80a3dec 100644
--- a/ruoyi-admin/src/main/resources/templates/demo/form/duallistbox.html
+++ b/ruoyi-admin/src/main/resources/templates/demo/form/duallistbox.html
@@ -33,6 +33,11 @@
+
+
diff --git a/ruoyi-admin/src/main/resources/templates/demo/form/jasny.html b/ruoyi-admin/src/main/resources/templates/demo/form/jasny.html
index 25aefb835..e581fc9ca 100644
--- a/ruoyi-admin/src/main/resources/templates/demo/form/jasny.html
+++ b/ruoyi-admin/src/main/resources/templates/demo/form/jasny.html
@@ -62,7 +62,7 @@
@@ -105,7 +105,7 @@
diff --git a/ruoyi-admin/src/main/resources/templates/demo/form/select.html b/ruoyi-admin/src/main/resources/templates/demo/form/select.html
index 383c31e0f..070a53174 100644
--- a/ruoyi-admin/src/main/resources/templates/demo/form/select.html
+++ b/ruoyi-admin/src/main/resources/templates/demo/form/select.html
@@ -69,7 +69,7 @@
@@ -133,7 +133,7 @@
diff --git a/ruoyi-admin/src/main/resources/templates/demo/form/upload.html b/ruoyi-admin/src/main/resources/templates/demo/form/upload.html
index 7c78daa34..2188a213c 100644
--- a/ruoyi-admin/src/main/resources/templates/demo/form/upload.html
+++ b/ruoyi-admin/src/main/resources/templates/demo/form/upload.html
@@ -29,7 +29,7 @@
diff --git a/ruoyi-admin/src/main/resources/templates/demo/form/validate.html b/ruoyi-admin/src/main/resources/templates/demo/form/validate.html
index 35f48fa48..8fb68d729 100644
--- a/ruoyi-admin/src/main/resources/templates/demo/form/validate.html
+++ b/ruoyi-admin/src/main/resources/templates/demo/form/validate.html
@@ -71,7 +71,7 @@
diff --git a/ruoyi-admin/src/main/resources/templates/demo/table/remember.html b/ruoyi-admin/src/main/resources/templates/demo/table/remember.html
index 86a56f7c3..8ec84c3e8 100644
--- a/ruoyi-admin/src/main/resources/templates/demo/table/remember.html
+++ b/ruoyi-admin/src/main/resources/templates/demo/table/remember.html
@@ -81,7 +81,8 @@
// 选中数据
function checkItem(){
- var arrays = $.table.selectColumns("userId");
+ // var arrays = $.table.selectColumns("userId");
+ var arrays = $.table.selectColumns("userCode");
alert(arrays);
}
diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html
index 81752fd9a..cdc241952 100644
--- a/ruoyi-admin/src/main/resources/templates/index.html
+++ b/ruoyi-admin/src/main/resources/templates/index.html
@@ -173,7 +173,7 @@