From 284e027e0b69442ad45a52a48966d317e33c71f4 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 26 Jun 2016 17:08:15 +0200 Subject: [PATCH] tune config --- config.jsonc | 19 +++++++++---------- static/js/infoView.urg.js | 26 +++++++++++++++++++------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/config.jsonc b/config.jsonc index b8dc72e..a861aaa 100644 --- a/config.jsonc +++ b/config.jsonc @@ -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": "+"}], diff --git a/static/js/infoView.urg.js b/static/js/infoView.urg.js index 9952aa3..b17c4d5 100644 --- a/static/js/infoView.urg.js +++ b/static/js/infoView.urg.js @@ -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( /' + Ox.parseURL(link).host + ''; + }).join(', '); + return ret; } else if (listKeys.indexOf(key) > -1) { ret = value.split(', '); } else {