commit/galaxy-central: guerler: Trackster: Fix cell content if metadata is inconsistent
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/a1c04a1b716a/ Changeset: a1c04a1b716a User: guerler Date: 2013-10-03 19:11:43 Summary: Trackster: Fix cell content if metadata is inconsistent Affected #: 1 file diff -r e55c7a4a88e076f163949381937d38d11e48c74a -r a1c04a1b716a2c83f821b08f5ca18ace27fcfe21 static/scripts/mvc/data.js --- a/static/scripts/mvc/data.js +++ b/static/scripts/mvc/data.js @@ -179,17 +179,17 @@ // -- Helper functions. -- _renderCell: function(cell_contents, index, colspan) { + var $cell = $('<td>').text(cell_contents); var column_types = this.model.get_metadata('column_types'); if (colspan !== undefined) { - return $('<td>').attr('colspan', colspan).addClass('stringalign').text(cell_contents); + $cell.attr('colspan', colspan).addClass('stringalign'); + } else if (index < column_types.length) { + if (column_types[index] === 'str' || column_types === 'list') { + /* Left align all str columns, right align the rest */ + $cell.addClass('stringalign'); + } } - else if (column_types[index] === 'str' || column_types === 'list') { - /* Left align all str columns, right align the rest */ - return $('<td>').addClass('stringalign').text(cell_contents); - } - else { - return $('<td>').text(cell_contents); - } + return $cell; }, _renderRow: function(line) { 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)
-
commits-noreply@bitbucket.org