tune config

This commit is contained in:
j 2016-06-26 17:08:15 +02:00
parent 4bc4e34272
commit 284e027e0b
2 changed files with 28 additions and 17 deletions

View File

@ -202,14 +202,6 @@
"sort": true,
"sortType": "title"
},
{
"id": "archiveid",
"title": "Archive ID",
"type": "string",
"columnWidth": 120,
"find": true,
"sort": true
},
{
"id": "location",
"title": "Location",
@ -369,6 +361,13 @@
"type": "text",
"find": true
},
{
"id": "links",
"title": "Links",
"type": ["string"],
"columnWidth": 180,
"find": true
},
{
"id": "comments",
"title": "Comments",
@ -913,7 +912,7 @@
"clipColumns": 2,
"columns": {
"Colors": {
"columns": ["title", "depositor", "collection", "language", "hue", "saturation", "brightness"],
"columns": ["title", "depositor", "themes", "language", "hue", "saturation", "brightness"],
"columnWidth": {}
}
},
@ -953,7 +952,7 @@
"itemFind": "",
"itemSort": [{"key": "position", "operator": "+"}],
"itemView": "info",
"listColumns": ["title", "depositor", "collection", "topic", "language", "duration"],
"listColumns": ["title", "depositor", "themes", "topic", "language", "duration"],
"listColumnWidth": {},
"listSelection": [],
"listSort": [{"key": "title", "operator": "+"}],

View File

@ -18,11 +18,16 @@ pandora.ui.infoView = function(data) {
iconLeft = iconSize == 256 ? Math.floor((iconSize - iconWidth) / 2) : 0,
borderRadius = ui.icons == 'posters' ? 0 : iconSize / 8,
margin = 16,
nameKeys = [
'director', 'cinematographer', 'editor',
'writer', 'producer', 'featuring'
],
listKeys = nameKeys.concat(['language', 'themes', 'groups']),
nameKeys = pandora.site.itemKeys.filter(function(key) {
return key.sortType == 'person';
}).map(function(key) {
return key.id;
}),
listKeys = pandora.site.itemKeys.filter(function(key) {
return Ox.isArray(key.type);
}).map(function(key){
return key.id;
}),
posterKeys = nameKeys.concat(['title', 'date', 'collection']),
statisticsWidth = 128,
@ -231,7 +236,7 @@ pandora.ui.infoView = function(data) {
// Groups ------------------------------------------------------------------
renderGroup(['location', 'date', 'language', 'format', 'archiveid']);
renderGroup(['location', 'date', 'language', 'format']);
renderGroup([
'director', 'cinematographer', 'editor',
@ -240,6 +245,8 @@ pandora.ui.infoView = function(data) {
renderGroup(['themes']);
renderGroup(['links']);
// Summary -------------------------------------------------------------
if (canEdit || data.summary) {
@ -256,7 +263,7 @@ pandora.ui.infoView = function(data) {
format: function(value) {
return value.replace(
/<img src=/g,
'<img style="float: left; max-width: 256px; max-height: 256px; margin: 0 16px 16px 0" src='
'<img style="max-width: 256px; max-height: 256px; margin: 0 16px 16px 0" src='
);
},
maxHeight: Infinity,
@ -577,6 +584,11 @@ pandora.ui.infoView = function(data) {
ret = value ? Ox.formatDate(value,
['', '%Y', '%B %Y', '%B %e, %Y'][value.split('-').length]
) : '';
} else if (key == 'links') {
ret = value.split(', ').map(function(link) {
return '<a href="' + link + '">' + Ox.parseURL(link).host + '</a>';
}).join(', ');
return ret;
} else if (listKeys.indexOf(key) > -1) {
ret = value.split(', ');
} else {