commit/galaxy-central: dannon: Updates to tabular chunked display to force text content of cells. (fixes VCF display)
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/80014059ed11/ changeset: 80014059ed11 user: dannon date: 2012-04-19 00:32:23 summary: Updates to tabular chunked display to force text content of cells. (fixes VCF display) affected #: 1 file diff -r 7d6c2846c3c11157d05beb4f216d4efe5abd443f -r 80014059ed11eee51551b143d56780be2d234068 templates/dataset/tabular_chunked.mako --- a/templates/dataset/tabular_chunked.mako +++ b/templates/dataset/tabular_chunked.mako @@ -15,46 +15,46 @@ function renderCell(cell_contents, index, colspan){ if (colspan !== undefined){ - return '<td colspan="'+ colspan + '" class="stringalign">' + cell_contents + '</td>'; + return $('<td>').attr('colspan', colspan).addClass('stringalign').text(cell_contents); } else if (DATASET_TYPES[index] == 'str'){ /* Left align all str columns, right align the rest */ - return '<td class="stringalign">'+ cell_contents + '</td>'; + return $('<td>').addClass('stringalign').text(cell_contents);; } else{ - return '<td>'+ cell_contents + '</td>'; + return $('<td>').text(cell_contents); } } function renderRow(line){ /* Check length of cells to ensure this is a complete row. */ var cells = line.split('\t'); - var rowstr = '<tr>'; + var row = $('<tr>'); if (cells.length == DATASET_COLS){ $.each(cells, function(index, cell_contents){ - rowstr += renderCell(cell_contents, index); + row.append(renderCell(cell_contents, index)); }); } else if(cells.length > DATASET_COLS){ /* SAM file or like format with optional metadata included */ $.each(cells.slice(0, DATASET_COLS -1), function(index, cell_contents){ - rowstr += renderCell(cell_contents, index); + row.append(renderCell(cell_contents, index)); }); - rowstr += renderCell(cells.slice(DATASET_COLS -1).join('\t'), DATASET_COLS-1); + row.append(renderCell(cells.slice(DATASET_COLS -1).join('\t'), DATASET_COLS-1)); } else if(DATASET_COLS > 5 && cells.length == DATASET_COLS - 1 ){ /* SAM file or like format with optional metadata missing */ $.each(cells, function(index, cell_contents){ - rowstr += renderCell(cell_contents, index); + row.append(renderCell(cell_contents, index)); }); - rowstr += '<td></td>'; + row.append($('<td>')); } else{ + /* SAM file or like format with optional metadata missing */ /* Comment line, just return the one cell*/ - rowstr += renderCell(line, 0, DATASET_COLS); + row.append(renderCell(line, 0, DATASET_COLS)); } - rowstr += '</tr>'; - return rowstr; + return row; } function fillTable(){ Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket