1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-18 11:52:11 +01:00

move eq jQuery selector outside of selector

This commit is contained in:
Allan Jardine 2015-01-22 10:21:30 +00:00
parent d1ea76a958
commit c7e18c4236
3 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
44cd419e587866a5bd5ade590dde586db239157a
4a0b6df610d635511aac53d45373232e2dc89ca4

View File

@ -6313,7 +6313,7 @@
/* Remove row stripe classes if they are already on the table row */
var stripeClasses = oSettings.asStripeClasses;
var rowOne = $('tbody tr:eq(0)', this);
var rowOne = $('tbody tr', this).eq(0);
if ( $.inArray( true, $.map( stripeClasses, function(el, i) {
return rowOne.hasClass(el);
} ) ) !== -1 ) {

View File

@ -85,7 +85,7 @@ this||o.nTFoot&&o.nTFoot.parentNode==this){h=d.bRetrieve!==n?d.bRetrieve:k.bRetr
"sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]);E(m.oScroll,d,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);E(m.oLanguage,d,"fnInfoCallback");z(m,"aoDrawCallback",d.fnDrawCallback,"user");z(m,"aoServerParams",
d.fnServerParams,"user");z(m,"aoStateSaveParams",d.fnStateSaveParams,"user");z(m,"aoStateLoadParams",d.fnStateLoadParams,"user");z(m,"aoStateLoaded",d.fnStateLoaded,"user");z(m,"aoRowCallback",d.fnRowCallback,"user");z(m,"aoRowCreatedCallback",d.fnCreatedRow,"user");z(m,"aoHeaderCallback",d.fnHeaderCallback,"user");z(m,"aoFooterCallback",d.fnFooterCallback,"user");z(m,"aoInitComplete",d.fnInitComplete,"user");z(m,"aoPreDrawCallback",d.fnPreDrawCallback,"user");j=m.oClasses;d.bJQueryUI?(g.extend(j,
p.ext.oJUIClasses,d.oClasses),d.sDom===k.sDom&&"lfrtip"===k.sDom&&(m.sDom='<"H"lfr>t<"F"ip>'),m.renderer)?g.isPlainObject(m.renderer)&&!m.renderer.header&&(m.renderer.header="jqueryui"):m.renderer="jqueryui":g.extend(j,p.ext.classes,d.oClasses);g(this).addClass(j.sTable);if(""!==m.oScroll.sX||""!==m.oScroll.sY)m.oScroll.iBarWidth=Hb();!0===m.oScroll.sX&&(m.oScroll.sX="100%");m.iInitDisplayStart===n&&(m.iInitDisplayStart=d.iDisplayStart,m._iDisplayStart=d.iDisplayStart);null!==d.iDeferLoading&&(m.bDeferLoading=
!0,h=g.isArray(d.iDeferLoading),m._iRecordsDisplay=h?d.iDeferLoading[0]:d.iDeferLoading,m._iRecordsTotal=h?d.iDeferLoading[1]:d.iDeferLoading);var r=m.oLanguage;g.extend(!0,r,d.oLanguage);""!==r.sUrl&&(g.ajax({dataType:"json",url:r.sUrl,success:function(a){P(a);H(k.oLanguage,a);g.extend(true,r,a);ha(m)},error:function(){ha(m)}}),l=!0);null===d.asStripeClasses&&(m.asStripeClasses=[j.sStripeOdd,j.sStripeEven]);var h=m.asStripeClasses,s=g("tbody tr:eq(0)",this);-1!==g.inArray(!0,g.map(h,function(a){return s.hasClass(a)}))&&
!0,h=g.isArray(d.iDeferLoading),m._iRecordsDisplay=h?d.iDeferLoading[0]:d.iDeferLoading,m._iRecordsTotal=h?d.iDeferLoading[1]:d.iDeferLoading);var r=m.oLanguage;g.extend(!0,r,d.oLanguage);""!==r.sUrl&&(g.ajax({dataType:"json",url:r.sUrl,success:function(a){P(a);H(k.oLanguage,a);g.extend(true,r,a);ha(m)},error:function(){ha(m)}}),l=!0);null===d.asStripeClasses&&(m.asStripeClasses=[j.sStripeOdd,j.sStripeEven]);var h=m.asStripeClasses,s=g("tbody tr",this).eq(0);-1!==g.inArray(!0,g.map(h,function(a){return s.hasClass(a)}))&&
(g("tbody tr",this).removeClass(h.join(" ")),m.asDestroyStripes=h.slice());q=[];h=this.getElementsByTagName("thead");0!==h.length&&(ea(m.aoHeader,h[0]),q=qa(m));if(null===d.aoColumns){o=[];h=0;for(i=q.length;h<i;h++)o.push(null)}else o=d.aoColumns;h=0;for(i=o.length;h<i;h++)Fa(m,q?q[h]:null);ib(m,d.aoColumnDefs,o,function(a,b){ka(m,a,b)});if(s.length){var t=function(a,b){return a.getAttribute("data-"+b)!==null?b:null};g.each(na(m,s[0]).cells,function(a,b){var c=m.aoColumns[a];if(c.mData===a){var e=
t(b,"sort")||t(b,"order"),d=t(b,"filter")||t(b,"search");if(e!==null||d!==null){c.mData={_:a+".display",sort:e!==null?a+".@data-"+e:n,type:e!==null?a+".@data-"+e:n,filter:d!==null?a+".@data-"+d:n};ka(m,a)}}})}var u=m.oFeatures;d.bStateSave&&(u.bStateSave=!0,Kb(m,d),z(m,"aoDrawCallback",ya,"state_save"));if(d.aaSorting===n){q=m.aaSorting;h=0;for(i=q.length;h<i;h++)q[h][1]=m.aoColumns[h].asSorting[0]}xa(m);u.bSort&&z(m,"aoDrawCallback",function(){if(m.bSorted){var a=U(m),b={};g.each(a,function(a,c){b[c.src]=
c.dir});v(m,null,"order",[m,a,b]);Jb(m)}});z(m,"aoDrawCallback",function(){(m.bSorted||B(m)==="ssp"||u.bDeferRender)&&xa(m)},"sc");gb(m);h=g(this).children("caption").each(function(){this._captionSide=g(this).css("caption-side")});i=g(this).children("thead");0===i.length&&(i=g("<thead/>").appendTo(this));m.nTHead=i[0];i=g(this).children("tbody");0===i.length&&(i=g("<tbody/>").appendTo(this));m.nTBody=i[0];i=g(this).children("tfoot");if(0===i.length&&0<h.length&&(""!==m.oScroll.sX||""!==m.oScroll.sY))i=