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

View file

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