turn of problematic setting of dataTable
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Sun, 24 Mar 2013 10:28:36 +0000 (11:28 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Sun, 24 Mar 2013 10:28:36 +0000 (11:28 +0100)
when a hazelnut plugin is embedded in a Tabs object and not visible at the time the data shows up, then it used to end up empty
turning off sScrollX fixes this problem - side-effect is not yet clear to me

plugins/hazelnut/hazelnut.js

index 596062c..2f7ec5e 100644 (file)
             // http://datatables.net/forums/discussion/5331/datatables-warning-...-requested-unknown-parameter/p2
             aoColumnDefs: [{sDefaultContent: '',aTargets: [ '_all' ]}],
             bRetrieve: true,
-            sScrollX: '100%',       /* Horizontal scrolling */
+           // xxx this one causes tables in a 'tabs' that are not exposed at the time this is run to show up empty
+            // sScrollX: '100%',       /* Horizontal scrolling */
             bProcessing: true,      /* Loading */
             fnRowCallback: function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
                 $(nRow).attr('id', get_value(aData[3]));
     
             });
     
+           this.table.fnClearTable();
            if (debug) console.log("hazelnut.update_plugin: total of " + newlines.length + " rows");
             this.table.fnAddData(newlines);