forked from 0x2620/pandora
use same code path for document.title and item title in toolbar
This commit is contained in:
parent
d73dc8eb52
commit
acd70661d9
2 changed files with 14 additions and 18 deletions
|
@ -34,13 +34,7 @@ pandora.ui.item = function() {
|
|||
}
|
||||
|
||||
pandora.$ui.itemTitle
|
||||
.options({
|
||||
title: '<b>' + result.data.title
|
||||
+ (Ox.len(result.data.director)
|
||||
? ' (' + result.data.director.join(', ') + ')'
|
||||
: '')
|
||||
+ (result.data.year ? ' ' + result.data.year : '') + '</b>'
|
||||
})
|
||||
.options({title: '<b>' + pandora.getItemTitle(result.data) + '</b>'})
|
||||
.show();
|
||||
|
||||
// fixme: layers have value, subtitles has text?
|
||||
|
|
|
@ -822,17 +822,7 @@ pandora.getClipVideos = function(clip, resolution) {
|
|||
pandora.getDocumentTitle = function(itemData) {
|
||||
var parts = [pandora.site.site.name];
|
||||
if (itemData) {
|
||||
itemTitles[pandora.user.ui.item] = Ox.decodeHTMLEntities(
|
||||
(itemData.title || Ox._('Untitled')) + (
|
||||
Ox.len(itemData.director) || itemData.year
|
||||
? ' (' + (
|
||||
Ox.len(itemData.director)
|
||||
? itemData.director
|
||||
: [Ox._('Unknown Director')]
|
||||
).join(', ') + ')'
|
||||
: ''
|
||||
) + (itemData.year ? ' ' + itemData.year : '')
|
||||
);
|
||||
itemTitles[pandora.user.ui.item] = Ox.decodeHTMLEntities(pandora.getItemTitle(itemData));
|
||||
}
|
||||
if (pandora.user.ui.section == 'items') {
|
||||
if (!pandora.user.ui.item) {
|
||||
|
@ -1120,6 +1110,18 @@ pandora.getItemIdAndPosition = function() {
|
|||
return ret;
|
||||
}
|
||||
|
||||
pandora.getItemTitle = function(itemData) {
|
||||
return (itemData.title || Ox._('Untitled')) + (
|
||||
Ox.len(itemData.director) || itemData.year
|
||||
? ' (' + (
|
||||
Ox.len(itemData.director)
|
||||
? itemData.director
|
||||
: [Ox._('Unknown Director')]
|
||||
).join(', ') + ')'
|
||||
: ''
|
||||
) + (itemData.year ? ' ' + itemData.year : '')
|
||||
};
|
||||
|
||||
pandora.getLargeClipTimelineURL = function(item, inPoint, outPoint, type, callback) {
|
||||
var fps = 25,
|
||||
width = Math.floor((outPoint - inPoint) * fps),
|
||||
|
|
Loading…
Reference in a new issue