home.js: fix condition for type prefix of titles

This commit is contained in:
rolux 2014-02-09 12:15:18 +00:00
parent 58e787efd7
commit 0cbee58499
2 changed files with 20 additions and 4 deletions

View file

@ -534,7 +534,11 @@ pandora.ui.home = function() {
.appendTo($featuresContent); .appendTo($featuresContent);
$featureIcon[i] = Ox.Element({ $featureIcon[i] = Ox.Element({
element: '<img>', element: '<img>',
tooltip: (lists && texts ? Ox._(Ox.toTitleCase(item.type)) + ': ' : '') tooltip: (
(lists && edits) || (lists && texts) || (edits && texts)
? Ox._(Ox.toTitleCase(item.type)) + ': '
: ''
)
+ Ox.encodeHTMLEntities(item.name) + Ox.encodeHTMLEntities(item.name)
}) })
.attr({ .attr({
@ -591,7 +595,11 @@ pandora.ui.home = function() {
function getHTML(item) { function getHTML(item) {
return '<b>' return '<b>'
+ (lists && texts ? Ox._(Ox.toTitleCase(item.type)) + ': ' : '') + (
(lists && edits) || (lists && texts) || (edits && texts)
? Ox._(Ox.toTitleCase(item.type)) + ': '
: ''
)
+ Ox.encodeHTMLEntities(item.name) + '</b><br><br>' + Ox.encodeHTMLEntities(item.name) + '</b><br><br>'
+ item.description; + item.description;
} }

View file

@ -506,7 +506,11 @@ pandora.ui.home = function() {
.appendTo($featuresContent); .appendTo($featuresContent);
$featureIcon[i] = Ox.Element({ $featureIcon[i] = Ox.Element({
element: '<img>', element: '<img>',
tooltip: (lists && texts ? Ox._(Ox.toTitleCase(item.type)) + ': ' : '') tooltip: (
(lists && edits) || (lists && texts) || (edits && texts)
? Ox._(Ox.toTitleCase(item.type)) + ': '
: ''
)
+ Ox.encodeHTMLEntities(item.name) + Ox.encodeHTMLEntities(item.name)
}) })
.attr({ .attr({
@ -563,7 +567,11 @@ pandora.ui.home = function() {
function getHTML(item) { function getHTML(item) {
return '<b>' return '<b>'
+ (lists && texts ? Ox._(Ox.toTitleCase(item.type)) + ': ' : '') + (
(lists && edits) || (lists && texts) || (edits && texts)
? Ox._(Ox.toTitleCase(item.type)) + ': '
: ''
)
+ Ox.encodeHTMLEntities(item.name) + '</b><br><br>' + Ox.encodeHTMLEntities(item.name) + '</b><br><br>'
+ item.description; + item.description;
} }