X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webapp%2Fresources%2Fdatatables-1.9.4%2Fmedia%2Funit_testing%2Ftests_onhold%2F1_dom%2F5396-fnUpdate-arrays.js;fp=webapp%2Fresources%2Fdatatables-1.9.4%2Fmedia%2Funit_testing%2Ftests_onhold%2F1_dom%2F5396-fnUpdate-arrays.js;h=4ab695b237a87aac0ce624f63928c77ad6c16f12;hb=9bb6ee99ca7f738fac1087190b5481b8fe6e8d9f;hp=0000000000000000000000000000000000000000;hpb=2e3f6b76be585306f1003d849831840c0adb3360;p=proteocache.git
diff --git a/webapp/resources/datatables-1.9.4/media/unit_testing/tests_onhold/1_dom/5396-fnUpdate-arrays.js b/webapp/resources/datatables-1.9.4/media/unit_testing/tests_onhold/1_dom/5396-fnUpdate-arrays.js
new file mode 100755
index 0000000..4ab695b
--- /dev/null
+++ b/webapp/resources/datatables-1.9.4/media/unit_testing/tests_onhold/1_dom/5396-fnUpdate-arrays.js
@@ -0,0 +1,103 @@
+// DATA_TEMPLATE: empty_table
+oTest.fnStart( "5396 - fnUpdate with 2D arrays for a single row" );
+
+$(document).ready( function () {
+ $('#example thead tr').append( '
6 | ' );
+ $('#example thead tr').append( '7 | ' );
+ $('#example thead tr').append( '8 | ' );
+ $('#example thead tr').append( '9 | ' );
+ $('#example thead tr').append( '10 | ' );
+
+ var aDataSet = [
+ [
+ "1",
+ "í길ë",
+ "1154315",
+ "etc1",
+ [
+ [ "test1@daum.net", "2011-03-04" ],
+ [ "test1@naver.com", "2009-07-06" ],
+ [ "test4@naver.com", ",hide" ],
+ [ "test5?@naver.com", "" ]
+ ],
+ "2011-03-04",
+ "show"
+ ],
+ [
+ "2",
+ "í길ì",
+ "2154315",
+ "etc2",
+ [
+ [ "test2@daum.net", "2009-09-26" ],
+ [ "test2@naver.com", "2009-05-21,hide" ],
+ [ "lsb@naver.com", "2010-03-05" ],
+ [ "lsb3@naver.com", ",hide" ],
+ [ "sooboklee9@daum.net", "2010-03-05" ]
+ ],
+ "2010-03-05",
+ "show"
+ ]
+]
+
+ var oTable = $('#example').dataTable({
+ "aaData": aDataSet,
+ "aoColumns": [
+ { "mDataProp": "0"},
+ { "mDataProp": "1"},
+ { "mDataProp": "2"},
+ { "mDataProp": "3"},
+ { "mDataProp": "4.0.0"},
+ { "mDataProp": "4.0.1"},
+ { "mDataProp": "4.1.0"},
+ { "mDataProp": "4.1.1"},
+ { "mDataProp": "5"},
+ { "mDataProp": "6"}
+ ]
+ });
+
+
+ oTest.fnTest(
+ "Initialisation",
+ null,
+ function () {
+ return $('#example tbody tr:eq(0) td:eq(0)').html() == '1';
+ }
+ );
+
+ oTest.fnTest(
+ "Update row",
+ function () {
+ $('#example').dataTable().fnUpdate( [
+ "0",
+ "í길ì",
+ "2154315",
+ "etc2",
+ [
+ [ "test2@daum.net", "2009-09-26" ],
+ [ "test2@naver.com", "2009-05-21,hide" ],
+ [ "lsb@naver.com", "2010-03-05" ],
+ [ "lsb3@naver.com", ",hide" ],
+ [ "sooboklee9@daum.net", "2010-03-05" ]
+ ],
+ "2010-03-05",
+ "show"
+ ], 1 );
+ },
+ function () {
+ return $('#example tbody tr:eq(0) td:eq(0)').html() == '0';
+ }
+ );
+
+ oTest.fnTest(
+ "Original row preserved",
+ null,
+ function () {
+ return $('#example tbody tr:eq(1) td:eq(0)').html() == '1';
+ }
+ );
+
+
+
+ oTest.fnComplete();
+} );
\ No newline at end of file