1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-28 10:24:10 +01:00

Adding examples.php to include updated searchPanes terminology

This commit is contained in:
Allan Jardine 2019-10-01 13:28:43 +00:00
parent 2f73d16738
commit c077e590d3
3 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
12931741bafecd6a29dc92deb27d134b9d02decc
aee2db76e9b845a30d913e99c1aff007488ed986

View File

@ -4530,7 +4530,7 @@
}
if ( cellData.replace ) {
cellData = cellData.replace(/[\r\n\u2028]/g, '');
cellData = cellData.replace(/[\r\n]/g, '');
}
filterData.push( cellData );

View File

@ -56,8 +56,8 @@ c).val(f.sSearch).attr("placeholder",e.sSearchPlaceholder).on("keyup.DT search.D
p?!b.bEscapeRegex:b.bRegex};La(b);if("ssp"!=E(b)){Cb(b,c.sSearch,d,h(c),c.bSmart,c.bCaseInsensitive);k(c);for(c=0;c<f.length;c++)Db(b,f[c].sSearch,c,h(f[c]),f[c].bSmart,f[c].bCaseInsensitive);Eb(b)}else k(c);b.bFiltered=!0;B(b,null,"search",[b])}function Eb(b){for(var c=r.ext.search,d=b.aiDisplay,e,f,k=0,h=c.length;k<h;k++){for(var l=[],m=0,q=d.length;m<q;m++)f=d[m],e=b.aoData[f],c[k](b,e._aFilterData,f,e._aData,m)&&l.push(f);d.length=0;g.merge(d,l)}}function Db(b,c,d,e,f,k){if(""!==c){var h=[],l=
b.aiDisplay;e=Ua(c,e,f,k);for(f=0;f<l.length;f++)c=b.aoData[l[f]]._aFilterData[d],e.test(c)&&h.push(l[f]);b.aiDisplay=h}}function Cb(b,c,d,e,f,k){e=Ua(c,e,f,k);k=b.oPreviousSearch.sSearch;var h=b.aiDisplayMaster;f=[];0!==r.ext.search.length&&(d=!0);var l=Fb(b);if(0>=c.length)b.aiDisplay=h.slice();else{if(l||d||k.length>c.length||0!==c.indexOf(k)||b.bSorted)b.aiDisplay=h.slice();c=b.aiDisplay;for(d=0;d<c.length;d++)e.test(b.aoData[c[d]]._sFilterRow)&&f.push(c[d]);b.aiDisplay=f}}function Ua(b,c,d,e){b=
c?b:Va(b);d&&(b="^(?=.*?"+g.map(b.match(/"[^"]+"|[^ ]+/g)||[""],function(b){if('"'===b.charAt(0)){var c=b.match(/^"(.*)"$/);b=c?c[1]:b}return b.replace('"',"")}).join(")(?=.*?")+").*$");return new RegExp(b,e?"i":"")}function Fb(b){var c=b.aoColumns,d,e,f=r.ext.type.search;var k=!1;var h=0;for(d=b.aoData.length;h<d;h++){var l=b.aoData[h];if(!l._aFilterData){var g=[];var q=0;for(e=c.length;q<e;q++){k=c[q];if(k.bSearchable){var n=J(b,h,q,"filter");f[k.sType]&&(n=f[k.sType](n));null===n&&(n="");"string"!==
typeof n&&n.toString&&(n=n.toString())}else n="";n.indexOf&&-1!==n.indexOf("&")&&(za.innerHTML=n,n=ac?za.textContent:za.innerText);n.replace&&(n=n.replace(/[\r\n\u2028]/g,""));g.push(n)}l._aFilterData=g;l._sFilterRow=g.join(" ");k=!0}}return k}function Gb(b){return{search:b.sSearch,smart:b.bSmart,regex:b.bRegex,caseInsensitive:b.bCaseInsensitive}}function Hb(b){return{sSearch:b.search,bSmart:b.smart,bRegex:b.regex,bCaseInsensitive:b.caseInsensitive}}function yb(b){var c=b.sTableId,d=b.aanFeatures.i,
e=g("<div/>",{"class":b.oClasses.sInfo,id:d?null:c+"_info"});d||(b.aoDrawCallback.push({fn:Ib,sName:"information"}),e.attr("role","status").attr("aria-live","polite"),g(b.nTable).attr("aria-describedby",c+"_info"));return e[0]}function Ib(b){var c=b.aanFeatures.i;if(0!==c.length){var d=b.oLanguage,e=b._iDisplayStart+1,f=b.fnDisplayEnd(),k=b.fnRecordsTotal(),h=b.fnRecordsDisplay(),l=h?d.sInfo:d.sInfoEmpty;h!==k&&(l+=" "+d.sInfoFiltered);l+=d.sInfoPostFix;l=Jb(b,l);d=d.fnInfoCallback;null!==d&&(l=d.call(b.oInstance,
typeof n&&n.toString&&(n=n.toString())}else n="";n.indexOf&&-1!==n.indexOf("&")&&(za.innerHTML=n,n=ac?za.textContent:za.innerText);n.replace&&(n=n.replace(/[\r\n]/g,""));g.push(n)}l._aFilterData=g;l._sFilterRow=g.join(" ");k=!0}}return k}function Gb(b){return{search:b.sSearch,smart:b.bSmart,regex:b.bRegex,caseInsensitive:b.bCaseInsensitive}}function Hb(b){return{sSearch:b.search,bSmart:b.smart,bRegex:b.regex,bCaseInsensitive:b.caseInsensitive}}function yb(b){var c=b.sTableId,d=b.aanFeatures.i,e=
g("<div/>",{"class":b.oClasses.sInfo,id:d?null:c+"_info"});d||(b.aoDrawCallback.push({fn:Ib,sName:"information"}),e.attr("role","status").attr("aria-live","polite"),g(b.nTable).attr("aria-describedby",c+"_info"));return e[0]}function Ib(b){var c=b.aanFeatures.i;if(0!==c.length){var d=b.oLanguage,e=b._iDisplayStart+1,f=b.fnDisplayEnd(),k=b.fnRecordsTotal(),h=b.fnRecordsDisplay(),l=h?d.sInfo:d.sInfoEmpty;h!==k&&(l+=" "+d.sInfoFiltered);l+=d.sInfoPostFix;l=Jb(b,l);d=d.fnInfoCallback;null!==d&&(l=d.call(b.oInstance,
b,e,f,k,h,l));g(c).html(l)}}function Jb(b,c){var d=b.fnFormatNumber,e=b._iDisplayStart+1,f=b._iDisplayLength,k=b.fnRecordsDisplay(),h=-1===f;return c.replace(/_START_/g,d.call(b,e)).replace(/_END_/g,d.call(b,b.fnDisplayEnd())).replace(/_MAX_/g,d.call(b,b.fnRecordsTotal())).replace(/_TOTAL_/g,d.call(b,k)).replace(/_PAGE_/g,d.call(b,h?1:Math.ceil(e/f))).replace(/_PAGES_/g,d.call(b,h?1:Math.ceil(k/f)))}function ka(b){var c=b.iInitDisplayStart,d=b.aoColumns;var e=b.oFeatures;var f=b.bDeferLoading;if(b.bInitialised){tb(b);
qb(b);ia(b,b.aoHeader);ia(b,b.aoFooter);L(b,!0);e.bAutoWidth&&Ka(b);var k=0;for(e=d.length;k<e;k++){var h=d[k];h.sWidth&&(h.nTh.style.width=C(h.sWidth))}B(b,null,"preInit",[b]);W(b);d=E(b);if("ssp"!=d||f)"ajax"==d?wa(b,[],function(d){var e=xa(b,d);for(k=0;k<e.length;k++)S(b,e[k]);b.iInitDisplayStart=c;W(b);L(b,!1);ya(b,d)},b):(L(b,!1),ya(b))}else setTimeout(function(){ka(b)},200)}function ya(b,c){b._bInitComplete=!0;(c||b.oInit.aaData)&&ba(b);B(b,null,"plugin-init",[b,c]);B(b,"aoInitComplete","init",
[b,c])}function Wa(b,c){c=parseInt(c,10);b._iDisplayLength=c;Xa(b);B(b,null,"length",[b,c])}function ub(b){var c=b.oClasses,d=b.sTableId,e=b.aLengthMenu,f=g.isArray(e[0]),k=f?e[0]:e;e=f?e[1]:e;f=g("<select/>",{name:d+"_length","aria-controls":d,"class":c.sLengthSelect});for(var h=0,l=k.length;h<l;h++)f[0][h]=new Option("number"===typeof e[h]?b.fnFormatNumber(e[h]):e[h],k[h]);var m=g("<div><label/></div>").addClass(c.sLength);b.aanFeatures.l||(m[0].id=d+"_length");m.children().append(b.oLanguage.sLengthMenu.replace("_MENU_",