Personal tools

User:Serkan/test2/known1: Difference between revisions

From FANTOM5_SSTAR

Jump to: navigation, search
No edit summary
No edit summary
Line 9: Line 9:
var oTable;
var oTable;
/* Formating function for row details */
/* Formating function for row details */
function fnFormatDetails ( nTr )
{
    var aData = oTable.fnGetData( nTr );
    var sOut  = '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">';
    var submotifs = aData[0];
    var submotifs_array =submotifs .split(",")
sOut += '<thead><tr><th scope="col">motif_id</th><th scope="col">motif_name</th></tr></thead>';
    for (var i in submotifs_array ) {
sOut += '<tr>';
      var submotifs_details =submotifs_array [i].split(":")


      for(var i in submotifs_details){
          sOut += '<td>'+submotifs_details[i]+'</td>';
        }
      sOut += '</tr>';
    }
    /* sOut += '<tr><td>Extra info:</td><td>And any further details here (images etc)</td></tr>';*/
    sOut += '</table>'; 
    return sOut;
}
$(document).ready(function() {
$(document).ready(function() {
     oTable = $('#example').dataTable( {
     oTable = $('#example').dataTable( {
         "aaData": [
         "aaData": [
     { "0":"HOCOMOCO:ZFHX3_f1,HOCOMOCO:ARI3A_f1,HOCOMOCO:HXD9_f1,KNOWN_HOCOMOCO:PDX1_do,KNOWN_HOCOMOCO:HXD4_f1,KNOWN_HOCOMOCO:HXC8_f1,KNOWN_HOCOMOCO:LHX3_f1,KNOWN_HOCOMOCO:PO4F2_si,KNOWN_JASPAR:Nobox;MA0125.1,KNOWN_JASPAR:Nkx2-5;MA0063.1"
     { "0":"HOCOMOCO:ZFHX3_f1"
"1":HOCOMOCO:ARI3A_f1,
"2":HOCOMOCO:HXD9_f1,
"3":HOCOMOCO:PDX1_do,
"4":HOCOMOCO:HXD4_f1,
"5":HOCOMOCO:HXC8_f1,
"6":HOCOMOCO:LHX3_f1,
"7":JASPAR:Nobox;MA0125.1,
"8":JASPAR:Nkx2-5
     }
     }
         ],   
         ],   
           "aoColumns": [
           "aoColumns": [
            { "sTitle": "motif type"},
             { "sTitle": "motif name", "mRender": function ( data, type, full ) {
             { "sTitle": "motif name", "mRender": function ( data, type, full ) {
         return '<a href=/resource_browser/User:Serkan/test2/'+data+'>'+data+'</a>';
         return '<a href=/resource_browser/User:Serkan/test2/'+data+'>'+data+'</a>';

Revision as of 11:11, 15 April 2013

known motifs