mirror of
https://github.com/DataTables/DataTables.git
synced 2024-11-29 11:24:10 +01:00
Fix docs: Add reference to dt-init columns.orderSequence
from dt-init order
This commit is contained in:
parent
e0f2cfd81e
commit
294a32f8d0
@ -1 +1 @@
|
||||
b2fe50f23d5f1f68256dfd831ed82f3cc7b24b0a
|
||||
3c9c817646eb9ffb39d92055d975aa224a9fc023
|
||||
|
@ -40,6 +40,10 @@ $(document).ready( function () {
|
||||
var ajaxTab = $('ul.tabs li').eq(3).css('display', 'none');
|
||||
|
||||
$(document).on( 'init.dt', function ( e, settings ) {
|
||||
if ( e.namespace !== 'dt' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var api = new $.fn.dataTable.Api( settings );
|
||||
|
||||
var show = function ( str ) {
|
||||
@ -74,6 +78,10 @@ $(document).ready( function () {
|
||||
var phpTab = $('ul.tabs li').eq(4).css('display', 'none');
|
||||
|
||||
$(document).on( 'init.dt.demoSSP', function ( e, settings ) {
|
||||
if ( e.namespace !== 'dt' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( settings.oFeatures.bServerSide ) {
|
||||
if ( $.isFunction( settings.ajax ) ) {
|
||||
return;
|
||||
|
1
media/js/jquery.dataTables.js
vendored
1
media/js/jquery.dataTables.js
vendored
@ -1746,6 +1746,7 @@
|
||||
|
||||
if ( data.DT_RowData ) {
|
||||
$(tr).data( data.DT_RowData );
|
||||
console.log( tr );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
4
media/js/jquery.dataTables.min.js
vendored
4
media/js/jquery.dataTables.min.js
vendored
@ -19,8 +19,8 @@ f=d.slice();f.splice(0,j+1);h=f.join(".");i=0;for(g=e.length;i<g;i++)f={},b(f,e[
|
||||
f;d++)a[d]==b?e=d:a[d]>b&&a[d]--; -1!=e&&c===k&&a.splice(e,1)}function ca(a,b,c,e){var d=a.aoData[b],f,h=function(c,f){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=y(a,b,f,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===d.src)d._aData=na(a,d,e,e===k?k:d._aData).data;else{var i=d.anCells;if(i)if(e!==k)h(i[e],e);else{c=0;for(f=i.length;c<f;c++)h(i[c],c)}}d._aSortData=null;d._aFilterData=null;h=a.aoColumns;if(e!==k)h[e].sType=null;else{c=0;for(f=h.length;c<f;c++)h[c].sType=null;
|
||||
Ma(d)}}function na(a,b,c,e){var d=[],f=b.firstChild,h,i=0,j,m=a.aoColumns,l=a._rowReadObject,e=e||l?{}:[],p=function(a,b){if("string"===typeof a){var c=a.indexOf("@");-1!==c&&(c=a.substring(c+1),Q(a)(e,b.getAttribute(c)))}},a=function(a){if(c===k||c===i)h=m[i],j=g.trim(a.innerHTML),h&&h._bAttrSrc?(Q(h.mData._)(e,j),p(h.mData.sort,a),p(h.mData.type,a),p(h.mData.filter,a)):l?(h._setter||(h._setter=Q(h.mData)),h._setter(e,j)):e[i]=j;i++};if(f)for(;f;){b=f.nodeName.toUpperCase();if("TD"==b||"TH"==b)a(f),
|
||||
d.push(f);f=f.nextSibling}else{d=b.anCells;f=0;for(b=d.length;f<b;f++)a(d[f])}return{data:e,cells:d}}function Ja(a,b,c,e){var d=a.aoData[b],f=d._aData,h=[],i,j,g,l,p;if(null===d.nTr){i=c||P.createElement("tr");d.nTr=i;d.anCells=h;i._DT_RowIndex=b;Ma(d);l=0;for(p=a.aoColumns.length;l<p;l++){g=a.aoColumns[l];j=c?e[l]:P.createElement(g.sCellType);h.push(j);if(!c||g.mRender||g.mData!==l)j.innerHTML=y(a,b,l,"display");g.sClass&&(j.className+=" "+g.sClass);g.bVisible&&!c?i.appendChild(j):!g.bVisible&&c&&
|
||||
j.parentNode.removeChild(j);g.fnCreatedCell&&g.fnCreatedCell.call(a.oInstance,j,y(a,b,l),f,b,l)}w(a,"aoRowCreatedCallback",null,[i,f,b])}d.nTr.setAttribute("role","row")}function Ma(a){var b=a.nTr,c=a._aData;if(b){c.DT_RowId&&(b.id=c.DT_RowId);if(c.DT_RowClass){var e=c.DT_RowClass.split(" ");a.__rowc=a.__rowc?Na(a.__rowc.concat(e)):e;g(b).removeClass(a.__rowc.join(" ")).addClass(c.DT_RowClass)}c.DT_RowAttr&&g(b).attr(c.DT_RowAttr);c.DT_RowData&&g(b).data(c.DT_RowData)}}function jb(a){var b,c,e,d,
|
||||
f,h=a.nTHead,i=a.nTFoot,j=0===g("th, td",h).length,m=a.oClasses,l=a.aoColumns;j&&(d=g("<tr/>").appendTo(h));b=0;for(c=l.length;b<c;b++)f=l[b],e=g(f.nTh).addClass(f.sClass),j&&e.appendTo(d),a.oFeatures.bSort&&(e.addClass(f.sSortingClass),!1!==f.bSortable&&(e.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),Oa(a,f.nTh,b))),f.sTitle!=e.html()&&e.html(f.sTitle),Pa(a,"header")(a,e,f,m);j&&da(a.aoHeader,h);g(h).find(">tr").attr("role","row");g(h).find(">tr>th, >tr>td").addClass(m.sHeaderTH);
|
||||
j.parentNode.removeChild(j);g.fnCreatedCell&&g.fnCreatedCell.call(a.oInstance,j,y(a,b,l),f,b,l)}w(a,"aoRowCreatedCallback",null,[i,f,b])}d.nTr.setAttribute("role","row")}function Ma(a){var b=a.nTr,c=a._aData;if(b){c.DT_RowId&&(b.id=c.DT_RowId);if(c.DT_RowClass){var e=c.DT_RowClass.split(" ");a.__rowc=a.__rowc?Na(a.__rowc.concat(e)):e;g(b).removeClass(a.__rowc.join(" ")).addClass(c.DT_RowClass)}c.DT_RowAttr&&g(b).attr(c.DT_RowAttr);c.DT_RowData&&(g(b).data(c.DT_RowData),console.log(b))}}function jb(a){var b,
|
||||
c,e,d,f,h=a.nTHead,i=a.nTFoot,j=0===g("th, td",h).length,m=a.oClasses,l=a.aoColumns;j&&(d=g("<tr/>").appendTo(h));b=0;for(c=l.length;b<c;b++)f=l[b],e=g(f.nTh).addClass(f.sClass),j&&e.appendTo(d),a.oFeatures.bSort&&(e.addClass(f.sSortingClass),!1!==f.bSortable&&(e.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),Oa(a,f.nTh,b))),f.sTitle!=e.html()&&e.html(f.sTitle),Pa(a,"header")(a,e,f,m);j&&da(a.aoHeader,h);g(h).find(">tr").attr("role","row");g(h).find(">tr>th, >tr>td").addClass(m.sHeaderTH);
|
||||
g(i).find(">tr>th, >tr>td").addClass(m.sFooterTH);if(null!==i){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&g(f.nTf).addClass(f.sClass)}}function ea(a,b,c){var e,d,f,h=[],i=[],j=a.aoColumns.length,m;if(b){c===k&&(c=!1);e=0;for(d=b.length;e<d;e++){h[e]=b[e].slice();h[e].nTr=b[e].nTr;for(f=j-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&h[e].splice(f,1);i.push([])}e=0;for(d=h.length;e<d;e++){if(a=h[e].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=h[e].length;f<b;f++)if(m=
|
||||
j=1,i[e][f]===k){a.appendChild(h[e][f].cell);for(i[e][f]=1;h[e+j]!==k&&h[e][f].cell==h[e+j][f].cell;)i[e+j][f]=1,j++;for(;h[e][f+m]!==k&&h[e][f].cell==h[e][f+m].cell;){for(c=0;c<j;c++)i[e+c][f+m]=1;m++}g(h[e][f].cell).attr("rowspan",j).attr("colspan",m)}}}}function M(a){var b=w(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==g.inArray(!1,b))C(a,!1);else{var b=[],c=0,e=a.asStripeClasses,d=e.length,f=a.oLanguage,h=a.iInitDisplayStart,i="ssp"==B(a),j=a.aiDisplay;a.bDrawing=!0;h!==k&&-1!==h&&(a._iDisplayStart=
|
||||
i?h:h>=a.fnRecordsDisplay()?0:h,a.iInitDisplayStart=-1);var h=a._iDisplayStart,m=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(i){if(!a.bDestroying&&!kb(a))return}else a.iDraw++;if(0!==j.length){f=i?a.aoData.length:m;for(i=i?0:h;i<f;i++){var l=j[i],p=a.aoData[l];null===p.nTr&&Ja(a,l);l=p.nTr;if(0!==d){var n=e[c%d];p._sRowStripe!=n&&(g(l).removeClass(p._sRowStripe).addClass(n),p._sRowStripe=n)}w(a,"aoRowCallback",null,[l,p._aData,c,i]);b.push(l);c++}}else c=f.sZeroRecords,
|
||||
|
Loading…
Reference in New Issue
Block a user