mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-18 11:52:11 +01:00
Dev fix: fnDestry wasn't reapplying original with correctly due to a mistake in an earlier commit - picked up by unit tests
This commit is contained in:
parent
3a63638916
commit
56a7564ee8
2
media/js/jquery.dataTables.js
vendored
2
media/js/jquery.dataTables.js
vendored
@ -2220,7 +2220,7 @@
|
||||
}
|
||||
|
||||
/* Restore the width of the original table */
|
||||
if ( oSettings.bAutoWidth === true )
|
||||
if ( oSettings.oFeatures.bAutoWidth === true )
|
||||
{
|
||||
oSettings.nTable.style.width = _fnStringToCss(oSettings.sDestroyWidth);
|
||||
}
|
||||
|
@ -18,11 +18,17 @@ $(document).ready( function () {
|
||||
function () { return $('select', oSettings.aanFeatures.l[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"A label input is used",
|
||||
null,
|
||||
function () { return $('label', oSettings.aanFeatures.l[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"Default is put into DOM",
|
||||
null,
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
var anChildren = $('label',oSettings.aanFeatures.l[0])[0].childNodes;
|
||||
var bReturn =
|
||||
anChildren[0].nodeValue == "Show " &&
|
||||
anChildren[2].nodeValue == " entries";
|
||||
@ -49,8 +55,7 @@ $(document).ready( function () {
|
||||
"Menu length language definition is in the DOM",
|
||||
null,
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
return anChildren[0].nodeValue == "unit test";
|
||||
return $('label', oSettings.aanFeatures.l[0]).text() == "unit test";
|
||||
}
|
||||
);
|
||||
|
||||
@ -67,7 +72,7 @@ $(document).ready( function () {
|
||||
oSettings = oTable.fnSettings();
|
||||
},
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
var anChildren = $('label',oSettings.aanFeatures.l[0])[0].childNodes;
|
||||
var bReturn =
|
||||
anChildren[0].nodeValue == "unit " &&
|
||||
anChildren[2].nodeValue == " test";
|
||||
|
@ -12,10 +12,16 @@ $(document).ready( function () {
|
||||
function () { return oSettings.oLanguage.sSearch == "Search:"; }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"A label input is used",
|
||||
null,
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"Search language default is in the DOM",
|
||||
null,
|
||||
function () { return document.getElementById('example_filter').childNodes[0].nodeValue
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).text()
|
||||
== "Search: "; }
|
||||
);
|
||||
|
||||
@ -37,8 +43,7 @@ $(document).ready( function () {
|
||||
oTest.fnTest(
|
||||
"Info language definition is in the DOM",
|
||||
null,
|
||||
function () { return document.getElementById('example_filter').childNodes[0].nodeValue
|
||||
== "unit test "; }
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).text().indexOf('unit test') !== -1; }
|
||||
);
|
||||
|
||||
|
||||
|
@ -20,11 +20,17 @@ $(document).ready( function () {
|
||||
function () { return $('select', oSettings.aanFeatures.l[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"A label input is used",
|
||||
null,
|
||||
function () { return $('label', oSettings.aanFeatures.l[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"Default is put into DOM",
|
||||
null,
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
var anChildren = $('label',oSettings.aanFeatures.l[0])[0].childNodes;
|
||||
var bReturn =
|
||||
anChildren[0].nodeValue == "Show " &&
|
||||
anChildren[2].nodeValue == " entries";
|
||||
@ -52,8 +58,7 @@ $(document).ready( function () {
|
||||
"Menu length language definition is in the DOM",
|
||||
null,
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
return anChildren[0].nodeValue == "unit test";
|
||||
return $('label', oSettings.aanFeatures.l[0]).text() == "unit test";
|
||||
}
|
||||
);
|
||||
|
||||
@ -71,7 +76,7 @@ $(document).ready( function () {
|
||||
oSettings = oTable.fnSettings();
|
||||
},
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
var anChildren = $('label',oSettings.aanFeatures.l[0])[0].childNodes;
|
||||
var bReturn =
|
||||
anChildren[0].nodeValue == "unit " &&
|
||||
anChildren[2].nodeValue == " test";
|
||||
|
@ -14,10 +14,16 @@ $(document).ready( function () {
|
||||
function () { return oSettings.oLanguage.sSearch == "Search:"; }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"A label input is used",
|
||||
null,
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"Search language default is in the DOM",
|
||||
null,
|
||||
function () { return document.getElementById('example_filter').childNodes[0].nodeValue
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).text()
|
||||
== "Search: "; }
|
||||
);
|
||||
|
||||
@ -40,8 +46,7 @@ $(document).ready( function () {
|
||||
oTest.fnTest(
|
||||
"Info language definition is in the DOM",
|
||||
null,
|
||||
function () { return document.getElementById('example_filter').childNodes[0].nodeValue
|
||||
== "unit test "; }
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).text().indexOf('unit test') !== -1; }
|
||||
);
|
||||
|
||||
|
||||
|
@ -20,11 +20,17 @@ $(document).ready( function () {
|
||||
function () { return $('select', oSettings.aanFeatures.l[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"A label input is used",
|
||||
null,
|
||||
function () { return $('label', oSettings.aanFeatures.l[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"Default is put into DOM",
|
||||
null,
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
var anChildren = $('label',oSettings.aanFeatures.l[0])[0].childNodes;
|
||||
var bReturn =
|
||||
anChildren[0].nodeValue == "Show " &&
|
||||
anChildren[2].nodeValue == " entries";
|
||||
@ -52,8 +58,7 @@ $(document).ready( function () {
|
||||
"Menu length language definition is in the DOM",
|
||||
null,
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
return anChildren[0].nodeValue == "unit test";
|
||||
return $('label', oSettings.aanFeatures.l[0]).text() == "unit test";
|
||||
}
|
||||
);
|
||||
|
||||
@ -71,7 +76,7 @@ $(document).ready( function () {
|
||||
oSettings = oTable.fnSettings();
|
||||
},
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
var anChildren = $('label',oSettings.aanFeatures.l[0])[0].childNodes;
|
||||
var bReturn =
|
||||
anChildren[0].nodeValue == "unit " &&
|
||||
anChildren[2].nodeValue == " test";
|
||||
|
@ -14,10 +14,16 @@ $(document).ready( function () {
|
||||
function () { return oSettings.oLanguage.sSearch == "Search:"; }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"A label input is used",
|
||||
null,
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"Search language default is in the DOM",
|
||||
null,
|
||||
function () { return document.getElementById('example_filter').childNodes[0].nodeValue
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).text()
|
||||
== "Search: "; }
|
||||
);
|
||||
|
||||
@ -40,8 +46,7 @@ $(document).ready( function () {
|
||||
oTest.fnTest(
|
||||
"Info language definition is in the DOM",
|
||||
null,
|
||||
function () { return document.getElementById('example_filter').childNodes[0].nodeValue
|
||||
== "unit test "; }
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).text().indexOf('unit test') !== -1; }
|
||||
);
|
||||
|
||||
|
||||
|
@ -21,11 +21,17 @@ $(document).ready( function () {
|
||||
function () { return $('select', oSettings.aanFeatures.l[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"A label input is used",
|
||||
null,
|
||||
function () { return $('label', oSettings.aanFeatures.l[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"Default is put into DOM",
|
||||
null,
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
var anChildren = $('label',oSettings.aanFeatures.l[0])[0].childNodes;
|
||||
var bReturn =
|
||||
anChildren[0].nodeValue == "Show " &&
|
||||
anChildren[2].nodeValue == " entries";
|
||||
@ -54,8 +60,7 @@ $(document).ready( function () {
|
||||
"Menu length language definition is in the DOM",
|
||||
null,
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
return anChildren[0].nodeValue == "unit test";
|
||||
return $('label', oSettings.aanFeatures.l[0]).text() == "unit test";
|
||||
}
|
||||
);
|
||||
|
||||
@ -74,7 +79,7 @@ $(document).ready( function () {
|
||||
oSettings = oTable.fnSettings();
|
||||
},
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
var anChildren = $('label',oSettings.aanFeatures.l[0])[0].childNodes;
|
||||
var bReturn =
|
||||
anChildren[0].nodeValue == "unit " &&
|
||||
anChildren[2].nodeValue == " test";
|
||||
|
@ -15,10 +15,16 @@ $(document).ready( function () {
|
||||
function () { return oSettings.oLanguage.sSearch == "Search:"; }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"A label input is used",
|
||||
null,
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"Search language default is in the DOM",
|
||||
null,
|
||||
function () { return document.getElementById('example_filter').childNodes[0].nodeValue
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).text()
|
||||
== "Search: "; }
|
||||
);
|
||||
|
||||
@ -42,8 +48,7 @@ $(document).ready( function () {
|
||||
oTest.fnTest(
|
||||
"Info language definition is in the DOM",
|
||||
null,
|
||||
function () { return document.getElementById('example_filter').childNodes[0].nodeValue
|
||||
== "unit test "; }
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).text().indexOf('unit test') !== -1; }
|
||||
);
|
||||
|
||||
|
||||
|
@ -27,11 +27,17 @@ $(document).ready( function () {
|
||||
function () { return $('select', oSettings.aanFeatures.l[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"A label input is used",
|
||||
null,
|
||||
function () { return $('label', oSettings.aanFeatures.l[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"Default is put into DOM",
|
||||
null,
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
var anChildren = $('label',oSettings.aanFeatures.l[0])[0].childNodes;
|
||||
var bReturn =
|
||||
anChildren[0].nodeValue == "Show " &&
|
||||
anChildren[2].nodeValue == " entries";
|
||||
@ -66,8 +72,7 @@ $(document).ready( function () {
|
||||
"Menu length language definition is in the DOM",
|
||||
null,
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
return anChildren[0].nodeValue == "unit test";
|
||||
return $('label', oSettings.aanFeatures.l[0]).text() == "unit test";
|
||||
}
|
||||
);
|
||||
|
||||
@ -92,7 +97,7 @@ $(document).ready( function () {
|
||||
oSettings = oTable.fnSettings();
|
||||
},
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
var anChildren = $('label',oSettings.aanFeatures.l[0])[0].childNodes;
|
||||
var bReturn =
|
||||
anChildren[0].nodeValue == "unit " &&
|
||||
anChildren[2].nodeValue == " test";
|
||||
|
@ -21,10 +21,16 @@ $(document).ready( function () {
|
||||
function () { return oSettings.oLanguage.sSearch == "Search:"; }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"A label input is used",
|
||||
null,
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"Search language default is in the DOM",
|
||||
null,
|
||||
function () { return document.getElementById('example_filter').childNodes[0].nodeValue
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).text()
|
||||
== "Search: "; }
|
||||
);
|
||||
|
||||
@ -54,8 +60,7 @@ $(document).ready( function () {
|
||||
oTest.fnTest(
|
||||
"Info language definition is in the DOM",
|
||||
null,
|
||||
function () { return document.getElementById('example_filter').childNodes[0].nodeValue
|
||||
== "unit test "; }
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).text().indexOf('unit test') !== -1; }
|
||||
);
|
||||
|
||||
|
||||
|
@ -21,11 +21,17 @@ $(document).ready( function () {
|
||||
function () { return $('select', oSettings.aanFeatures.l[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"A label input is used",
|
||||
null,
|
||||
function () { return $('label', oSettings.aanFeatures.l[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"Default is put into DOM",
|
||||
null,
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
var anChildren = $('label',oSettings.aanFeatures.l[0])[0].childNodes;
|
||||
var bReturn =
|
||||
anChildren[0].nodeValue == "Show " &&
|
||||
anChildren[2].nodeValue == " entries";
|
||||
@ -54,8 +60,7 @@ $(document).ready( function () {
|
||||
"Menu length language definition is in the DOM",
|
||||
null,
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
return anChildren[0].nodeValue == "unit test";
|
||||
return $('label', oSettings.aanFeatures.l[0]).text() == "unit test";
|
||||
}
|
||||
);
|
||||
|
||||
@ -74,7 +79,7 @@ $(document).ready( function () {
|
||||
oSettings = oTable.fnSettings();
|
||||
},
|
||||
function () {
|
||||
var anChildren = oSettings.aanFeatures.l[0].childNodes;
|
||||
var anChildren = $('label',oSettings.aanFeatures.l[0])[0].childNodes;
|
||||
var bReturn =
|
||||
anChildren[0].nodeValue == "unit " &&
|
||||
anChildren[2].nodeValue == " test";
|
||||
|
@ -15,10 +15,16 @@ $(document).ready( function () {
|
||||
function () { return oSettings.oLanguage.sSearch == "Search:"; }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"A label input is used",
|
||||
null,
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).length == 1 }
|
||||
);
|
||||
|
||||
oTest.fnTest(
|
||||
"Search language default is in the DOM",
|
||||
null,
|
||||
function () { return document.getElementById('example_filter').childNodes[0].nodeValue
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).text()
|
||||
== "Search: "; }
|
||||
);
|
||||
|
||||
@ -42,8 +48,7 @@ $(document).ready( function () {
|
||||
oTest.fnTest(
|
||||
"Info language definition is in the DOM",
|
||||
null,
|
||||
function () { return document.getElementById('example_filter').childNodes[0].nodeValue
|
||||
== "unit test "; }
|
||||
function () { return $('label', oSettings.aanFeatures.f[0]).text().indexOf('unit test') !== -1; }
|
||||
);
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user