`;
-
- if (value.TYPE == 'article')
+ entry += ``;
+ if (typeof value.TYPE !== 'undefined')
{
- entry += ``;
+ if (typeof value.TYPE == 'object')
+ {
+ // This entry has an array of types
+ for (var i = 0; i < value.TYPE.length; i++)
+ {
+ entry += this.doTypeIcon(value.TYPE[i]);
+ }
+ }
+ else
+ {
+ // This entry has a single type
+ entry += this.doTypeIcon(value.TYPE[i]);
+ }
}
- else if (value.TYPE == 'podcast')
- {
- entry += ``;
- }
- else if (value.TYPE == 'video')
- {
- entry += ``;
- }
- else if (value.TYPE == 'list')
- {
- entry += ``;
- }
- else if (value.TYPE == 'book')
- {
- entry += ``;
- }
- else if (value.TYPE == 'game')
- {
- entry += ``;
- }
- else if (value.TYPE == 'service')
- {
- entry += ``;
- }
- else if (value.TYPE == 'lecture')
- {
- entry += ``;
- }
- else if (value.TYPE == 'quote')
- {
- entry += ``;
- }
- else if (value.TYPE == 'tool')
- {
- entry += ``;
- }
- else if (value.TYPE == 'music')
- {
- entry += ``;
- }
- else if (value.TYPE == 'image')
- {
- entry += ``;
- }
- else if (value.TYPE == 'encyclopedia')
- {
- entry += ``;
- }
-
- entry += ``;
- }
+ entry += `
`; //griditem-typecontainer
}
// UPPER CONTENT END
@@ -326,6 +285,65 @@ function View()
this.grid.innerHTML += entry;
}
+ this.doTypeIcon = function(type, count)
+ {
+ let result = `