Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WEBUI JS: EPG: Do not show the clickable cursor and icon when filter …
…is already set
  • Loading branch information
perexg committed Sep 29, 2014
1 parent b528de6 commit 4fb0774
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions src/webui/static/app/epg.js
Expand Up @@ -288,6 +288,8 @@ tvheadend.epg = function() {

if (now.getTime() >= start.getTime())
meta.attr = 'style="font-weight:bold;' + extra + '"';
else if (extra)
meta.attr = 'style="' + extra + '"';
}

function renderDate(value, meta, record) {
Expand Down Expand Up @@ -331,7 +333,6 @@ tvheadend.epg = function() {

function renderTextLookup(value, meta, record) {
setMetaAttr(meta, record, value);

if (!value) return "";
return lookup + value;
}
Expand Down Expand Up @@ -371,7 +372,12 @@ tvheadend.epg = function() {
id: 'title',
header: "Title",
dataIndex: 'title',
renderer: renderTextLookup,
renderer: function(value, meta, record) {
var clickable = tvheadend.regexEscape(record.data['title']) !=
epgStore.baseParams.title;
setMetaAttr(meta, record, value && clickable);
return !value ? '' : (clickable ? lookup : '') + value;
},
listeners: { click: { fn: clicked } },
},
{
Expand Down Expand Up @@ -422,7 +428,12 @@ tvheadend.epg = function() {
id: 'channelName',
header: "Channel",
dataIndex: 'channelName',
renderer: renderTextLookup,
renderer: function(value, meta, record) {
var clickable = record.data['channelUuid'] !==
epgStore.baseParams.channel;
setMetaAttr(meta, record, value && clickable);
return !value ? '' : (clickable ? lookup : '') + value;
},
listeners: { click: { fn: clicked } },
},
{
Expand Down Expand Up @@ -450,9 +461,14 @@ tvheadend.epg = function() {
if (v)
r.push(v);
});
setMetaAttr(meta, record, r.length > 0);
var clickable = false;
if (r.length > 0 && vals[0]) {
var v = vals[0] & 0xf0;
clickable = v !== epgStore.baseParams.contentType;
}
setMetaAttr(meta, record, clickable);
if (r.length < 1) return "";
return lookup + r.join(',');
return (clickable ? lookup : '') + r.join(',');
},
listeners: { click: { fn: clicked } },
}
Expand Down

0 comments on commit 4fb0774

Please sign in to comment.