update info view js files and config

This commit is contained in:
rlx 2017-12-15 13:53:01 +00:00
parent cf8d56135f
commit 0f086373a5
3 changed files with 74 additions and 50 deletions

View File

@ -170,18 +170,16 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
"type": "string",
"find": true,
"sort": true,
"sortType": "title",
"autocomplete": true,
"columnWidth": 256
},
{
"id": "version",
"operator": "+",
"title": "Ver",
"title": "Version",
"type": "string",
"find": true,
"sort": true,
"sortType": "title",
"autocomplete": true,
"columnWidth": 256
},
@ -221,15 +219,13 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
"columnWidth": 256
},
{
"id": "publisher",
"operator": "+",
"title": "Publisher",
"type": "string",
"id": "language",
"title": "Language",
"type": ["string"],
"columnWidth": 128,
"filter": true,
"find": true,
"sort": true,
"autocomplete": true,
"columnWidth": 256
"sort": true
},
{
"id": "place",
@ -248,15 +244,6 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
//"format": {"type": "date", "args": ["%a, %b %e, %Y"]},
"sort": true
},
{
"id": "language",
"title": "Language",
"type": ["string"],
"columnWidth": 128,
"filter": true,
"find": true,
"sort": true
},
{
"id": "keywords",
"title": "Keywords",
@ -275,6 +262,12 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
"sort": true,
"columnWidth": 256
},
{
"id": "notes",
"title": "Notes",
"type": "text",
"capability": "canEditMetadata"
},
{
"id": "id",
"operator": "+",
@ -538,8 +531,7 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
"columnRequired": true,
"columnWidth": 180,
"find": true,
"sort": true,
"sortType": "title"
"sort": true
},
{
"id": "version",
@ -550,15 +542,13 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
"columnRequired": true,
"columnWidth": 180,
"find": true,
"sort": true,
"sortType": "title"
"sort": true
},
{
"id": "name",
"title": "Name",
"type": ["string"],
"autocomplete": true,
"filter": true,
"find": true
},
{
@ -583,6 +573,15 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
"sort": true,
"sortType": "person"
},
{
"id": "language",
"title": "Language",
"type": ["string"],
"columnWidth": 128,
"filter": true,
"find": true,
"sort": true
},
{
"id": "location",
"title": "Location",
@ -607,16 +606,6 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
"find": true,
"sort": true
},
{
"id": "language",
"title": "Language",
"type": ["string"],
"autocomplete": true,
"columnWidth": 120,
"filter": true,
"find": true,
"sort": true
},
{
"id": "keywords",
"title": "Keywords",
@ -1055,18 +1044,17 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
the system (from).
*/
"site": {
"description": "We were fighting racism and fascism on the streets of London. We were trying to resist and survive the violent ethno-nationalism in Yugoslavia. Where were you in 92'? What political actions or groups were you involved in, in 1992? What were your modes of activism? What technologies were you using to communicate? Moving between the personal and the collective, between then and now, these questions will direct our visual and textual exploration of the MayDay Rooms archives.",
"description": "This is a demo of pan.do/ra - a free, open source media archive. It allows you to manage large, decentralized collections of video, to collaboratively create metadata and time-based annotations, and to serve your archive as a cutting-edge web application.",
"email": {
// E-mail address in contact form (to)
"contact": "system@1992archive.local",
"footer": "-- \npan.do/ra - https://1992archive.maydayrooms.org",
"prefix": "1992 News -",
"prefix": "pan.do/ra News -",
// E-mail address uses by the system (from)
"system": "system@1992archive.local"
},
"https": false,
"id": "ninetytwo",
"public": false,
"name": "1992archive",
"sendReferrer": true,
"url": "1992archive.maydayrooms.org"
@ -1321,7 +1309,7 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
"downloadFormat": "webm",
"formats": ["webm", "mp4"],
"previewRatio": 1.3333333333,
"resolutions": [240, 480],
"resolutions": [240, 1080],
"torrent": true
}
}

View File

@ -223,11 +223,13 @@ pandora.ui.documentInfoView = function(data) {
)
.appendTo($text);
// Director, Year and Country ----------------------------------------------
// Work, Author, etc. ------------------------------------------------------
renderGroup(['author', 'date', 'type']);
renderGroup(['version', 'versionauthor', 'work', 'workauthor']);
renderGroup(['publisher', 'place', 'series', 'edition', 'language']);
renderGroup(['work', 'version', 'type']);
renderGroup(['author', 'versionauthor']);
renderGroup(['place', 'date', 'language']);
renderGroup(['keywords']);
// Description -------------------------------------------------------------
@ -359,6 +361,41 @@ pandora.ui.documentInfoView = function(data) {
.appendTo($statistics);
renderRightsLevel();
// Notes -------------------------------------------------------------------
if (canEdit) {
$('<div>')
.css({marginBottom: '4px'})
.append(
formatKey('Notes', 'statistics').options({
tooltip: Ox._('Only {0} can see and edit these comments', [
Object.keys(pandora.site.capabilities.canEditMetadata).map(function(level, i) {
return (
i == 0 ? ''
: i < Ox.len(pandora.site.capabilities.canEditMetadata) - 1 ? ', '
: ' ' + Ox._('and') + ' '
) + Ox.toTitleCase(level)
}).join('')])
})
)
.append(
Ox.EditableContent({
height: 128,
placeholder: formatLight(Ox._('No notes')),
tooltip: pandora.getEditTooltip(),
type: 'textarea',
value: data.notes || '',
width: 128
})
.bindEvent({
submit: function(event) {
editMetadata('notes', event.value);
}
})
)
.appendTo($statistics);
}
function editMetadata(key, value) {
if (value != data[key]) {
var edit = {id: data.id};

View File

@ -225,16 +225,15 @@ pandora.ui.infoView = function(data) {
)
.appendTo($text);
// Author, Year and Country ----------------------------------------------
// Work, Author, etc. ------------------------------------------------------
renderGroup(['author', 'year', 'country']);
renderGroup(['version', 'versionauthor', 'work', 'workauthor']);
renderGroup(['work', 'version']);
renderGroup(['author', 'versionauthor']);
renderGroup(['location', 'date', 'language']);
// Featuring ----------------------------------------------
renderGroup(['keywords']);
renderGroup(['featuring']);
// Summary -----------------------------------------------------------------
// Description -------------------------------------------------------------
if (canEdit || data.summary) {
$('<div>')
@ -323,7 +322,7 @@ pandora.ui.infoView = function(data) {
.appendTo($statistics);
renderRightsLevel();
// Notes --------------------------------------------------------------------
// Notes -------------------------------------------------------------------
if (canEdit) {
$('<div>')