forked from 0x2620/pandora
padma info view
This commit is contained in:
parent
bf73eeabb5
commit
937b8c6b50
2 changed files with 60 additions and 44 deletions
|
@ -25,7 +25,8 @@
|
|||
"canSeeDebugMenu": {"staff": true, "admin": true},
|
||||
"canSeeFiles": {"staff": true, "admin": true},
|
||||
"canSeeItem": {"guest": 1, "member": 1, "staff": 4, "admin": 4},
|
||||
"canSeeExtraItemViews": {"friend": true, "staff": true, "admin": true}
|
||||
"canSeeExtraItemViews": {"friend": true, "staff": true, "admin": true},
|
||||
"canSendMail": {"staff": true, "admin": true}
|
||||
},
|
||||
/*
|
||||
clipKeys are the properties that clips can by sorted by.
|
||||
|
@ -45,6 +46,7 @@
|
|||
{"id": "collection", "title": "Collection", "type": "string"},
|
||||
{"id": "source", "title": "Source", "type": "string"},
|
||||
{"id": "director", "title": "Director", "type": "string"},
|
||||
{"id": "cinematographer", "title": "Cinematographer", "type": "string"},
|
||||
{"id": "places", "title": "Places", "type": "string"},
|
||||
{"id": "year", "title": "Year", "type": "integer"},
|
||||
{"id": "language", "title": "Language", "type": "string"},
|
||||
|
@ -101,6 +103,16 @@
|
|||
"find": true,
|
||||
"sort": "person"
|
||||
},
|
||||
{
|
||||
"id": "cinematographer",
|
||||
"title": "Cinematographer",
|
||||
"type": ["string"],
|
||||
"autocomplete": true,
|
||||
"columnWidth": 180,
|
||||
"filter": true,
|
||||
"find": true,
|
||||
"sort": "person"
|
||||
},
|
||||
{
|
||||
"id": "name",
|
||||
"title": "Name",
|
||||
|
@ -491,7 +503,7 @@
|
|||
"listColumns": ["title", "director", "location", "collection", "language", "duration", "source"],
|
||||
"listColumnWidth": {},
|
||||
"listSelection": [],
|
||||
"listSort": [{"key": "director", "operator": "+"}],
|
||||
"listSort": [{"key": "title", "operator": "+"}],
|
||||
"listView": "grid",
|
||||
"lists": {},
|
||||
"mapFind": "",
|
||||
|
|
|
@ -169,7 +169,7 @@ pandora.ui.infoView = function(data) {
|
|||
.appendTo($text);
|
||||
|
||||
// Director ----------------------------------------------------------------
|
||||
|
||||
/*
|
||||
if (data.director || isEditable) {
|
||||
$('<div>')
|
||||
.css({
|
||||
|
@ -202,6 +202,7 @@ pandora.ui.infoView = function(data) {
|
|||
)
|
||||
.appendTo($text);
|
||||
}
|
||||
*/
|
||||
|
||||
// Country, Year, Language, Runtime ----------------------------------------
|
||||
/*
|
||||
|
@ -249,48 +250,7 @@ pandora.ui.infoView = function(data) {
|
|||
$('<div>').css(css).html(html.join('; ')).appendTo($text);
|
||||
}
|
||||
*/
|
||||
$('<div>').html('<br>').appendTo($text);
|
||||
[
|
||||
'language',
|
||||
'source',
|
||||
'collection',
|
||||
'category',
|
||||
'user',
|
||||
'location',
|
||||
'date',
|
||||
].forEach(function(key) {
|
||||
var $div = $('<div>')
|
||||
.appendTo($text);
|
||||
$('<div>')
|
||||
.html(
|
||||
formatKey({
|
||||
categorty: 'categories',
|
||||
user: 'contributor'
|
||||
}[key] || key).replace('</span>', ' </span>')
|
||||
)
|
||||
.appendTo($div);
|
||||
Ox.Editable({
|
||||
clickLink: pandora.clickLink,
|
||||
format: function(value) {
|
||||
return ['language', 'category'].indexOf(key) >= 0
|
||||
? formatValue(value.split(', '), key)
|
||||
: value;
|
||||
},
|
||||
placeholder: formatLight('unknown'),
|
||||
tooltip: 'Doubleclick to edit',
|
||||
value: ['language', 'category'].indexOf(key) >= 0
|
||||
? (data[key] || []).join(', ')
|
||||
: data[key] || ''
|
||||
})
|
||||
.bindEvent({
|
||||
submit: function(event) {
|
||||
editMetadata(key, event.value);
|
||||
}
|
||||
})
|
||||
.appendTo($div);
|
||||
});
|
||||
$('<div>')
|
||||
.append(formatKey('description'))
|
||||
.append(
|
||||
Ox.Editable({
|
||||
clickLink: pandora.clickLink,
|
||||
|
@ -307,6 +267,50 @@ pandora.ui.infoView = function(data) {
|
|||
)
|
||||
.appendTo($text);
|
||||
|
||||
var list_keys = ['language', 'category', 'director', 'cinematographer'];
|
||||
$('<div>').html('<br>').appendTo($text);
|
||||
[
|
||||
'date',
|
||||
'location',
|
||||
'director',
|
||||
'cinematographer',
|
||||
'language',
|
||||
'source',
|
||||
'collection',
|
||||
'category',
|
||||
'user',
|
||||
].forEach(function(key) {
|
||||
var $div = $('<div>')
|
||||
.appendTo($text);
|
||||
$('<div>')
|
||||
.html(
|
||||
formatKey({
|
||||
categorty: 'categories',
|
||||
user: 'contributor'
|
||||
}[key] || key).replace('</span>', ' </span>')
|
||||
)
|
||||
.appendTo($div);
|
||||
Ox.Editable({
|
||||
clickLink: pandora.clickLink,
|
||||
format: function(value) {
|
||||
return list_keys.indexOf(key) >= 0
|
||||
? formatValue(value.split(', '), key)
|
||||
: value;
|
||||
},
|
||||
placeholder: formatLight('unknown'),
|
||||
tooltip: 'Doubleclick to edit',
|
||||
value: list_keys.indexOf(key) >= 0
|
||||
? (data[key] || []).join(', ')
|
||||
: data[key] || ''
|
||||
})
|
||||
.bindEvent({
|
||||
submit: function(event) {
|
||||
editMetadata(key, event.value);
|
||||
}
|
||||
})
|
||||
.appendTo($div);
|
||||
});
|
||||
|
||||
$('<div>').css({height: '16px'}).appendTo($text);
|
||||
[
|
||||
'created',
|
||||
|
|
Loading…
Reference in a new issue