From f817194a09a0927620b7681a867d9fa788866cfc Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Sat, 30 May 2015 14:10:31 +0100 Subject: [PATCH] Fix: If the paging language options were set to be an empty string, the button wouldn't render. This is not correct as it doesn't allow CSS icons to be used rather than the strings. --- .datatables-commit-sync | 2 +- media/js/jquery.dataTables.js | 4 ++-- media/js/jquery.dataTables.min.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 6d36d66f..6d967537 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -be9f7a69cbe6d97c687a9f70f0f9ff8e370acd9c +267a44d186cc8fc163f10c07e86707ff88362cee diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index e44dc7b7..897eccd9 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -14240,7 +14240,7 @@ attach( inner, button ); } else { - btnDisplay = ''; + btnDisplay = null; btnClass = ''; switch ( button ) { @@ -14279,7 +14279,7 @@ break; } - if ( btnDisplay ) { + if ( btnDisplay !== null ) { node = $('', { 'class': classes.sPageButton+' '+btnClass, 'aria-controls': settings.sTableId, diff --git a/media/js/jquery.dataTables.min.js b/media/js/jquery.dataTables.min.js index cd414dc5..1f7d844c 100644 --- a/media/js/jquery.dataTables.min.js +++ b/media/js/jquery.dataTables.min.js @@ -147,8 +147,8 @@ sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sF sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Fa="",Fa="",F=Fa+"ui-state-default",ka=Fa+"css_right ui-icon ui-icon-",Yb=Fa+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";h.extend(m.ext.oJUIClasses, m.ext.classes,{sPageButton:"fg-button ui-button "+F,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:F+" sorting_asc",sSortDesc:F+" sorting_desc",sSortable:F+" sorting",sSortableAsc:F+" sorting_asc_disabled",sSortableDesc:F+" sorting_desc_disabled",sSortableNone:F+" sorting_disabled",sSortJUIAsc:ka+"triangle-1-n",sSortJUIDesc:ka+"triangle-1-s",sSortJUI:ka+"carat-2-n-s", sSortJUIAscAllowed:ka+"carat-1-n",sSortJUIDescAllowed:ka+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+F,sScrollFoot:"dataTables_scrollFoot "+F,sHeaderTH:F,sFooterTH:F,sJUIHeader:Yb+" ui-corner-tl ui-corner-tr",sJUIFooter:Yb+" ui-corner-bl ui-corner-br"});var Nb=m.ext.pager;h.extend(Nb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[Ba(a, -b)]},simple_numbers:function(a,b){return["previous",Ba(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Ba(a,b),"next","last"]},_numbers:Ba,numbers_length:7});h.extend(!0,m.ext.renderer,{pageButton:{_:function(a,b,c,e,d,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i,k,l=0,m=function(b,e){var p,r,s,t,u=function(b){Va(a,b.data.action,true)};p=0;for(r=e.length;p").appendTo(b);m(s,t)}else{k=i="";switch(t){case "ellipsis":b.append(''); -break;case "first":i=j.sFirst;k=t+(d>0?"":" "+g.sPageButtonDisabled);break;case "previous":i=j.sPrevious;k=t+(d>0?"":" "+g.sPageButtonDisabled);break;case "next":i=j.sNext;k=t+(d",{"class":g.sPageButton+" "+k,"aria-controls":a.sTableId,"data-dt-idx":l,tabindex:a.iTabIndex,id:c===0&&typeof t==="string"?a.sTableId+"_"+t:null}).html(i).appendTo(b); +b)]},simple_numbers:function(a,b){return["previous",Ba(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Ba(a,b),"next","last"]},_numbers:Ba,numbers_length:7});h.extend(!0,m.ext.renderer,{pageButton:{_:function(a,b,c,e,d,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i,k,l=0,m=function(b,e){var p,r,s,t,u=function(b){Va(a,b.data.action,true)};p=0;for(r=e.length;p").appendTo(b);m(s,t)}else{i=null;k="";switch(t){case "ellipsis":b.append(''); +break;case "first":i=j.sFirst;k=t+(d>0?"":" "+g.sPageButtonDisabled);break;case "previous":i=j.sPrevious;k=t+(d>0?"":" "+g.sPageButtonDisabled);break;case "next":i=j.sNext;k=t+(d",{"class":g.sPageButton+" "+k,"aria-controls":a.sTableId,"data-dt-idx":l,tabindex:a.iTabIndex,id:c===0&&typeof t==="string"?a.sTableId+"_"+t:null}).html(i).appendTo(b); Xa(s,{action:t},u);l++}}}},p;try{p=h(R.activeElement).data("dt-idx")}catch(s){}m(h(b).empty(),e);p&&h(b).find("[data-dt-idx="+p+"]").focus()}}});h.extend(m.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return $a(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&(!bc.test(a)||!cc.test(a)))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||J(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return $a(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal; return Sb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Sb(a,c,!0)?"html-num-fmt"+c:null},function(a){return J(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(m.ext.type.search,{html:function(a){return J(a)?a:"string"===typeof a?a.replace(Pb," ").replace(Da,""):""},string:function(a){return J(a)?a:"string"===typeof a?a.replace(Pb," "):a}});var Ca=function(a,b,c,e){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Rb(a,b));a.replace&&(c&&(a=a.replace(c,"")), e&&(a=a.replace(e,"")));return 1*a};h.extend(y.type.order,{"date-pre":function(a){return Date.parse(a)||0},"html-pre":function(a){return J(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return J(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}});eb("");h.extend(!0,m.ext.renderer,{header:{_:function(a,b,c,e){h(a.nTable).on("order.dt.DT",function(d,