indiancine.ma: rename notes to comments, add layer item keys for find

This commit is contained in:
rolux 2013-03-09 12:42:43 +05:30
parent 3ed3f9c882
commit f47e67559f
3 changed files with 28 additions and 11 deletions

View file

@ -391,11 +391,29 @@
"sort": true "sort": true
}, },
{ {
"id": "notes", "id": "comments",
"title": "Notes", "title": "Comments",
"type": "text", "type": "text",
"capability": "canEditMetadata" "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", "id": "subtitles",
"title": "Subtitles", "title": "Subtitles",
@ -544,8 +562,7 @@
"id": "filename", "id": "filename",
"title": "Filename", "title": "Filename",
"type": ["string"], "type": ["string"],
"capability": "canSeeFiles", "capability": "canSeeFiles"
"find": true
}, },
{ {
"id": "created", "id": "created",

View file

@ -263,7 +263,7 @@
{ {
"id": "annotations", "id": "annotations",
"title": "Annotations", "title": "Annotations",
"type": "string", "type": "string", // fixme: not the best type for this magic key
"find": true "find": true
}, },
{ {

View file

@ -400,14 +400,14 @@ pandora.ui.infoView = function(data) {
.appendTo($statistics); .appendTo($statistics);
renderRightsLevel(); renderRightsLevel();
// Notes ------------------------------------------------------------------- // Comments ----------------------------------------------------------------
if (canEdit) { if (canEdit) {
$('<div>') $('<div>')
.css({marginBottom: '4px'}) .css({marginBottom: '4px'})
.append( .append(
formatKey('Notes', 'statistics').options({ formatKey('Comments', 'statistics').options({
tooltip: 'Only ' tooltip: 'Only '
+ Object.keys(pandora.site.capabilities.canEditMetadata).map(function(level, i) { + Object.keys(pandora.site.capabilities.canEditMetadata).map(function(level, i) {
return ( return (
@ -416,23 +416,23 @@ pandora.ui.infoView = function(data) {
: ' and ' : ' and '
) + Ox.toTitleCase(level) ) + Ox.toTitleCase(level)
}).join('') }).join('')
+ ' can see and edit these notes' + ' can see and edit these comments'
}) })
) )
.append( .append(
Ox.EditableContent({ Ox.EditableContent({
clickLink: pandora.clickLink, clickLink: pandora.clickLink,
placeholder: formatLight('No notes'), placeholder: formatLight('No comments'),
tooltip: pandora.getEditTooltip(), tooltip: pandora.getEditTooltip(),
type: 'textarea', type: 'textarea',
value: data.notes, value: data.comments,
width: 128 width: 128
}) })
.bindEvent({ .bindEvent({
submit: function(event) { submit: function(event) {
pandora.api.edit({ pandora.api.edit({
id: data.id, id: data.id,
notes: event.value comments: event.value
}, function(result) { }, function(result) {
// ... // ...
}); });