Source

tw2.yui / tw2 / yui / templates / datatable.html

Full commit
<div xmlns:py="http://genshi.edgewall.org/">
<style type="text/css">
  .yui-skin-sam .yui-dt-liner { white-space:nowrap; } 
</style>
<div py:attrs="w.attrs"></div>
<script type="text/javascript">
    var myDataTable = new YAHOO.widget.DataTable("$w.compound_id",
            $w.columns, new YAHOO.util.LocalDataSource($w.value), $w.options);
    myDataTable.subscribe("buttonClickEvent", function(oArgs){ 
        var buttons = $w.buttons;
        var oRecord = this.getRecord(oArgs.target);
        window.location = buttons[oArgs.target.id].replace('$', oRecord.getData()['id']);
    }); 
</script>
</div>