|
Lines 22-28
var dataTablesDefaults = {
Link Here
|
| 22 |
"sProcessing" : window.MSG_DT_PROCESSING || "Processing...", |
22 |
"sProcessing" : window.MSG_DT_PROCESSING || "Processing...", |
| 23 |
"sSearch" : window.MSG_DT_SEARCH || "Search:", |
23 |
"sSearch" : window.MSG_DT_SEARCH || "Search:", |
| 24 |
"sZeroRecords" : window.MSG_DT_ZERO_RECORDS || "No matching records found" |
24 |
"sZeroRecords" : window.MSG_DT_ZERO_RECORDS || "No matching records found" |
| 25 |
} |
25 |
}, |
|
|
26 |
"sDom": '<"top pager"ilpf>t<"bottom pager"ip>' |
| 26 |
}; |
27 |
}; |
| 27 |
|
28 |
|
| 28 |
|
29 |
|
|
Lines 279-281
function replace_html_date( original_node, id, format ) {
Link Here
|
| 279 |
script.text = script_content; |
280 |
script.text = script_content; |
| 280 |
$(original_node).append( script ); |
281 |
$(original_node).append( script ); |
| 281 |
} |
282 |
} |
| 282 |
- |
283 |
|
|
|
284 |
$.fn.dataTableExt.oPagination.four_button = { |
| 285 |
/* |
| 286 |
* Function: oPagination.four_button.fnInit |
| 287 |
* Purpose: Initalise dom elements required for pagination with a list of the pages |
| 288 |
* Returns: - |
| 289 |
* Inputs: object:oSettings - dataTables settings object |
| 290 |
* node:nPaging - the DIV which contains this pagination control |
| 291 |
* function:fnCallbackDraw - draw function which must be called on update |
| 292 |
*/ |
| 293 |
"fnInit": function ( oSettings, nPaging, fnCallbackDraw ) |
| 294 |
{ |
| 295 |
nFirst = document.createElement( 'span' ); |
| 296 |
nPrevious = document.createElement( 'span' ); |
| 297 |
nNext = document.createElement( 'span' ); |
| 298 |
nLast = document.createElement( 'span' ); |
| 299 |
|
| 300 |
/* nFirst.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sFirst ) ); |
| 301 |
nPrevious.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sPrevious ) ); |
| 302 |
nNext.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sNext ) ); |
| 303 |
nLast.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sLast ) );*/ |
| 304 |
|
| 305 |
nFirst.className = "paginate_button first"; |
| 306 |
nPrevious.className = "paginate_button previous"; |
| 307 |
nNext.className="paginate_button next"; |
| 308 |
nLast.className = "paginate_button last"; |
| 309 |
|
| 310 |
nPaging.appendChild( nFirst ); |
| 311 |
nPaging.appendChild( nPrevious ); |
| 312 |
nPaging.appendChild( nNext ); |
| 313 |
nPaging.appendChild( nLast ); |
| 314 |
|
| 315 |
$(nFirst).click( function () { |
| 316 |
oSettings.oApi._fnPageChange( oSettings, "first" ); |
| 317 |
fnCallbackDraw( oSettings ); |
| 318 |
} ); |
| 319 |
|
| 320 |
$(nPrevious).click( function() { |
| 321 |
oSettings.oApi._fnPageChange( oSettings, "previous" ); |
| 322 |
fnCallbackDraw( oSettings ); |
| 323 |
} ); |
| 324 |
|
| 325 |
$(nNext).click( function() { |
| 326 |
oSettings.oApi._fnPageChange( oSettings, "next" ); |
| 327 |
fnCallbackDraw( oSettings ); |
| 328 |
} ); |
| 329 |
|
| 330 |
$(nLast).click( function() { |
| 331 |
oSettings.oApi._fnPageChange( oSettings, "last" ); |
| 332 |
fnCallbackDraw( oSettings ); |
| 333 |
} ); |
| 334 |
|
| 335 |
/* Disallow text selection */ |
| 336 |
$(nFirst).bind( 'selectstart', function () { return false; } ); |
| 337 |
$(nPrevious).bind( 'selectstart', function () { return false; } ); |
| 338 |
$(nNext).bind( 'selectstart', function () { return false; } ); |
| 339 |
$(nLast).bind( 'selectstart', function () { return false; } ); |
| 340 |
}, |
| 341 |
|
| 342 |
/* |
| 343 |
* Function: oPagination.four_button.fnUpdate |
| 344 |
* Purpose: Update the list of page buttons shows |
| 345 |
* Returns: - |
| 346 |
* Inputs: object:oSettings - dataTables settings object |
| 347 |
* function:fnCallbackDraw - draw function which must be called on update |
| 348 |
*/ |
| 349 |
"fnUpdate": function ( oSettings, fnCallbackDraw ) |
| 350 |
{ |
| 351 |
if ( !oSettings.aanFeatures.p ) |
| 352 |
{ |
| 353 |
return; |
| 354 |
} |
| 355 |
|
| 356 |
/* Loop over each instance of the pager */ |
| 357 |
var an = oSettings.aanFeatures.p; |
| 358 |
for ( var i=0, iLen=an.length ; i<iLen ; i++ ) |
| 359 |
{ |
| 360 |
var buttons = an[i].getElementsByTagName('span'); |
| 361 |
if ( oSettings._iDisplayStart === 0 ) |
| 362 |
{ |
| 363 |
buttons[0].className = "paginate_disabled_first"; |
| 364 |
buttons[1].className = "paginate_disabled_previous"; |
| 365 |
} |
| 366 |
else |
| 367 |
{ |
| 368 |
buttons[0].className = "paginate_enabled_first"; |
| 369 |
buttons[1].className = "paginate_enabled_previous"; |
| 370 |
} |
| 371 |
|
| 372 |
if ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() ) |
| 373 |
{ |
| 374 |
buttons[2].className = "paginate_disabled_next"; |
| 375 |
buttons[3].className = "paginate_disabled_last"; |
| 376 |
} |
| 377 |
else |
| 378 |
{ |
| 379 |
buttons[2].className = "paginate_enabled_next"; |
| 380 |
buttons[3].className = "paginate_enabled_last"; |
| 381 |
} |
| 382 |
} |
| 383 |
} |
| 384 |
}; |