mirror of
https://github.com/DataTables/DataTables.git
synced 2024-11-29 11:24:10 +01:00
Fix - docs: dt-api row.add()
and dt-api rows.add()
will accept tr
elements
This commit is contained in:
parent
63c215b044
commit
04598f91ff
@ -1 +1 @@
|
||||
12134bf7404f80b3c6beac360391a5ea988ba365
|
||||
bb57a3b02eaf989dcc4a02c5ff0151ee1ec11961
|
||||
|
4
media/js/jquery.dataTables.js
vendored
4
media/js/jquery.dataTables.js
vendored
@ -1179,7 +1179,7 @@
|
||||
*/
|
||||
function _fnSplitObjNotation( str )
|
||||
{
|
||||
return $.map( str.match(/(\\.|[^\.])+/g) || [''], function ( s ) {
|
||||
return $.map( str.match(/(\\.|[^\.])+/g), function ( s ) {
|
||||
return s.replace(/\\./g, '.');
|
||||
} );
|
||||
}
|
||||
@ -1640,7 +1640,7 @@
|
||||
else {
|
||||
// Existing row object passed in
|
||||
tds = row.anCells;
|
||||
|
||||
|
||||
for ( var j=0, jen=tds.length ; j<jen ; j++ ) {
|
||||
cellProcess( tds[j] );
|
||||
}
|
||||
|
2
media/js/jquery.dataTables.min.js
vendored
2
media/js/jquery.dataTables.min.js
vendored
@ -13,7 +13,7 @@ e.sSortable,b.sSortingClassJUI=e.sSortJUI)}function Y(a){if(!1!==a.oFeatures.bAu
|
||||
d){a[b]&&c.push(d)});return c}function Ja(a){var b=a.aoColumns,c=a.aoData,e=m.ext.type.detect,d,f,g,j,i,h,l,q,r;d=0;for(f=b.length;d<f;d++)if(l=b[d],r=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=e.length;g<j;g++){i=0;for(h=c.length;i<h;i++){r[i]===k&&(r[i]=w(a,i,d,"type"));q=e[g](r[i],a);if(!q&&g!==e.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function jb(a,b,c,e){var d,f,g,j,i,o,l=a.aoColumns;if(b)for(d=b.length-1;0<=d;d--){o=
|
||||
b[d];var q=o.targets!==k?o.targets:o.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Ha(a);e(q[f],o)}else if("number"===typeof q[f]&&0>q[f])e(l.length+q[f],o);else if("string"===typeof q[f]){j=0;for(i=l.length;j<i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&e(j,o)}}if(c){d=0;for(a=c.length;d<a;d++)e(d,c[d])}}function K(a,b,c,e){var d=a.aoData.length,f=h.extend(!0,{},m.models.oRow,{src:c?"dom":"data"});f._aData=b;a.aoData.push(f);
|
||||
for(var b=a.aoColumns,f=0,g=b.length;f<g;f++)c&&Ka(a,d,f,w(a,d,f)),b[f].sType=null;a.aiDisplayMaster.push(d);(c||!a.oFeatures.bDeferRender)&&La(a,d,c,e);return d}function na(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,d){c=oa(a,d);return K(a,c.data,d,c.cells)})}function w(a,b,c,e){var d=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,c=f.fnGetData(g,e,{settings:a,row:b,col:c});if(c===k)return a.iDrawError!=d&&null===j&&(I(a,0,"Requested unknown parameter "+("function"==
|
||||
typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b,4),a.iDrawError=d),j;if((c===g||null===c)&&null!==j)c=j;else if("function"===typeof c)return c.call(g);return null===c&&"display"==e?"":c}function Ka(a,b,c,e){a.aoColumns[c].fnSetData(a.aoData[b]._aData,e,{settings:a,row:b,col:c})}function Ma(a){return h.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\./g,".")})}function S(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=S(c))});return function(a,c,f,g){var j=
|
||||
typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b,4),a.iDrawError=d),j;if((c===g||null===c)&&null!==j)c=j;else if("function"===typeof c)return c.call(g);return null===c&&"display"==e?"":c}function Ka(a,b,c,e){a.aoColumns[c].fnSetData(a.aoData[b]._aData,e,{settings:a,row:b,col:c})}function Ma(a){return h.map(a.match(/(\\.|[^\.])+/g),function(a){return a.replace(/\\./g,".")})}function S(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=S(c))});return function(a,c,f,g){var j=
|
||||
b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,b,f){var g,j;if(""!==f){j=Ma(f);for(var i=0,h=j.length;i<h;i++){f=j[i].match(ca);g=j[i].match(U);if(f){j[i]=j[i].replace(ca,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");i=0;for(h=a.length;i<h;i++)g.push(c(a[i],b,j));a=f[0].substring(1,
|
||||
f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(U,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,d){return c(b,d,a)}}return function(b){return b[a]}}function T(a){if(h.isPlainObject(a))return T(a._);if(null===a)return function(){};if("function"===typeof a)return function(b,e,d){a(b,"set",e,d)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,e,d){var d=Ma(d),f;f=d[d.length-
|
||||
1];for(var g,j,i=0,h=d.length-1;i<h;i++){g=d[i].match(ca);j=d[i].match(U);if(g){d[i]=d[i].replace(ca,"");a[d[i]]=[];f=d.slice();f.splice(0,i+1);g=f.join(".");j=0;for(h=e.length;j<h;j++)f={},b(f,e[j],g),a[d[i]].push(f);return}j&&(d[i]=d[i].replace(U,""),a=a[d[i]](e));if(null===a[d[i]]||a[d[i]]===k)a[d[i]]={};a=a[d[i]]}if(f.match(U))a[f.replace(U,"")](e);else a[f.replace(ca,"")]=e};return function(c,e){return b(c,e,a)}}return function(b,e){b[a]=e}}function Na(a){return D(a.aoData,"_aData")}function pa(a){a.aoData.length=
|
||||
|
Loading…
Reference in New Issue
Block a user