/*! * Responsive Tables v5.0.4 (http://gergeo.se/RWD-Table-Patterns) * This is an awesome solution for responsive tables with complex data. * Authors: Nadan Gergeo (www.gergeo.se) & Maggie Wachs (www.filamentgroup.com) * Licensed under MIT (https://github.com/nadangergeo/RWD-Table-Patterns/blob/master/LICENSE-MIT) */ !function(a){"use strict";function b(){return"undefined"!=typeof window.matchMedia||"undefined"!=typeof window.msMatchMedia||"undefined"!=typeof window.styleMedia}function c(){return"ontouchstart"in window}function d(){return!!(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i))}var e=function(b,c){var e=this;if(this.options=c,this.$tableWrapper=null,this.$tableScrollWrapper=a(b),this.$table=a(b).find("table"),1!==this.$table.length)throw new Error("Exactly one table is expected in a .table-responsive div.");this.$tableScrollWrapper.attr("data-pattern",this.options.pattern),this.id=this.$table.prop("id")||this.$tableScrollWrapper.prop("id")||"id"+Math.random().toString(16).slice(2),this.$tableClone=null,this.$stickyTableHeader=null,this.$thead=this.$table.find("thead"),this.$tbody=this.$table.find("tbody"),this.$hdrCells=this.$thead.find("th"),this.$bodyRows=this.$tbody.find("tr"),this.$btnToolbar=null,this.$dropdownGroup=null,this.$dropdownBtn=null,this.$dropdownContainer=null,this.$displayAllBtn=null,this.$focusGroup=null,this.$focusBtn=null,this.displayAllTrigger="display-all-"+this.id+".responsive-table",this.idPrefix=this.id+"-col-",this.iOS=d(),this.wrapTable(),this.createButtonToolbar(),this.setupHdrCells(),this.setupStandardCells(),this.options.stickyTableHeader&&this.createStickyTableHeader(),this.$dropdownContainer.is(":empty")&&this.$dropdownGroup.hide(),a(window).bind("orientationchange resize "+this.displayAllTrigger,function(){e.$dropdownContainer.find("input").trigger("updateCheck"),a.proxy(e.updateSpanningCells(),e)})};e.DEFAULTS={pattern:"priority-columns",stickyTableHeader:!0,fixedNavbar:".navbar-fixed-top",addDisplayAllBtn:!0,addFocusBtn:!0,focusBtnIcon:"glyphicon glyphicon-screenshot"},e.prototype.wrapTable=function(){this.$tableScrollWrapper.wrap('
'),this.$tableWrapper=this.$tableScrollWrapper.parent()},e.prototype.createButtonToolbar=function(){var b=this;this.$btnToolbar=a('
'),this.$dropdownGroup=a('