[model,refator][s]: reintroduce summary on Record object deprecating recordSummary on Dataset.
* Reverses change in 1dadc1106b
* Record now has fields attribute passed down from Dataset. This is needed in order to support summary method and also makes sense -- as pointed out by @zephod
* Update examples
This commit is contained in:
@@ -247,6 +247,22 @@ test('_normalizeRecordsAndFields', function () {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// =================================
|
||||
// Record
|
||||
|
||||
module("Model Record");
|
||||
|
||||
test('summary', function () {
|
||||
var dataset = new recline.Model.Dataset({
|
||||
records: [ {a: 1, b: 2} ]
|
||||
});
|
||||
var record = dataset.records.at(0);
|
||||
var out = record.summary();
|
||||
var exp = '<div class="recline-record-summary"><div class="a"><strong>a</strong>: 1</div><div class="b"><strong>b</strong>: 2</div></div>'
|
||||
equal(out, exp);
|
||||
});
|
||||
|
||||
// =================================
|
||||
// Query
|
||||
|
||||
|
||||
Reference in New Issue
Block a user