Railsアプリで宝石「jquery-datatables-rails」を使用しています。ColViz ツールも使用しています。
しかし、ColViz を使用すると、ブラウザー コンソールに次のエラーが表示されます。
Uncaught TypeError: Cannot read property 'msie' of undefined
これは私のコーヒースクリプトです:
$(".dataTable").dataTable
bStateSave: true
fnStateSave: (oSettings, oData) ->
localStorage.setItem "DataTables_" + window.location.pathname, JSON.stringify(oData)
fnStateLoad: (oSettings) ->
JSON.parse localStorage.getItem("DataTables_" + window.location.pathname)
sDom: "CT<\"clear\">lfrtip"
oColVis:
buttonText: "Show/Hide"
aiExclude: [0]
bRestore: true
sAlign: "left"
oTableTools:
aButtons: [
sExtends: "xls"
sButtonText: "Excel"
mColumns: "visible"
,
sExtends: "pdf"
sPdfOrientation: "landscape"
sPdfMessage: "Endeavor"
mColumns: "visible"
]
UDPATE1
ここでエラーが発生します:
/* This results in a very small delay for the end user but it allows the animation to be
* much smoother. If you don't want the animation, then the setTimeout can be removed
*/
setTimeout( function () {
$(nHidden).animate({"opacity": 1}, that.s.iOverlayFade);
$(nBackground).animate({"opacity": 0.1}, that.s.iOverlayFade, 'linear', function () {
/* In IE6 if you set the checked attribute of a hidden checkbox, then this is not visually
* reflected. As such, we need to do it here, once it is visible. Unbelievable.
*/
if ( jQuery.browser.msie && jQuery.browser.version == "6.0" )
Uncaught TypeError: Cannot read property 'msie' of undefined
{
that._fnDrawCallback();
}
});
}, 10 );