|
|
|
!function(a){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return a(e,window,document)}):"object"==typeof exports?module.exports=function(e,n){return e=e||window,n&&n.fn.dataTable||(n=require("datatables.net")(e,n).$),a(n,0,e.document)}:a(jQuery,window,document)}(function(r,e,n,a){"use strict";r.fn.dataTable.Api.register("searchFade()",function(){return this}),r.fn.dataTable.Api.register("searchFade().node()",function(){return this.settings()[0].searchFadeNode}),r.fn.dataTable.SearchFade=function(e){var n,d=new r.fn.dataTable.Api(e),a=r('<div class="searchFade"/>');d.settings()[0].searchFadeNode=a,e=d,(n=a).empty(),n.append("Search: "),r('<input type="text" class="searchFadeInput'+e.settings()[0].sTableId+'">').appendTo(n),a.on("keyup redraw","input",function(){d.rows(":visible").every(function(e,n,a){var t=!0;r(".searchFadeInput"+d.settings()[0].sTableId).val().length&&(t=d.row(e).data().some(function(e){return null!=e.match(new RegExp(r(".searchFadeInput"+d.settings()[0].sTableId).val(),"i"))})),r(d.row(e).node()).toggleClass("notMatched",!t)})}),d.on("draw",function(){r("input",a).trigger("redraw")}),this.node=function(){return a}},r.fn.DataTable.SearchFade=r.fn.dataTable.SearchFade,r.fn.dataTable.ext.feature.push({fnInit:function(e){return new r.fn.dataTable.SearchFade(e).node()},cFeature:"F"}),r(n).on("init.dt",function(e,n,a){"dt"===e.namespace&&r.fn.dataTable.SearchFade(n)})});
|