From 91a900a243faf44320fc093c5170eab8810b2d80 Mon Sep 17 00:00:00 2001 From: dtbuild Date: Fri, 12 Apr 2024 09:10:24 +0000 Subject: [PATCH] e6d8d07eae31b778522785b4dd5699aaa1e2d1da Dev: Add a `data-dt-column` attribute to the `colgroup>col` elements This can be useful for debugging, but isn't actually used for anything more than that at the moment. Sync to source repo @e6d8d07eae31b778522785b4dd5699aaa1e2d1da --- datatables.json | 2 +- js/dataTables.js | 2 +- js/dataTables.min.js | 2 +- js/dataTables.min.mjs | 2 +- js/dataTables.mjs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/datatables.json b/datatables.json index 6cafe2f..f8ead8a 100644 --- a/datatables.json +++ b/datatables.json @@ -11,5 +11,5 @@ ], "src-repo": "http://github.com/DataTables/DataTablesSrc", "last-tag": "2.0.3", - "last-sync": "2a5b9b9791b7711947ef823455e580c9c96f3816" + "last-sync": "e6d8d07eae31b778522785b4dd5699aaa1e2d1da" } \ No newline at end of file diff --git a/js/dataTables.js b/js/dataTables.js index b84d84b..0bb1f5f 100644 --- a/js/dataTables.js +++ b/js/dataTables.js @@ -2017,7 +2017,7 @@ "mData": oDefaults.mData ? oDefaults.mData : iCol, idx: iCol, searchFixed: {}, - colEl: $('') + colEl: $('').attr('data-dt-column', iCol) } ); oSettings.aoColumns.push( oCol ); diff --git a/js/dataTables.min.js b/js/dataTables.min.js index 1f9d405..b057cc6 100644 --- a/js/dataTables.min.js +++ b/js/dataTables.min.js @@ -1,4 +1,4 @@ /*! DataTables 2.0.3 * © SpryMedia Ltd - datatables.net/license */ -!function(n){"use strict";var a;"function"==typeof define&&define.amd?define(["jquery"],function(t){return n(t,window,document)}):"object"==typeof exports?(a=require("jquery"),"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||a(t),n(e,t,t.document)}:module.exports=n(a,window,window.document)):window.DataTable=n(jQuery,window,document)}(function(V,q,_){"use strict";function g(t){var e=parseInt(t,10);return!isNaN(e)&&isFinite(t)?e:null}function o(t,e,n){var a=typeof t,r="string"==a;return"number"==a||"bigint"==a||!!y(t)||(e&&r&&(t=R(t,e)),n&&r&&(t=t.replace(P,"")),!isNaN(parseFloat(t))&&isFinite(t))}function l(t,e,n){var a;return!!y(t)||("string"!=typeof t||!t.match(/<(input|select)/i))&&(y(a=t)||"string"==typeof a)&&!!o(I(t),e,n)||null}function v(t,e,n,a){var r=[],o=0,i=e.length;if(void 0!==a)for(;o").prependTo(this),fastData:function(t,e,n){return G(u,t,e,n)}}),t=(u.nTable=this,u.oInit=n,i.push(u),u.api=new U(u),u.oInstance=1===W.length?W:o.dataTable(),nt(n),n.aLengthMenu&&!n.iDisplayLength&&(n.iDisplayLength=Array.isArray(n.aLengthMenu[0])?n.aLengthMenu[0][0]:V.isPlainObject(n.aLengthMenu[0])?n.aLengthMenu[0].value:n.aLengthMenu[0]),n=Zt(V.extend(!0,{},e),n),Q(u.oFeatures,n,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),Q(u,n,["ajax","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","iStateDuration","bSortCellsTop","iTabIndex","sDom","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId","caption","layout",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),Q(u.oScroll,n,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),Q(u.oLanguage,n,"fnInfoCallback"),K(u,"aoDrawCallback",n.fnDrawCallback),K(u,"aoStateSaveParams",n.fnStateSaveParams),K(u,"aoStateLoadParams",n.fnStateLoadParams),K(u,"aoStateLoaded",n.fnStateLoaded),K(u,"aoRowCallback",n.fnRowCallback),K(u,"aoRowCreatedCallback",n.fnCreatedRow),K(u,"aoHeaderCallback",n.fnHeaderCallback),K(u,"aoFooterCallback",n.fnFooterCallback),K(u,"aoInitComplete",n.fnInitComplete),K(u,"aoPreDrawCallback",n.fnPreDrawCallback),u.rowIdFn=J(n.rowId),u),c=($.__browser||(P={},$.__browser=P,j=V("
").css({position:"fixed",top:0,left:-1*q.pageXOffset,height:1,width:1,overflow:"hidden"}).append(V("
").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(V("
").css({width:"100%",height:10}))).appendTo("body"),p=j.children(),O=p.children(),P.barWidth=p[0].offsetWidth-p[0].clientWidth,P.bScrollbarLeft=1!==Math.round(O.offset().left),j.remove()),V.extend(t.oBrowser,$.__browser),t.oScroll.iBarWidth=$.__browser.barWidth,u.oClasses),d=(V.extend(c,$.ext.classes,n.oClasses),o.addClass(c.table),u.oFeatures.bPaginate||(n.iDisplayStart=0),void 0===u.iInitDisplayStart&&(u.iInitDisplayStart=n.iDisplayStart,u._iDisplayStart=n.iDisplayStart),u.oLanguage),f=(V.extend(!0,d,n.oLanguage),d.sUrl?(V.ajax({dataType:"json",url:d.sUrl,success:function(t){z(e.oLanguage,t),V.extend(!0,d,t,u.oInit.oLanguage),tt(u,null,"i18n",[u],!0),Et(u)},error:function(){Z(u,0,"i18n file loading error",21),Et(u)}}),r=!0):tt(u,null,"i18n",[u]),[]),h=this.getElementsByTagName("thead"),p=It(u,h[0]);if(n.aoColumns)f=n.aoColumns;else if(p.length)for(l=p[a=0].length;a").appendTo(o):e).html(u.caption),e.length&&(e[0]._captionSide=e.css("caption-side"),u.captionNode=e[0]),0===h.length&&(h=V("").appendTo(o)),u.nTHead=h[0],V("tr",h).addClass(c.thead.row),o.children("tbody")),e=(0===e.length&&(e=V("").insertAfter(h)),u.nTBody=e[0],o.children("tfoot"));if(0===e.length&&(e=V("").appendTo(o)),u.nTFoot=e[0],V("tr",e).addClass(c.tfoot.row),n.aaData)for(a=0;a]*>)/g,F=Math.pow(2,28),N=/^\d{2,4}[./-]\d{1,2}[./-]\d{1,2}([T ]{1}\d{1,2}[:.]\d{2}([.:]\d{2})?)?$/,j=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),P=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,y=function(t){return!t||!0===t||"-"===t},R=function(t,e){return c[e]||(c[e]=new RegExp(Pt(e),"g")),"string"==typeof t&&"."!==e?t.replace(/\./g,"").replace(c[e],"."):t},f=function(t,e,n){var a=[],r=0,o=t.length;if(void 0!==n)for(;rF)throw new Error("Exceeded max str len");var e;for(t=t.replace(L,"");(t=(e=t).replace(/