Skip to content

Commit

Permalink
timwis#66 add check for blank description
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Silverberg committed Jan 18, 2016
1 parent 4f9b469 commit 4fcbddc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/scripts/collections/socrata-fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ module.exports = Backbone.Collection.extend({
},
parse: function (response) {
return response.columns.map(function (row, key) {
var titleForRow = row.name
if(!_.isEmpty(row.description)){
titleForRow += ' <span class="fa fa-info-circle" data-toggle="tooltip" data-placement="top" title="'+row.description+'"></span>'
}
return {
data: row.fieldName,
title: row.name + ' <span class="fa fa-info-circle" data-toggle="tooltip" data-placement="top" title="'+row.description+'"></span>',
title: titleForRow,
type: this.typeMap[row.renderTypeName] || this.typeMap.default,
defaultContent: '',
description: row.description
Expand Down

0 comments on commit 4fcbddc

Please sign in to comment.