Personal tools

User:Hisa/tabletest: Difference between revisions

From FANTOM5_SSTAR

Jump to: navigation, search
No edit summary
No edit summary
 
(52 intermediate revisions by the same user not shown)
Line 1: Line 1:
<html>
<!-- tf enrich table: start-->
<style type="text/css" title="currentStyle">
@import "/resource_browser/rb_js/datatables/media/css/f5_rb_table.css";
</style>
<script type="text/javascript" language="javascript" src="/resource_browser/rb_js/datatables/media/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
</html>
{{#exptable_hg19_dtarr:
{{#ask:[[Category:FFCP]][[EntrezGene::100]][[Species::Human (Homo sapiens)]]|?short_description|?id|?Phase1 expression|limit=10|format=template|template=Exptable_imput|sep=$
|sort=short_description
|order=ASC}}
|hg19
}}
<html>
<html>


<script type="text/javascript" language="javascript" src="/resource_browser/rb_js/datatables/media/js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8">
/* Data set - can contain whatever information you want */
var aDataSet =
[
['</html>[[FF:11644-122D6]]<html>','Mouse Neurons - hippocampal, donor3','hippocampus','neuron'],['FF:11645-122D7','Mouse Neurons - raphe, donor3','raphe nuclei','neuron'],['FF:11646-122D8','Mouse Neurons - striatal, donor3','corpus striatum','neuron'],['FF:11647-122D9','Mouse Neurons - cortical, donor3','cortex','neuron'],['FF:11648-122E1','Mouse Neurons - ventral spinal cord, donor3','spinal cord','neuron'],['FF:11708-123B7','Mouse Astrocytes - cerebellar, donor1','cerebellum','astrocyte'],['FF:11709-123B8','Mouse Astrocytes - hippocampus, donor1','hippocampus','astrocyte'],['FF:11711-123C1','Mouse Cardiac Myocytes, donor1','heart','cardiac muscle cell'],['FF:11712-123C2','Mouse Embryonic fibroblasts, donor1','unclassifiable','fibroblast'],['FF:11713-123C3','Mouse Granule cells, donor1','brain','neuron, granule cell'],['FF:11714-123C4','Mouse hepatocyte, donor1','liver','hepatocyte'],['FF:11716-123C6','Mouse Meningeal cells, donor1','meninges','meningeal cell'],['FF:11717-123C7','Mouse Mesenchymal stem cells - bone marrow derived, donor1','bone marrow','mesenchymal stem cell'],['FF:11718-123C8','Mouse Microglia, donor1','brain','microglial cell'],['FF:11720-123D1','Mouse Neurons - dorsal spinal cord, donor1','spinal cord','neuron'],['FF:11721-123D2','Mouse Neurons - hippocampal, donor1','hippocampus','neuron'],['FF:11722-123D3','Mouse Neurons - raphe, donor1','raphe nuclei','neuron'],['FF:11723-123D4','Mouse Neurons - striatal, donor1','corpus striatum','neuron'],['FF:11724-123D5','Mouse Neurons - cortical, donor1','cortex','neuron'],['FF:11725-123D6','Mouse Neurons - ventral spinal cord, donor1','spinal cord','neuron']
];
$(document).ready(function() {
$('#dynamic').html( '<table cellpadding="0" cellspacing="0" border="0" class="display" id="example"></table>' );
$('#example').dataTable( {
"aaData": aDataSet,
"aoColumns": [
{ "sTitle": "FF sample ID" },
{ "sTitle": "Name" },
{ "sTitle": "Sample tissue" },
{ "sTitle": "Sample cell type", "sClass": "center" },


]
$('#ffcp_tf_enrichscore').html( '<table cellpadding="0" cellspacing="0" border="0" class="display" id="ffcp_tf_enrichscore_cont"></table>' );
} );
var oTable = $('#ffcp_tf_enrichscore_cont').dataTable( {
} );
"bProcessing": true,
</script>
// "sScrollX": "100%",
// "sScrollXInner": "150%",
 
        "sScrollY": "300px",
        "bPaginate": false,
        "bScrollCollapse": true,
"iDisplayLength": -1,
"aoColumns": cols,
"aaData": data,
"aaSorting": [[ 1, "desc" ]]
 
 
});
// hyperlink on column header
for(i1=1;i1<$("#ffcp_tf_enrichscore tr")[0].cells.length;i1++){
$("#ffcp_tf_enrichscore tr")[0].cells[i1].innerHTML = "<a href=\"/resource_browser/index.php/FFCP_PHASE1:Hg19::"+encodeURI(collinks.shift())+"\">"+$("#ffcp_tf_enrichscore tr")[0].cells[i1].innerHTML+"</a>";
}
 
// hyperlink on sample record
for(i1=1;i1<$("#ffcp_tf_enrichscore tr").length;i1++){
var cellcont = $("#ffcp_tf_enrichscore tr")[i1].cells[0].innerHTML;
$("#ffcp_tf_enrichscore tr")[i1].cells[0].innerHTML = "<a href=\"/resource_browser/FF:"+cellcont.split(".").pop()+"\">"+cellcont+"</a>";
}
 
 
//$("#ffcp_tf_enrichscore tbody td").not('.dt_sample_name').each(function(){
//var cval= $(this).innerHTML;
//$(this).css({background: 'yellow'});
//}
//);
 
 
 
 
});
 
</script>




<div id="dynamic"></div>
<div id="debug" style="float:left;"></div>
<div id="ffcp_tf_enrichscore" style="float:left;"></div>




</html>
</html>

Latest revision as of 14:47, 17 May 2012