mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-19 12:52:11 +01:00
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.
This commit is contained in:
parent
3de8e7c3fe
commit
f817194a09
@ -1 +1 @@
|
||||
be9f7a69cbe6d97c687a9f70f0f9ff8e370acd9c
|
||||
267a44d186cc8fc163f10c07e86707ff88362cee
|
||||
|
4
media/js/jquery.dataTables.js
vendored
4
media/js/jquery.dataTables.js
vendored
@ -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 = $('<a>', {
|
||||
'class': classes.sPageButton+' '+btnClass,
|
||||
'aria-controls': settings.sTableId,
|
||||
|
4
media/js/jquery.dataTables.min.js
vendored
4
media/js/jquery.dataTables.min.js
vendored
@ -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<r;p++){t=e[p];if(h.isArray(t)){s=h("<"+(t.DT_el||"div")+"/>").appendTo(b);m(s,t)}else{k=i="";switch(t){case "ellipsis":b.append('<span class="ellipsis">…</span>');
|
||||
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<f-1?"":" "+g.sPageButtonDisabled);break;case "last":i=j.sLast;k=t+(d<f-1?"":" "+g.sPageButtonDisabled);break;default:i=t+1;k=d===t?g.sPageButtonActive:""}if(i){s=h("<a>",{"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<r;p++){t=e[p];if(h.isArray(t)){s=h("<"+(t.DT_el||"div")+"/>").appendTo(b);m(s,t)}else{i=null;k="";switch(t){case "ellipsis":b.append('<span class="ellipsis">…</span>');
|
||||
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<f-1?"":" "+g.sPageButtonDisabled);break;case "last":i=j.sLast;k=t+(d<f-1?"":" "+g.sPageButtonDisabled);break;default:i=t+1;k=d===t?g.sPageButtonActive:""}if(i!==null){s=h("<a>",{"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 a<b?-1:a>b?1:0},"string-desc":function(a,b){return a<b?1:a>b?-1:0}});eb("");h.extend(!0,m.ext.renderer,{header:{_:function(a,b,c,e){h(a.nTable).on("order.dt.DT",function(d,
|
||||
|
Loading…
x
Reference in New Issue
Block a user