add itemtitle js
This commit is contained in:
parent
5d52b1e5f2
commit
a2b0d98092
1 changed files with 13 additions and 0 deletions
13
static/js/getItemTitle.ninetytwo.js
Normal file
13
static/js/getItemTitle.ninetytwo.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
pandora.getItemTitle = function(itemData, includeYear) {
|
||||||
|
return (itemData.title || Ox._('Untitled')) + (
|
||||||
|
Ox.len(itemData.author) || (includeYear && itemData.year)
|
||||||
|
? ' (' + (
|
||||||
|
Ox.len(itemData.author)
|
||||||
|
? itemData.author
|
||||||
|
: [Ox._('Unknown Author')]
|
||||||
|
).join(', ') + ')'
|
||||||
|
: ''
|
||||||
|
) + (includeYear && itemData.year ? ' ' + itemData.year : '')
|
||||||
|
};
|
Loading…
Reference in a new issue