diff --git a/features/alphabetSearch/dataTables.alphabetSearch.min.js b/features/alphabetSearch/dataTables.alphabetSearch.min.js index 033b500..fc108e1 100644 --- a/features/alphabetSearch/dataTables.alphabetSearch.min.js +++ b/features/alphabetSearch/dataTables.alphabetSearch.min.js @@ -1,8 +1,17 @@ /*! + Copyright 2014 SpryMedia Ltd. + + License MIT - http://datatables.net/license/mit + + For more detailed information please see: + http://datatables.net/blog/2014-09-22 AlphabetSearch for DataTables v1.0.0 2014 SpryMedia Ltd - datatables.net/license */ -(function(){function f(b,c){c.empty();c.append("Search: ");for(var a=b.column(0).data(),d,e={},g=0,f=a.length;g/g,"").charAt(0).toUpperCase(),e[d]?e[d]++:e[d]=1;$('').data("letter","").data("match-count",a.length).html("None").appendTo(c);for(a=0;26>a;a++)d=String.fromCharCode(65+a),$("").data("letter",d).data("match-count",e[d]||0).addClass(!e[d]?"empty":"").html(d).appendTo(c);$('
').appendTo(c)} -$.fn.dataTable.Api.register("alphabetSearch()",function(b){this.iterator("table",function(c){c.alphabetSearch=b});return this});$.fn.dataTable.Api.register("alphabetSearch.recalc()",function(){this.iterator("table",function(b){f(new $.fn.dataTable.Api(b),$("div.alphabet",this.table().container()))});return this});$.fn.dataTable.ext.search.push(function(b,c){return!b.alphabetSearch||c[0].charAt(0)===b.alphabetSearch?!0:!1});$.fn.dataTable.AlphabetSearch=function(b){var c=new $.fn.dataTable.Api(b), -a=$('
');f(c,a);a.on("click","span",function(){a.find(".active").removeClass("active");$(this).addClass("active");c.alphabetSearch($(this).data("letter")).draw()});a.on("mouseenter","span",function(){a.find("div.alphabetInfo").css({opacity:1,left:$(this).position().left,width:$(this).width()}).html($(this).data("match-count"))}).on("mouseleave","span",function(){a.find("div.alphabetInfo").css("opacity",0)});this.node=function(){return a}};$.fn.DataTable.AlphabetSearch=$.fn.dataTable.AlphabetSearch; -$.fn.dataTable.ext.feature.push({fnInit:function(b){return(new $.fn.dataTable.AlphabetSearch(b)).node()},cFeature:"A"})})(); +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,d,b){a instanceof String&&(a=String(a));for(var c=a.length,e=0;e/g,"").charAt(0).toUpperCase();a[f]?a[f]++:a[f]=1}$('').data("letter","").data("match-count",c.length).html("None").appendTo(b);for(c=0;26>c;c++)f=String.fromCharCode(65+c),$("").data("letter",f).data("match-count",a[f]||0).addClass(a[f]?"":"empty").html(f).appendTo(b);$('
').appendTo(b)} +$.fn.dataTable.Api.register("alphabetSearch()",function(a){this.iterator("table",function(b){b.alphabetSearch=a});return this});$.fn.dataTable.Api.register("alphabetSearch.recalc()",function(d){this.iterator("table",function(b){a(new $.fn.dataTable.Api(b),$("div.alphabet",this.table().container()))});return this});$.fn.dataTable.ext.search.push(function(a,b){return a.alphabetSearch&&b[0].charAt(0)!==a.alphabetSearch?!1:!0});$.fn.dataTable.AlphabetSearch=function(d){var b=new $.fn.dataTable.Api(d), +c=$('
');a(b,c);c.on("click","span",function(){c.find(".active").removeClass("active");$(this).addClass("active");b.alphabetSearch($(this).data("letter")).draw()});c.on("mouseenter","span",function(){c.find("div.alphabetInfo").css({opacity:1,left:$(this).position().left,width:$(this).width()}).html($(this).data("match-count"))}).on("mouseleave","span",function(){c.find("div.alphabetInfo").css("opacity",0)});this.node=function(){return c}};$.fn.DataTable.AlphabetSearch=$.fn.dataTable.AlphabetSearch; +$.fn.dataTable.ext.feature.push({fnInit:function(a){return(new $.fn.dataTable.AlphabetSearch(a)).node()},cFeature:"A"})})(); diff --git a/features/lengthLinks/dataTables.lengthLinks.min.js b/features/lengthLinks/dataTables.lengthLinks.min.js index e070c5f..94087a2 100644 --- a/features/lengthLinks/dataTables.lengthLinks.min.js +++ b/features/lengthLinks/dataTables.lengthLinks.min.js @@ -1,6 +1,25 @@ /*! + Copyright 2014 SpryMedia Ltd. + + License MIT - http://datatables.net/license/mit + + This feature plug-in for DataTables adds page length control links to the + DataTable. The `dom` option can be used to insert the control using the `L` + character option and it uses the `lengthMenu` options of DataTables to + determine what to display. + + @example + $('#myTable').DataTable( { + dom: 'Lfrtip' + } ); + + @example + $('#myTable').DataTable( { + lengthMenu: [ [10, 25, 50, -1], [10, 25, 50, "All"] ] + dom: 'Lfrtip' + } ); Page length control via links for DataTables 2014 SpryMedia Ltd - datatables.net/license */ -(function(i,j,a){a.fn.dataTable.LengthLinks=function(d){var c=new a.fn.dataTable.Api(d),f=c.settings()[0],e=a("
").addClass(f.oClasses.sLength),h=null;this.container=function(){return e[0]};e.on("click.dtll","a",function(b){b.preventDefault();c.page.len(1*a(this).data("length")).draw(!1)});c.on("draw",function(){if(c.page.len()!==h){var b=f.aLengthMenu,d=2===b.length&&a.isArray(b[0])?b[1]:b,g=2===b.length&&a.isArray(b[0])?b[0]:b,b=a.map(g,function(b,a){return b==c.page.len()?'
").addClass(f.oClasses.sLength),h=null;this.container=function(){return e[0]};e.on("click.dtll","a",function(b){b.preventDefault();c.page.len(1*a(this).data("length")).draw(!1)});c.on("draw",function(){if(c.page.len()!==h){var b=f.aLengthMenu,d=2===b.length&&a.isArray(b[0])?b[1]:b,g=2===b.length&&a.isArray(b[0])?b[0]:b,b=a.map(g,function(b,a){return b==c.page.len()?''+d[a]+"":''+d[a]+""});e.html(f.oLanguage.sLengthMenu.replace("_MENU_",b.join(" | ")));h=c.page.len()}});c.on("destroy",function(){e.off("click.dtll","a")})};a.fn.dataTable.ext.feature.push({fnInit:function(d){return(new a.fn.dataTable.LengthLinks(d)).container()},cFeature:"L",sFeature:"LengthLinks"})})(window,document,jQuery); diff --git a/features/pageResize/dataTables.pageResize.min.js b/features/pageResize/dataTables.pageResize.min.js index d5b0c35..08ccd3d 100644 --- a/features/pageResize/dataTables.pageResize.min.js +++ b/features/pageResize/dataTables.pageResize.min.js @@ -1,7 +1,30 @@ /*! + Copyright 2015 SpryMedia Ltd. + + License MIT - http://datatables.net/license/mit + + This feature plug-in for DataTables will automatically change the DataTables + page length in order to fit inside its container. This can be particularly + useful for control panels and other interfaces which resize dynamically with + the user's browser window instead of scrolling. + + Page resizing in DataTables can be enabled by using any one of the following + options: + + * Adding the class `pageResize` to the HTML table + * Setting the `pageResize` parameter in the DataTables initialisation to + be true - i.e. `pageResize: true` + * Setting the `pageResize` parameter to be true in the DataTables + defaults (thus causing all tables to have this feature) - i.e. + `$.fn.dataTable.defaults.pageResize = true`. + * Creating a new instance: `new $.fn.dataTable.PageResize( table );` where + `table` is a DataTable's API instance. + + For more detailed information please see: + http://datatables.net/blog/2015-04-10 PageResize for DataTables v1.0.0 2015 SpryMedia Ltd - datatables.net/license */ (function(c){var d=function(a){var b=a.table();this.s={dt:a,host:c(b.container()).parent(),header:c(b.header()),footer:c(b.footer()),body:c(b.body()),container:c(b.container()),table:c(b.node())};a=this.s.host;"static"===a.css("position")&&a.css("position","relative");this._attach();this._size()};d.prototype={_size:function(){var a=this.s,b=a.dt,f=b.table(),g=c(a.table).offset().top,d=c("tr",a.body).eq(0).height(),e=a.host.height();f.header().parentNode===f.body().parentNode&&(e-=a.header.height(), -e-=a.footer.height());e=e-g-(a.container.height()-(g+a.table.height()));a=Math.floor(e/d);Infinity!==a&&(-Infinity!==a&&!isNaN(a)&&0").css({position:"absolute",top:0,left:0,height:"100%",width:"100%",zIndex:-1}).attr("type","text/html");b[0].onload=function(){var b=this.contentDocument.body,c=b.offsetHeight;this.contentDocument.defaultView.onresize=function(){var d=b.clientHeight||b.offsetHeight;d!==c&&(c=d,a._size())}}; -b.appendTo(this.s.host).attr("data","about:blank")}};c.fn.dataTable.PageResize=d;c.fn.DataTable.PageResize=d;c(document).on("init.dt",function(a,b){if("dt"===a.namespace){var f=new c.fn.dataTable.Api(b);(c(f.table().node()).hasClass("pageResize")||b.oInit.pageResize||c.fn.dataTable.defaults.pageResize)&&new d(f)}})})(jQuery); +e-=a.footer.height());e=e-g-(a.container.height()-(g+a.table.height()));a=Math.floor(e/d);Infinity!==a&&-Infinity!==a&&!isNaN(a)&&0").css({position:"absolute",top:0,left:0,height:"100%",width:"100%",zIndex:-1}).attr("type","text/html");b[0].onload=function(){var b=this.contentDocument.body,c=b.offsetHeight;this.contentDocument.defaultView.onresize=function(){var d=b.clientHeight||b.offsetHeight;d!==c&&(c=d,a._size())}}; +b.appendTo(this.s.host).attr("data","about:blank")}};c.fn.dataTable.PageResize=d;c.fn.DataTable.PageResize=d;c(document).on("init.dt",function(a,b){"dt"===a.namespace&&(a=new c.fn.dataTable.Api(b),(c(a.table().node()).hasClass("pageResize")||b.oInit.pageResize||c.fn.dataTable.defaults.pageResize)&&new d(a))})})(jQuery); diff --git a/integration/bootstrap/2/dataTables.bootstrap.min.js b/integration/bootstrap/2/dataTables.bootstrap.min.js index 4e5480d..0043ec4 100644 --- a/integration/bootstrap/2/dataTables.bootstrap.min.js +++ b/integration/bootstrap/2/dataTables.bootstrap.min.js @@ -2,7 +2,10 @@ DataTables Bootstrap 2 integration ©2011-2014 SpryMedia Ltd - datatables.net/license */ -(function(t,u,c,b){c.extend(!0,b.defaults,{dom:"<'row-fluid'<'span6'l><'span6'f>r><'row-fluid'<'span12't>><'row-fluid'<'span6'i><'span6'p>>",renderer:"bootstrap"});c.extend(b.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap"});b.ext.renderer.pageButton.bootstrap=function(f,j,p,q,g,k){var r=new b.Api(f),s=f.oClasses,h=f.oLanguage.oPaginate,d,e,o=function(b,l){var i,m,n,a,j=function(a){a.preventDefault();c(a.currentTarget).hasClass("disabled")||r.page(a.data.action).draw(!1)};i=0; -for(m=l.length;i",{"class":s.sPageButton+" "+e,"aria-controls":f.sTableId,tabindex:f.iTabIndex,id:0===p&&"string"===typeof a? -f.sTableId+"_"+a:null}).append(c("",{href:"#"}).html(d)).appendTo(b),f.oApi._fnBindAction(n,{action:a},j))}};o(c(j).empty().html('').find("ul"),q)};b.TableTools&&(c.extend(!0,b.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info modal"},select:{row:"active"}}),c.extend(!0,b.TableTools.DEFAULTS.oTags,{collection:{container:"ul", -button:"li",liner:"a"}}))})(window,document,jQuery,jQuery.fn.dataTable); +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,d,b){a instanceof String&&(a=String(a));for(var c=a.length,e=0;e<'span6'f>r><'row-fluid'<'span12't>><'row-fluid'<'span6'i><'span6'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap"});c.ext.renderer.pageButton.bootstrap=function(a,d,e,n,k,q){var l=new c.Api(a),u=a.oClasses,m=a.oLanguage.oPaginate,g,h,t=function(c,d){var r,n=function(a){a.preventDefault();b(a.currentTarget).hasClass("disabled")||l.page(a.data.action).draw(!1)};var p=0; +for(r=d.length;p",{"class":u.sPageButton+" "+h,"aria-controls":a.sTableId,tabindex:a.iTabIndex,id:0===e&&"string"=== +typeof f?a.sTableId+"_"+f:null}).append(b("",{href:"#"}).html(g)).appendTo(c);a.oApi._fnBindAction(v,{action:f},n)}}}};t(b(d).empty().html('').find("ul"),n)};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info modal"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags, +{collection:{container:"ul",button:"li",liner:"a"}}))})(window,document,jQuery,jQuery.fn.dataTable); diff --git a/integration/bootstrap/3/dataTables.bootstrap.min.js b/integration/bootstrap/3/dataTables.bootstrap.min.js index 85f7d06..3079875 100644 --- a/integration/bootstrap/3/dataTables.bootstrap.min.js +++ b/integration/bootstrap/3/dataTables.bootstrap.min.js @@ -2,7 +2,10 @@ DataTables Bootstrap 3 integration ©2011-2014 SpryMedia Ltd - datatables.net/license */ -(function(l,q){var e=function(b,c){b.extend(!0,c.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,e,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,d,f,n=0,p=function(c,e){var k,h,o,a,l=function(a){a.preventDefault(); -b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k",{"class":u.sPageButton+" "+ -f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('