From 0cbee5849973ee767a6a0b1c7abec4eb2515ea84 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 9 Feb 2014 12:15:18 +0000 Subject: [PATCH] home.js: fix condition for type prefix of titles --- static/js/home.indiancinema.js | 12 ++++++++++-- static/js/home.padma.js | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/static/js/home.indiancinema.js b/static/js/home.indiancinema.js index aea9f0ba3..bc6c9510c 100644 --- a/static/js/home.indiancinema.js +++ b/static/js/home.indiancinema.js @@ -534,7 +534,11 @@ pandora.ui.home = function() { .appendTo($featuresContent); $featureIcon[i] = Ox.Element({ element: '', - tooltip: (lists && texts ? Ox._(Ox.toTitleCase(item.type)) + ': ' : '') + tooltip: ( + (lists && edits) || (lists && texts) || (edits && texts) + ? Ox._(Ox.toTitleCase(item.type)) + ': ' + : '' + ) + Ox.encodeHTMLEntities(item.name) }) .attr({ @@ -591,7 +595,11 @@ pandora.ui.home = function() { function getHTML(item) { return '' - + (lists && texts ? Ox._(Ox.toTitleCase(item.type)) + ': ' : '') + + ( + (lists && edits) || (lists && texts) || (edits && texts) + ? Ox._(Ox.toTitleCase(item.type)) + ': ' + : '' + ) + Ox.encodeHTMLEntities(item.name) + '

' + item.description; } diff --git a/static/js/home.padma.js b/static/js/home.padma.js index cf5085401..41dee30de 100644 --- a/static/js/home.padma.js +++ b/static/js/home.padma.js @@ -506,7 +506,11 @@ pandora.ui.home = function() { .appendTo($featuresContent); $featureIcon[i] = Ox.Element({ element: '', - tooltip: (lists && texts ? Ox._(Ox.toTitleCase(item.type)) + ': ' : '') + tooltip: ( + (lists && edits) || (lists && texts) || (edits && texts) + ? Ox._(Ox.toTitleCase(item.type)) + ': ' + : '' + ) + Ox.encodeHTMLEntities(item.name) }) .attr({ @@ -563,7 +567,11 @@ pandora.ui.home = function() { function getHTML(item) { return '' - + (lists && texts ? Ox._(Ox.toTitleCase(item.type)) + ': ' : '') + + ( + (lists && edits) || (lists && texts) || (edits && texts) + ? Ox._(Ox.toTitleCase(item.type)) + ': ' + : '' + ) + Ox.encodeHTMLEntities(item.name) + '

' + item.description; }