Skip to content
Snippets Groups Projects
Commit ee511af7 authored by aeschylus's avatar aeschylus Committed by GitHub
Browse files

Merge branch '2.4.0' into search-within

parents 22c559d1 537b0372
No related branches found
No related tags found
No related merge requests found
......@@ -169,7 +169,7 @@
var collectionLabel = within.label || collectionUrl;
return '<a href="' + collectionUrl + '" target="_blank">' + collectionLabel + '</a>';
} else if (within instanceof Array) {
return within.map(this.getWithin).join("<br/>");
return within.map(this.getWithin, this).join("<br/>");
} else {
return this.stringifyObject(within);
}
......
......@@ -85,7 +85,7 @@ describe('MetadataView', function() {
});
describe('renderWithin', function() {
it('should render simple strings as-sis', function() {
it('should render simple strings as-is', function() {
var within = "http://example.com";
expect(Mirador.MetadataView.prototype.getWithin(within)).toBe(within);
});
......@@ -110,5 +110,11 @@ describe('MetadataView', function() {
'<a href="http://example.com" target="_blank">foobar</a><br/>' +
'<a href="http://foo.org" target="_blank">barfoo</a>');
});
it('should render a list of strings <br/>-concatenated', function() {
var within = ['http://example.com/foo', 'http://example.com/bar'];
expect(Mirador.MetadataView.prototype.getWithin(within)).toBe(
'http://example.com/foo<br/>http://example.com/bar');
});
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment