mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-30 23:52:11 +01:00
Fix: Language backwards compatibility could override developer defined defaults - 9267
This commit is contained in:
parent
e815062197
commit
c1e40a8596
6
media/js/jquery.dataTables.js
vendored
6
media/js/jquery.dataTables.js
vendored
@ -2578,13 +2578,15 @@
|
||||
/* Backwards compatibility - if there is no sEmptyTable given, then use the same as
|
||||
* sZeroRecords - assuming that is given.
|
||||
*/
|
||||
if ( !oLanguage.sEmptyTable && oLanguage.sZeroRecords )
|
||||
if ( !oLanguage.sEmptyTable && oLanguage.sZeroRecords &&
|
||||
oDefaults.sEmptyTable === "No data available in table" )
|
||||
{
|
||||
_fnMap( oLanguage, oLanguage, 'sZeroRecords', 'sEmptyTable' );
|
||||
}
|
||||
|
||||
/* Likewise with loading records */
|
||||
if ( !oLanguage.sLoadingRecords && oLanguage.sZeroRecords )
|
||||
if ( !oLanguage.sLoadingRecords && oLanguage.sZeroRecords &&
|
||||
oDefaults.sLoadingRecords === "Loading..." )
|
||||
{
|
||||
_fnMap( oLanguage, oLanguage, 'sZeroRecords', 'sLoadingRecords' );
|
||||
}
|
||||
|
@ -135,13 +135,15 @@ function _fnLanguageCompat( oLanguage )
|
||||
/* Backwards compatibility - if there is no sEmptyTable given, then use the same as
|
||||
* sZeroRecords - assuming that is given.
|
||||
*/
|
||||
if ( !oLanguage.sEmptyTable && oLanguage.sZeroRecords )
|
||||
if ( !oLanguage.sEmptyTable && oLanguage.sZeroRecords &&
|
||||
oDefaults.sEmptyTable === "No data available in table" )
|
||||
{
|
||||
_fnMap( oLanguage, oLanguage, 'sZeroRecords', 'sEmptyTable' );
|
||||
}
|
||||
|
||||
/* Likewise with loading records */
|
||||
if ( !oLanguage.sLoadingRecords && oLanguage.sZeroRecords )
|
||||
if ( !oLanguage.sLoadingRecords && oLanguage.sZeroRecords &&
|
||||
oDefaults.sLoadingRecords === "Loading..." )
|
||||
{
|
||||
_fnMap( oLanguage, oLanguage, 'sZeroRecords', 'sLoadingRecords' );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user