/* * bootstrap-table - v1.10.1 - 2016-02-17 * https://github.com/wenzhixin/bootstrap-table * Copyright (c) 2016 zhixin wen * Licensed MIT License */ !function(a){"use strict";var b,c="data-tt-id",d="data-tt-parent-id",e={},f=void 0,g=function(b,c){for(var d=b.$body.find("tr").not("[data-tt-parent-id]"),e=0;e0&&(b.options.loaded=!0,b.options.originalData=b.options.data,b.options.data=d),d};a.extend(a.fn.bootstrapTable.defaults,{groupBy:!1,groupByField:[],groupBySumGroup:!1,groupByInitExpanded:void 0,loaded:!1,originalData:void 0}),a.fn.bootstrapTable.methods.push("collapseAll","expandAll","refreshGroupByField"),a.extend(a.fn.bootstrapTable.COLUMN_DEFAULTS,{groupBySumGroup:!1});var o=a.fn.bootstrapTable.Constructor,p=o.prototype.init,q=o.prototype.initData;o.prototype.init=function(){if(!this.options.sortName&&this.options.groupBy&&this.options.groupByField.length>0){var a=this;Object.keys||j(),this.options.loaded=!1,this.options.originalData=void 0,b=this.options.rowAttributes,this.options.rowAttributes=i,this.$el.on("post-body.bs.table",function(){a.$el.treetable({expandable:!0,onNodeExpand:function(){a.options.height&&a.resetHeader()},onNodeCollapse:function(){a.options.height&&a.resetHeader()}},!0),void 0!==a.options.groupByInitExpanded&&("number"==typeof a.options.groupByInitExpanded?a.expandNode(a.options.groupByInitExpanded):"all"===a.options.groupByInitExpanded.toLowerCase()&&a.expandAll())})}p.apply(this,Array.prototype.slice.apply(arguments))},o.prototype.initData=function(a,b){this.options.sortName||this.options.groupBy&&this.options.groupByField.length>0&&(this.options.groupByField="string"==typeof this.options.groupByField?this.options.groupByField.replace("[","").replace("]","").replace(/ /g,"").toLowerCase().split(","):this.options.groupByField,a=n(this,a?a:this.options.data)),q.apply(this,[a,b])},o.prototype.expandAll=function(){this.$el.treetable("expandAll")},o.prototype.collapseAll=function(){this.$el.treetable("collapseAll")},o.prototype.expandNode=function(a){a=g(this,a),void 0!==a&&this.$el.treetable("expandNode",a)},o.prototype.refreshGroupByField=function(b){a.fn.bootstrapTable.utils.compareObjects(this.options.groupByField,b)||(this.options.groupByField=b,this.load(this.options.originalData))}}(jQuery);