diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 9ee7b537..cd4d37d5 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -72b39fd7af8300fe09cbaf2a5f8e41956b15ff16 +d96de43a9cd4c3a752929d238833004cd8210d9e diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 9222c7d5..f7965afc 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -14194,20 +14194,22 @@ // IE9 throws an 'unknown error' if document.activeElement is used // inside an iframe or frame. Try / catch the error. Not good for // accessibility, but neither are frames. + var activeEl; + try { // Because this approach is destroying and recreating the paging // elements, focus is lost on the select button which is bad for // accessibility. So we want to restore focus once the draw has // completed - var activeEl = $(document.activeElement).data('dt-idx'); - - attach( $(host).empty(), buttons ); - - if ( activeEl !== null ) { - $(host).find( '[data-dt-idx='+activeEl+']' ).focus(); - } + activeEl = $(document.activeElement).data('dt-idx'); } catch (e) {} + + attach( $(host).empty(), buttons ); + + if ( activeEl ) { + $(host).find( '[data-dt-idx='+activeEl+']' ).focus(); + } } } } ); diff --git a/media/js/jquery.dataTables.min.js b/media/js/jquery.dataTables.min.js index 7dd84fbb..09d3059a 100644 --- a/media/js/jquery.dataTables.min.js +++ b/media/js/jquery.dataTables.min.js @@ -146,7 +146,7 @@ g.extend(p.ext.oJUIClasses,p.ext.classes,{sPageButton:"fg-button ui-button "+F,s sSortJUI:ja+"carat-2-n-s",sSortJUIAscAllowed:ja+"carat-1-n",sSortJUIDescAllowed:ja+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+F,sScrollFoot:"dataTables_scrollFoot "+F,sHeaderTH:F,sFooterTH:F,sJUIHeader:Xb+" ui-corner-tl ui-corner-tr",sJUIFooter:Xb+" ui-corner-bl ui-corner-br"});var Mb=p.ext.pager;g.extend(Mb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},simple_numbers:function(a, b){return["previous",Wa(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Wa(a,b),"next","last"]},_numbers:Wa,numbers_length:7});g.extend(!0,p.ext.renderer,{pageButton:{_:function(a,b,c,e,d,f){var h=a.oClasses,i=a.oLanguage.oPaginate,j,l,k=0,n=function(b,e){var m,o,p,r,s=function(b){Ta(a,b.data.action,true)};m=0;for(o=e.length;m").appendTo(b);n(p,r)}else{l=j="";switch(r){case "ellipsis":b.append(""); break;case "first":j=i.sFirst;l=r+(d>0?"":" "+h.sPageButtonDisabled);break;case "previous":j=i.sPrevious;l=r+(d>0?"":" "+h.sPageButtonDisabled);break;case "next":j=i.sNext;l=r+(d",{"class":h.sPageButton+" "+l,"aria-controls":a.sTableId,"data-dt-idx":k,tabindex:a.iTabIndex,id:c===0&&typeof r==="string"?a.sTableId+"_"+r:null}).html(j).appendTo(b); -Va(p,{action:r},s);k++}}}};try{var o=g(Q.activeElement).data("dt-idx");n(g(b).empty(),e);o!==null&&g(b).find("[data-dt-idx="+o+"]").focus()}catch(m){}}}});g.extend(p.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&(!ac.test(a)||!bc.test(a)))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||I(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal; +Va(p,{action:r},s);k++}}}},o;try{o=g(Q.activeElement).data("dt-idx")}catch(m){}n(g(b).empty(),e);o&&g(b).find("[data-dt-idx="+o+"]").focus()}}});g.extend(p.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&(!ac.test(a)||!bc.test(a)))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||I(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal; return Rb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c,!0)?"html-num-fmt"+c:null},function(a){return I(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);g.extend(p.ext.type.search,{html:function(a){return I(a)?a:"string"===typeof a?a.replace(Ob," ").replace(Ba,""):""},string:function(a){return I(a)?a:"string"===typeof a?a.replace(Ob," "):a}});var Aa=function(a,b,c,e){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Qb(a,b));a.replace&&(c&&(a=a.replace(c,"")), e&&(a=a.replace(e,"")));return 1*a};g.extend(x.type.order,{"date-pre":function(a){return Date.parse(a)||0},"html-pre":function(a){return I(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return I(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return ab?1:0},"string-desc":function(a,b){return ab?-1:0}});db("");g.extend(!0,p.ext.renderer,{header:{_:function(a,b,c,e){g(a.nTable).on("order.dt.DT",function(d, f,g,i){if(a===f){d=c.idx;b.removeClass(c.sSortingClass+" "+e.sSortAsc+" "+e.sSortDesc).addClass(i[d]=="asc"?e.sSortAsc:i[d]=="desc"?e.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,b,c,e){g("
").addClass(e.sSortJUIWrapper).append(b.contents()).append(g("").addClass(e.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);g(a.nTable).on("order.dt.DT",function(d,f,g,i){if(a===f){d=c.idx;b.removeClass(e.sSortAsc+" "+e.sSortDesc).addClass(i[d]=="asc"?e.sSortAsc:i[d]=="desc"?e.sSortDesc:c.sSortingClass);