From acf8945260bbe2b37cf1c0eace0746876bd19576 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Fri, 2 Dec 2016 18:00:17 +0000 Subject: [PATCH] Fix: If the paging active element was index 0, it wouldn't be refocused --- .datatables-commit-sync | 2 +- media/js/dataTables.material.js | 2 +- media/js/dataTables.material.min.js | 6 +- media/js/dataTables.semanticui.js | 2 +- media/js/dataTables.semanticui.min.js | 8 +- media/js/jquery.dataTables.js | 2 +- media/js/jquery.dataTables.min.js | 134 +++++++++++++------------- 7 files changed, 78 insertions(+), 78 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 7a1d3735..46f3e39e 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -080a909f808829d6cf8e05e3d3eccff2e6080e53 +7167c7e82ec46c3c57f5f904427f2a46a714649d diff --git a/media/js/dataTables.material.js b/media/js/dataTables.material.js index 93d62aaa..ffdaf123 100644 --- a/media/js/dataTables.material.js +++ b/media/js/dataTables.material.js @@ -181,7 +181,7 @@ DataTable.ext.renderer.pageButton.material = function ( settings, host, idx, but buttons ); - if ( activeEl ) { + if ( activeEl !== undefined ) { $(host).find( '[data-dt-idx='+activeEl+']' ).focus(); } }; diff --git a/media/js/dataTables.material.min.js b/media/js/dataTables.material.min.js index 480094f7..bafd12e6 100644 --- a/media/js/dataTables.material.min.js +++ b/media/js/dataTables.material.min.js @@ -2,7 +2,7 @@ DataTables Bootstrap 3 integration ©2011-2015 SpryMedia Ltd - datatables.net/license */ -(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return c(d,a,a.document)}:c(jQuery,window,document)})(function(c,a,d){var g=c.fn.dataTable;c.extend(!0,g.defaults,{dom:"<'mdl-grid'<'mdl-cell mdl-cell--6-col'l><'mdl-cell mdl-cell--6-col'f>><'mdl-grid dt-table'<'mdl-cell mdl-cell--12-col'tr>><'mdl-grid'<'mdl-cell mdl-cell--4-col'i><'mdl-cell mdl-cell--8-col'p>>", -renderer:"material"});c.extend(g.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-material",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});g.ext.renderer.pageButton.material=function(a,h,r,s,i,n){var o=new g.Api(a),l=a.oLanguage.oPaginate,t=a.oLanguage.oAria.paginate||{},f,e,p=0,q=function(d,g){var m,h,j,b,k=function(a){a.preventDefault();!c(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&& +(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return c(d,a,a.document)}:c(jQuery,window,document)})(function(c,a,d,r){var g=c.fn.dataTable;c.extend(!0,g.defaults,{dom:"<'mdl-grid'<'mdl-cell mdl-cell--6-col'l><'mdl-cell mdl-cell--6-col'f>><'mdl-grid dt-table'<'mdl-cell mdl-cell--12-col'tr>><'mdl-grid'<'mdl-cell mdl-cell--4-col'i><'mdl-cell mdl-cell--8-col'p>>", +renderer:"material"});c.extend(g.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-material",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});g.ext.renderer.pageButton.material=function(a,h,s,t,i,n){var o=new g.Api(a),l=a.oLanguage.oPaginate,u=a.oLanguage.oAria.paginate||{},f,e,p=0,q=function(d,g){var m,h,j,b,k=function(a){a.preventDefault();!c(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&& o.page(a.data.action).draw("page")};m=0;for(h=g.length;m",{"class":"mdl-button "+ -e,id:0===r&&"string"===typeof b?a.sTableId+"_"+b:null,"aria-controls":a.sTableId,"aria-label":t[b],"data-dt-idx":p,tabindex:a.iTabIndex,disabled:-1!==e.indexOf("disabled")}).html(f).appendTo(d),a.oApi._fnBindAction(j,{action:b},k),p++)}},k;try{k=c(h).find(d.activeElement).data("dt-idx")}catch(u){}q(c(h).empty().html('