From: Thierry Parmentelat Date: Sun, 24 Mar 2013 10:28:36 +0000 (+0100) Subject: turn of problematic setting of dataTable X-Git-Tag: myslice-django-0.1-2~15 X-Git-Url: http://git.onelab.eu/?p=unfold.git;a=commitdiff_plain;h=0c6de66411d990fcd28278ec396456203acef805 turn of problematic setting of dataTable 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 --- diff --git a/plugins/hazelnut/hazelnut.js b/plugins/hazelnut/hazelnut.js index 596062c2..2f7ec5ea 100644 --- a/plugins/hazelnut/hazelnut.js +++ b/plugins/hazelnut/hazelnut.js @@ -127,7 +127,8 @@ // 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])); @@ -329,6 +330,7 @@ }); + this.table.fnClearTable(); if (debug) console.log("hazelnut.update_plugin: total of " + newlines.length + " rows"); this.table.fnAddData(newlines);