/** * @license MIT * @license http://opensource.org/licenses/MIT Massachusetts Institute of Technology * @copyright 2014 Patric Gutersohn * @author Patric Gutersohn * @example index.html BDT in action. * @link http://bdt.gutersohn.de Documentation * @version 1.0.0 * * @summary BDT - Bootstrap Data Tables * @description sorting, paginating and search for bootstrap tables */ !function(a){"use strict";var e=1,t=0,n=0,s="",d=null,l=!1,r="",i="",o="",p="",c="";a.fn.bdt=function(f,h){function u(e){var t=e,n=0;e.find("thead th").wrapInner('').append(a("").addClass("sort-icon fa")).each(function(){var s=a(this),d=s.index(),l=!1,o=!0;s.click(function(){a(this).hasClass("disable-sorting")||(a(this).find(".sort-icon").hasClass(i)?a(this).find(".sort-icon").removeClass(i).addClass(r):a(this).find(".sort-icon").removeClass(r).addClass(i),n!=d&&(e.find(".sort-icon").removeClass(i),e.find(".sort-icon").removeClass(r),a(this).find(".sort-icon").toggleClass(i,o)),t.find("td").filter(function(){return a(this).index()===d}).sortElements(function(e,t){return a.text([e])>a.text([t])?l?-1:1:l?1:-1},function(){return this.parentNode}),l=!l,n=d)})})}function C(){a("#table-nav").remove(),s=a("