Skip to content

Commit

Permalink
check label is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
edsilv committed Oct 24, 2016
1 parent dbe79b1 commit ce83ceb
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 21 deletions.
7 changes: 5 additions & 2 deletions dist/iiif-metadata-component.bundle.js

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions dist/iiif-metadata-component.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@ body {
font-family: Sans-Serif;
padding: 20px;
}
.iiif-metadata-component .noData {
padding: 0 10px 20px 10px;
}
.iiif-metadata-component .groups .group .header {
font-weight: bold;
}
.iiif-metadata-component .groups .group .items {
padding: 0 10px 20px 10px;
}
.iiif-metadata-component .groups .group .items .header {
color: #14a4c3;
border-bottom: 1px solid #14a4c3;
Expand Down
2 changes: 1 addition & 1 deletion dist/iiif-metadata-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ var IIIFComponents;
var $label = $metadataItem.find('.label');
var $values = $metadataItem.find('.values');
var label = item.getLabel();
if (item.isRootLevel) {
if (label && item.isRootLevel) {
switch (label.toLowerCase()) {
case "attribution":
label = this.options.content.attribution;
Expand Down
2 changes: 1 addition & 1 deletion dist/iiif-metadata-component.min.js

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions examples/css/iiif-metadata-component.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@ body {
font-family: Sans-Serif;
padding: 20px;
}
.iiif-metadata-component .noData {
padding: 0 10px 20px 10px;
}
.iiif-metadata-component .groups .group .header {
font-weight: bold;
}
.iiif-metadata-component .groups .group .items {
padding: 0 10px 20px 10px;
}
.iiif-metadata-component .groups .group .items .header {
color: #14a4c3;
border-bottom: 1px solid #14a4c3;
Expand Down
2 changes: 1 addition & 1 deletion examples/js/iiif-metadata-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ var IIIFComponents;
var $label = $metadataItem.find('.label');
var $values = $metadataItem.find('.values');
var label = item.getLabel();
if (item.isRootLevel) {
if (label && item.isRootLevel) {
switch (label.toLowerCase()) {
case "attribution":
label = this.options.content.attribution;
Expand Down
5 changes: 4 additions & 1 deletion examples/js/manifold.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2246,7 +2246,10 @@ var Manifesto;
TranslationCollection.parse = function (translation, defaultLocale) {
var tc = [];
var t;
if (_isArray(translation)) {
if (!translation) {
return tc;
}
else if (_isArray(translation)) {
for (var i = 0; i < translation.length; i++) {
var value = translation[i];
if (_isString(value)) {
Expand Down
2 changes: 1 addition & 1 deletion src/MetadataComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ namespace IIIFComponents {

var label: string = item.getLabel();

if (item.isRootLevel) {
if (label && item.isRootLevel) {
switch (label.toLowerCase()) {
case "attribution":
label = this.options.content.attribution;
Expand Down
3 changes: 1 addition & 2 deletions src/css/iiif-metadata-component.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.iiif-metadata-component{

.noData{
padding: 0 @padding-medium-horizontal (@padding-medium-vertical * 2) @padding-medium-horizontal;

}

.groups {
Expand All @@ -13,7 +13,6 @@
}

.items{
padding: 0 @padding-medium-horizontal (@padding-medium-vertical * 2) @padding-medium-horizontal;

.header {
color: @brand-secondary;
Expand Down

0 comments on commit ce83ceb

Please sign in to comment.