/** * @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.biz Documentation * @version 1.0.0 * * @summary BDT - Bootstrap Data Tables * @description sorting, paginating and search for bootstrap tables */ (function(e){"use strict";var t=1;var n=0;var r=0;var i="";var s=null;var o=false;var u="";var a="";e.fn.bdt=function(f,l){function p(t){var n=t;var r=0;t.find("thead th").wrapInner('').append(e("").addClass("sort-icon fa")).each(function(){var i=e(this);var s=i.index();var o=false;var f=true;i.click(function(){if(e(this).find(".sort-icon").hasClass(a)){e(this).find(".sort-icon").removeClass(a).addClass(u)}else{e(this).find(".sort-icon").removeClass(u).addClass(a)}if(r!=s){t.find(".sort-icon").removeClass(a);t.find(".sort-icon").removeClass(u);e(this).find(".sort-icon").toggleClass(a,f)}n.find("td").filter(function(){return e(this).index()===s}).sortElements(function(t,n){return e.text([t])>e.text([n])?o?-1:1:o?1:-1},function(){return this.parentNode});o=!o;r=s})})}function d(){e("#table-nav").remove();i=e("