forked from 0x2620/pandora
indiancine.ma: rename notes to comments, add layer item keys for find
This commit is contained in:
parent
3ed3f9c882
commit
f47e67559f
3 changed files with 28 additions and 11 deletions
|
@ -391,11 +391,29 @@
|
|||
"sort": true
|
||||
},
|
||||
{
|
||||
"id": "notes",
|
||||
"title": "Notes",
|
||||
"id": "comments",
|
||||
"title": "Comments",
|
||||
"type": "text",
|
||||
"capability": "canEditMetadata"
|
||||
},
|
||||
{
|
||||
"id": "annotations",
|
||||
"title": "Annotations",
|
||||
"type": "string", // fixme: not the best type for this magic key
|
||||
"find": true
|
||||
},
|
||||
{
|
||||
"id": "keywords",
|
||||
"title": "Keywords",
|
||||
"type": "layer",
|
||||
"find": true
|
||||
},
|
||||
{
|
||||
"id": "notes",
|
||||
"title": "Notes",
|
||||
"type": "layer",
|
||||
"find": true
|
||||
},
|
||||
{
|
||||
"id": "subtitles",
|
||||
"title": "Subtitles",
|
||||
|
@ -544,8 +562,7 @@
|
|||
"id": "filename",
|
||||
"title": "Filename",
|
||||
"type": ["string"],
|
||||
"capability": "canSeeFiles",
|
||||
"find": true
|
||||
"capability": "canSeeFiles"
|
||||
},
|
||||
{
|
||||
"id": "created",
|
||||
|
|
|
@ -263,7 +263,7 @@
|
|||
{
|
||||
"id": "annotations",
|
||||
"title": "Annotations",
|
||||
"type": "string",
|
||||
"type": "string", // fixme: not the best type for this magic key
|
||||
"find": true
|
||||
},
|
||||
{
|
||||
|
|
|
@ -400,14 +400,14 @@ pandora.ui.infoView = function(data) {
|
|||
.appendTo($statistics);
|
||||
renderRightsLevel();
|
||||
|
||||
// Notes -------------------------------------------------------------------
|
||||
// Comments ----------------------------------------------------------------
|
||||
|
||||
if (canEdit) {
|
||||
|
||||
$('<div>')
|
||||
.css({marginBottom: '4px'})
|
||||
.append(
|
||||
formatKey('Notes', 'statistics').options({
|
||||
formatKey('Comments', 'statistics').options({
|
||||
tooltip: 'Only '
|
||||
+ Object.keys(pandora.site.capabilities.canEditMetadata).map(function(level, i) {
|
||||
return (
|
||||
|
@ -416,23 +416,23 @@ pandora.ui.infoView = function(data) {
|
|||
: ' and '
|
||||
) + Ox.toTitleCase(level)
|
||||
}).join('')
|
||||
+ ' can see and edit these notes'
|
||||
+ ' can see and edit these comments'
|
||||
})
|
||||
)
|
||||
.append(
|
||||
Ox.EditableContent({
|
||||
clickLink: pandora.clickLink,
|
||||
placeholder: formatLight('No notes'),
|
||||
placeholder: formatLight('No comments'),
|
||||
tooltip: pandora.getEditTooltip(),
|
||||
type: 'textarea',
|
||||
value: data.notes,
|
||||
value: data.comments,
|
||||
width: 128
|
||||
})
|
||||
.bindEvent({
|
||||
submit: function(event) {
|
||||
pandora.api.edit({
|
||||
id: data.id,
|
||||
notes: event.value
|
||||
comments: event.value
|
||||
}, function(result) {
|
||||
// ...
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue