[model,bugfix][s]: correction for change introduced in last commit to move summary method from Record to Dataset.recordSummary.
This commit is contained in:
@@ -256,12 +256,13 @@ my.Dataset = Backbone.Model.extend({
|
||||
//
|
||||
// Get a simple html summary of a Dataset record in form of key/value list
|
||||
recordSummary: function(record) {
|
||||
var html = '';
|
||||
var html = '<div class="recline-record-summary">';
|
||||
this.fields.each(function(field) {
|
||||
if (field.id != 'id') {
|
||||
html += '<div><strong span="key">' + field.get('label') + '</strong>: ' + record.getFieldValue(field) + '</div>';
|
||||
html += '<div class="' + field.id + '"><strong>' + field.get('label') + '</strong>: ' + record.getFieldValue(field) + '</div>';
|
||||
}
|
||||
});
|
||||
html += '</div>';
|
||||
return html;
|
||||
},
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ my.Timeline = Backbone.View.extend({
|
||||
"startDate": start,
|
||||
"endDate": end,
|
||||
"headline": String(record.get('title') || ''),
|
||||
"text": record.get('description') || record.summary()
|
||||
"text": record.get('description') || this.model.recordSummary(record)
|
||||
};
|
||||
return tlEntry;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user