forked from 0x2620/pandora
update indiancinema info view and config
This commit is contained in:
parent
52e62e7665
commit
e785cdb937
2 changed files with 13 additions and 7 deletions
|
@ -15,7 +15,7 @@
|
|||
"cantPlay": {
|
||||
"icon": "NoCopyright",
|
||||
"link": "/rights",
|
||||
"text": "This film is not out of copyright yet, come back in 60 years"
|
||||
"text": "This movie is still under copyright."
|
||||
},
|
||||
/*
|
||||
Capabilities are per user level.
|
||||
|
@ -41,7 +41,7 @@
|
|||
"canManagePlacesAndEvents": {"student": true, "staff": true, "admin": true},
|
||||
"canManageTitlesAndNames": {"student": true, "staff": true, "admin": true},
|
||||
"canManageUsers": {"staff": true, "admin": true},
|
||||
"canPlayClips": {"guest": 1, "member": 1, "student": 3, "staff": 3, "admin": 3},
|
||||
"canPlayClips": {"guest": 3, "member": 3, "student": 3, "staff": 3, "admin": 3},
|
||||
"canPlayVideo": {"guest": 1, "member": 1, "student": 3, "staff": 3, "admin": 3},
|
||||
"canRemoveItems": {"staff": true, "admin": true},
|
||||
"canSeeAccessed": {"student": true, "staff": true, "admin": true},
|
||||
|
|
|
@ -403,9 +403,13 @@ pandora.ui.infoView = function(data) {
|
|||
if (key == 'title') {
|
||||
Ox.extend(edit, parseTitle(value));
|
||||
} else if (key == 'alternativeTitles') {
|
||||
edit[key] = value ? value.split(', ').map(function(value) {
|
||||
edit[key] = value ? value.split('; ').map(function(value) {
|
||||
return [value, []];
|
||||
}) : [];
|
||||
} else if (key == 'year') {
|
||||
edit[key] = value ? parseInt(value) : '';
|
||||
} else if (key == 'runtime') {
|
||||
edit[key] = value ? parseInt(value) * 60 : '';
|
||||
} else if (listKeys.indexOf(key) > -1) {
|
||||
edit[key] = value ? value.split(', ') : [];
|
||||
} else {
|
||||
|
@ -498,9 +502,7 @@ pandora.ui.infoView = function(data) {
|
|||
|
||||
function formatValue(key, value) {
|
||||
var ret;
|
||||
if (key == 'runtime') {
|
||||
ret = Math.round(data[key] / 60) + ' min';
|
||||
} else if (key == 'imdbId') {
|
||||
if (key == 'imdbId') {
|
||||
ret = '<a href="http://www.imdb.com/title/tt'
|
||||
+ value + '">' + value + '</a>';
|
||||
} else if (nameKeys.indexOf(key) > -1) {
|
||||
|
@ -555,7 +557,8 @@ pandora.ui.infoView = function(data) {
|
|||
return !value ? ''
|
||||
: key == 'alternativeTitles' ? value.map(function(value) {
|
||||
return value[0];
|
||||
}).join(', ')
|
||||
}).join('; ')
|
||||
: key == 'runtime' ? Math.round(value / 60)
|
||||
: Ox.contains(listKeys, key) ? value.join(', ')
|
||||
: value;
|
||||
}
|
||||
|
@ -716,6 +719,9 @@ pandora.ui.infoView = function(data) {
|
|||
}
|
||||
})
|
||||
.appendTo($element);
|
||||
if (key == 'runtime') {
|
||||
$('<span>').html(' min').appendTo($element);
|
||||
}
|
||||
}
|
||||
});
|
||||
$element.appendTo($text);
|
||||
|
|
Loading…
Reference in a new issue