diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0d20b64 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pyc diff --git a/config.jsonc b/config.jsonc index b8dc72e..6bd1afd 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", @@ -637,7 +636,7 @@ displayed at the top of the screen. This title can be customized by adding "/static/js/getItemTitle.SITENAME.js". */ - "itemTitleKeys": ["title", "director", "date"], + "itemTitleKeys": ["title", "director", "year"], /* "itemViews" is an ordered list of available item views. Implemented views are "info", "documents", "player", "editor", "timeline", "clips", "map", @@ -807,20 +806,20 @@ the system (from). */ "site": { - "description": "undercover research group video archive", + "description": "Activist Media Proxy", "email": { // E-mail address in contact form (to) - "contact": "contact@undercoverresearch.net", - "footer": "-- \nundercover research group - http://undercoverresearch.net", - "prefix": "undercover research group -", + "contact": "amp@spc.org", + "footer": "-- \nActivist Media Proxy - http://amp.0x2620.org", + "prefix": "Activist Media Proxy -", // E-mail address uses by the system (from) - "system": "system@undercoverresearch.net" + "system": "system@amp.0x2620.org" }, "https": false, - "id": "urg", - "name": "undercover research group", + "id": "amp", + "name": "Activist Media Proxy", "sendReferrer": true, - "url": "urg.0x2620.org" + "url": "amp.0x2620.org" }, /* "sitePages" defines the sections of the main site dialog. If "news" is @@ -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": {} } }, @@ -947,13 +946,13 @@ "find": {"conditions": [], "operator": "&"}, "followPlayer": true, "help": "", - "icons": "posters", + "icons": "frames", "infoIconSize": 256, "item": "", "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": "+"}], @@ -1021,7 +1020,7 @@ "sidebarSize": 256, "text": "", "texts": {}, - "theme": "oxmedium", + "theme": "oxlight", "updateAdvancedFindResults": false, "videoLoop": false, "videoMuted": false, diff --git a/install.py b/install.py index cf9bedb..01921a0 100755 --- a/install.py +++ b/install.py @@ -3,7 +3,7 @@ import os from os.path import join, abspath, basename, dirname -name = 'indymediauk' +name = 'amp' base = abspath(dirname(__file__)) os.chdir(base) @@ -12,7 +12,7 @@ for root, folders, files in os.walk(join(base, 'static')): src = join(root, f) target = src.replace(base, '/srv/pandora') rel_src = os.path.relpath(src, dirname(target)) - if os.path.exists(target): + if os.path.exists(target) or os.path.islink(target): os.unlink(target) os.symlink(rel_src, target) @@ -48,7 +48,7 @@ for root, folders, files in os.walk(join(base, 'scripts')): src = join(root, f) target = src.replace(base, '/srv/pandora') rel_src = os.path.relpath(src, dirname(target)) - if os.path.exists(target): + if os.path.exists(target) or os.path.islink(target): os.unlink(target) os.symlink(rel_src, target) diff --git a/static/js/home.urg.js b/static/js/home.amp.js similarity index 98% rename from static/js/home.urg.js rename to static/js/home.amp.js index b25f41a..f747288 100644 --- a/static/js/home.urg.js +++ b/static/js/home.amp.js @@ -24,7 +24,7 @@ pandora.ui.home = function() { left: 0, top: 0, right: 0, - bottom: '80px', + bottom: '160px', width: window.innerWidth + 'px', margin: 'auto', cursor: 'pointer' @@ -180,7 +180,7 @@ pandora.ui.home = function() { } }), $aboutButton = Ox.Button({ - title: Ox._('About {0}', [pandora.site.site.name]), + title: Ox._('{0}', [pandora.site.site.name]), width: 156 }) .css({ diff --git a/static/js/infoView.urg.js b/static/js/infoView.amp.js similarity index 95% rename from static/js/infoView.urg.js rename to static/js/infoView.amp.js index 9952aa3..d030280 100644 --- a/static/js/infoView.urg.js +++ b/static/js/infoView.amp.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) { @@ -253,12 +260,7 @@ pandora.ui.infoView = function(data) { clickLink: pandora.clickLink, collapseToEnd: false, editable: canEdit, - format: function(value) { - return value.replace( - /' + Ox.parseURL(link).host + ''; + }).join(', '); + return ret; } else if (listKeys.indexOf(key) > -1) { ret = value.split(', '); } else { @@ -682,6 +684,23 @@ pandora.ui.infoView = function(data) { }); } + function imageCSS(value) { + var $html = $('