d44ef4b3e033de3ca7676fa33e2fb1221eedc9ec
kate
  Thu Apr 19 09:00:59 2012 -0700
1. Add hideable 'Help' panel to Data Matrix page  2. Add 'view matrix' button to ChIP-seq header on Data Matrix page (QA item #8).  3.  Change navigation from portal so Data Matrix displayed first.
diff --git src/hg/js/encodeDataMatrix.js src/hg/js/encodeDataMatrix.js
index 991ca32..c257a44 100644
--- src/hg/js/encodeDataMatrix.js
+++ src/hg/js/encodeDataMatrix.js
@@ -98,43 +98,51 @@
         // 1st column is row headers
         // colgroups are needed to support cross-hair hover effect
         $thead.before('<colgroup></colgroup>');
 
         $.each(dataGroups, function (i, group) {
             $tableHeaders.append('<th class="groupType"><div class="verticalText">' + 
                                 group.label + '</div></th>');
             maxLen = Math.max(maxLen, group.label.length);
             $thead.before('<colgroup></colgroup>');
             $.each(group.dataTypes, function (i, label) {
                 dataType = encodeProject.getDataTypeByLabel(label);
 
                 // prune out datatypes with no experiments
                 if (dataTypeExps[dataType.term] !== undefined) {
                     $th = $('<th class="elementType"><div class="verticalText">' + 
-                                dataType.label + '</div></th>');
+                                dataType.label + (dataType.term === 'ChipSeq' ? 
+                                '&nbsp;&nbsp; <span title="Click to view ChIP-seq experiment matrix by antibody target" id="chipButton">view matrix</span>': '') + 
+                                '</div></th>');
                     if (!encodeProject.isIE8()) {
                         // Suppress mouseOver under IE8 as QA noted flashing effect
                         $th.attr('title', dataType.description);
                     }
                     $tableHeaders.append($th);
 
                     // add colgroup element to support cross-hair hover effect
                     $thead.before('<colgroup class="experimentCol"></colgroup>');
                     maxLen = Math.max(maxLen, dataType.label.length);
                 }
             });
         });
+
+        // add click handler to navigate to Chip-seq matrix
+        $('#chipButton').click(function() {
+            window.open('encodeChipMatrixHuman.html', 'matrixWindow');
+        });
+
         // adjust size of headers based on longest label length
         // empirically len/2 em's is right
         $('#columnHeaders th').css('height', (String((maxLen/2 + 2)).concat('em')));
         $('#columnHeaders th').css('width', '1em');
 
         //also need to set additional width for non-IE
         if (!$.browser.msie) {
             $('.verticalText').css('width', '1em');
         }
     }
 
     function rowAddCells($row, dataGroups, dataTypeExps, matrix, cellType) {
         // populate a row in the matrix with cells for data groups and data types
         // null cellType indicates this is a row for a cell group (tier)