diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js
index 45eebfed..e0629843 100644
--- a/media/js/jquery.dataTables.js
+++ b/media/js/jquery.dataTables.js
@@ -9905,41 +9905,26 @@
*/
"fnInit": function ( oSettings, nPaging, fnCallbackDraw )
{
- var nPrevious, nNext, nPreviousInner, nNextInner;
+ var oLang = oSettings.oLanguage.oPaginate;
+ var oClasses = oSettings.oClasses;
var fnClickHandler = function ( e ) {
if ( oSettings.oApi._fnPageChange( oSettings, e.data.action ) )
{
fnCallbackDraw( oSettings );
}
};
-
- /* Store the next and previous elements in the oSettings object as they can be very
- * useful for automation - particularly testing
- */
- nPrevious = document.createElement( 'a' );
- nNext = document.createElement( 'a' );
- if ( oSettings.bJUI )
- {
- nNextInner = document.createElement('span');
- nNextInner.className = oSettings.oClasses.sPageJUINext;
- nNext.appendChild( nNextInner );
-
- nPreviousInner = document.createElement('span');
- nPreviousInner.className = oSettings.oClasses.sPageJUIPrev;
- nPrevious.appendChild( nPreviousInner );
- }
-
- nPrevious.className = oSettings.oClasses.sPagePrevDisabled;
- nNext.className = oSettings.oClasses.sPageNextDisabled;
- nPrevious.setAttribute('tabindex', '0');
- nNext.setAttribute('tabindex', '0');
+ var sAppend = (!oSettings.bJUI) ?
+ ''+
+ ''
+ :
+ ''+
+ '';
+ $(nPaging).append( sAppend );
- nPrevious.title = oSettings.oLanguage.oPaginate.sPrevious;
- nNext.title = oSettings.oLanguage.oPaginate.sNext;
-
- nPaging.appendChild( nPrevious );
- nPaging.appendChild( nNext );
+ var els = $('a', nPaging);
+ var nPrevious = els[0],
+ nNext = els[1]
$(nPrevious)
.bind( 'click.DT', { action: "previous" }, fnClickHandler )
@@ -9959,9 +9944,9 @@
/* ID the first elements only */
if ( oSettings.sTableId !== '' && typeof oSettings.aanFeatures.p == "undefined" )
{
- nPaging.setAttribute( 'id', oSettings.sTableId+'_paginate' );
- nPrevious.setAttribute( 'id', oSettings.sTableId+'_previous' );
- nNext.setAttribute( 'id', oSettings.sTableId+'_next' );
+ nPaging.id = oSettings.sTableId+'_paginate';
+ nPrevious.id = oSettings.sTableId+'_previous';
+ nNext.id = oSettings.sTableId+'_next';
}
},
@@ -9979,19 +9964,19 @@
return;
}
- /* Loop over each instance of the pager */
+ var oClasses = oSettings.oClasses;
var an = oSettings.aanFeatures.p;
+
+ /* Loop over each instance of the pager */
for ( var i=0, iLen=an.length ; i'+oLang.sFirst+''+
+ ''+oLang.sPrevious+''+
+ ''+
+ ''+oLang.sNext+''+
+ ''+oLang.sLast+''
+ );
+ var els = $('a', nPaging);
+ var nFirst = els[0],
+ nPrev = els[1],
+ nNext = els[2],
+ nLast = els[3];
$(nFirst).bind( 'click.DT', { action: "first" }, fnClickHandler );
- $(nPrevious).bind( 'click.DT', { action: "previous" }, fnClickHandler );
+ $(nPrev).bind( 'click.DT', { action: "previous" }, fnClickHandler );
$(nNext).bind( 'click.DT', { action: "next" }, fnClickHandler );
$(nLast).bind( 'click.DT', { action: "last" }, fnClickHandler );
@@ -10063,11 +10041,11 @@
/* ID the first elements only */
if ( oSettings.sTableId !== '' && typeof oSettings.aanFeatures.p == "undefined" )
{
- nPaging.setAttribute( 'id', oSettings.sTableId+'_paginate' );
- nFirst.setAttribute( 'id', oSettings.sTableId+'_first' );
- nPrevious.setAttribute( 'id', oSettings.sTableId+'_previous' );
- nNext.setAttribute( 'id', oSettings.sTableId+'_next' );
- nLast.setAttribute( 'id', oSettings.sTableId+'_last' );
+ nPaging.id = oSettings.sTableId+'_paginate';
+ nFirst.id =oSettings.sTableId+'_first';
+ nPrev.id =oSettings.sTableId+'_previous';
+ nNext.id =oSettings.sTableId+'_next';
+ nLast.id =oSettings.sTableId+'_last';
}
},
diff --git a/media/src/ext/ext.paging.js b/media/src/ext/ext.paging.js
index 20d12b75..3d204aad 100644
--- a/media/src/ext/ext.paging.js
+++ b/media/src/ext/ext.paging.js
@@ -21,41 +21,26 @@ $.extend( DataTable.ext.oPagination, {
*/
"fnInit": function ( oSettings, nPaging, fnCallbackDraw )
{
- var nPrevious, nNext, nPreviousInner, nNextInner;
+ var oLang = oSettings.oLanguage.oPaginate;
+ var oClasses = oSettings.oClasses;
var fnClickHandler = function ( e ) {
if ( oSettings.oApi._fnPageChange( oSettings, e.data.action ) )
{
fnCallbackDraw( oSettings );
}
};
-
- /* Store the next and previous elements in the oSettings object as they can be very
- * useful for automation - particularly testing
- */
- nPrevious = document.createElement( 'a' );
- nNext = document.createElement( 'a' );
- if ( oSettings.bJUI )
- {
- nNextInner = document.createElement('span');
- nNextInner.className = oSettings.oClasses.sPageJUINext;
- nNext.appendChild( nNextInner );
-
- nPreviousInner = document.createElement('span');
- nPreviousInner.className = oSettings.oClasses.sPageJUIPrev;
- nPrevious.appendChild( nPreviousInner );
- }
-
- nPrevious.className = oSettings.oClasses.sPagePrevDisabled;
- nNext.className = oSettings.oClasses.sPageNextDisabled;
- nPrevious.setAttribute('tabindex', '0');
- nNext.setAttribute('tabindex', '0');
+ var sAppend = (!oSettings.bJUI) ?
+ ''+
+ ''
+ :
+ ''+
+ '';
+ $(nPaging).append( sAppend );
- nPrevious.title = oSettings.oLanguage.oPaginate.sPrevious;
- nNext.title = oSettings.oLanguage.oPaginate.sNext;
-
- nPaging.appendChild( nPrevious );
- nPaging.appendChild( nNext );
+ var els = $('a', nPaging);
+ var nPrevious = els[0],
+ nNext = els[1]
$(nPrevious)
.bind( 'click.DT', { action: "previous" }, fnClickHandler )
@@ -75,9 +60,9 @@ $.extend( DataTable.ext.oPagination, {
/* ID the first elements only */
if ( oSettings.sTableId !== '' && typeof oSettings.aanFeatures.p == "undefined" )
{
- nPaging.setAttribute( 'id', oSettings.sTableId+'_paginate' );
- nPrevious.setAttribute( 'id', oSettings.sTableId+'_previous' );
- nNext.setAttribute( 'id', oSettings.sTableId+'_next' );
+ nPaging.id = oSettings.sTableId+'_paginate';
+ nPrevious.id = oSettings.sTableId+'_previous';
+ nNext.id = oSettings.sTableId+'_next';
}
},
@@ -95,19 +80,19 @@ $.extend( DataTable.ext.oPagination, {
return;
}
- /* Loop over each instance of the pager */
+ var oClasses = oSettings.oClasses;
var an = oSettings.aanFeatures.p;
+
+ /* Loop over each instance of the pager */
for ( var i=0, iLen=an.length ; i'+oLang.sFirst+''+
+ ''+oLang.sPrevious+''+
+ ''+
+ ''+oLang.sNext+''+
+ ''+oLang.sLast+''
+ );
+ var els = $('a', nPaging);
+ var nFirst = els[0],
+ nPrev = els[1],
+ nNext = els[2],
+ nLast = els[3];
$(nFirst).bind( 'click.DT', { action: "first" }, fnClickHandler );
- $(nPrevious).bind( 'click.DT', { action: "previous" }, fnClickHandler );
+ $(nPrev).bind( 'click.DT', { action: "previous" }, fnClickHandler );
$(nNext).bind( 'click.DT', { action: "next" }, fnClickHandler );
$(nLast).bind( 'click.DT', { action: "last" }, fnClickHandler );
@@ -179,11 +157,11 @@ $.extend( DataTable.ext.oPagination, {
/* ID the first elements only */
if ( oSettings.sTableId !== '' && typeof oSettings.aanFeatures.p == "undefined" )
{
- nPaging.setAttribute( 'id', oSettings.sTableId+'_paginate' );
- nFirst.setAttribute( 'id', oSettings.sTableId+'_first' );
- nPrevious.setAttribute( 'id', oSettings.sTableId+'_previous' );
- nNext.setAttribute( 'id', oSettings.sTableId+'_next' );
- nLast.setAttribute( 'id', oSettings.sTableId+'_last' );
+ nPaging.id = oSettings.sTableId+'_paginate';
+ nFirst.id =oSettings.sTableId+'_first';
+ nPrev.id =oSettings.sTableId+'_previous';
+ nNext.id =oSettings.sTableId+'_next';
+ nLast.id =oSettings.sTableId+'_last';
}
},