5 |
5 |
/**
|
6 |
6 |
*
|
7 |
7 |
*/
|
|
8 |
|
|
9 |
// Function to support some of the label formatting used with kodi
|
|
10 |
tvheadend.labelFormatting = function(description) {
|
|
11 |
return description.replace(/\[COLOR\s(.*?)\]/g, '<font style="color:$1">')
|
|
12 |
.replace(/\[\/COLOR\]/g, '<\/font>')
|
|
13 |
.replace(/\[B\]/g, '<b>')
|
|
14 |
.replace(/\[\/B\]/g, '<\/b>')
|
|
15 |
.replace(/\[I\]/g, '<i>')
|
|
16 |
.replace(/\[CR\]/g, '<br>')
|
|
17 |
.replace(/\[\/I\]/g, '<\/i>')
|
|
18 |
.replace(/(?<=\[UPPERCASE\])(.*)(?=\[\/UPPERCASE\])/g, function(match) {return match.toUpperCase();})
|
|
19 |
.replace(/\[UPPERCASE\]/g, '')
|
|
20 |
.replace(/\[\/UPPERCASE\]/g, '')
|
|
21 |
.replace(/(?<=\[LOWERCASE\])(.*)(?=\[\/LOWERCASE\])/g, function(match) {return match.toLowerCase();})
|
|
22 |
.replace(/\[LOWERCASE\]/g, '')
|
|
23 |
.replace(/\[\/LOWERCASE\]/g, '')
|
|
24 |
.replace(/(?<=\[CAPITALIZE\])(.*)(?=\[\/CAPITALIZE\])/g, function(match) {return match.split(/\s+/).map(w => w[0].toUpperCase() + w.slice(1)).join(' ');})
|
|
25 |
.replace(/\[CAPITALIZE\]/g, '')
|
|
26 |
.replace(/\[\/CAPITALIZE\]/g, '');
|
|
27 |
};
|
|
28 |
|
8 |
29 |
tvheadend.dvrDetails = function(uuid) {
|
9 |
30 |
|
10 |
31 |
function showit(d) {
|
... | ... | |
79 |
100 |
if (summary && (!subtitle || subtitle != summary))
|
80 |
101 |
content += '<div class="x-epg-summary">' + summary + '</div>';
|
81 |
102 |
if (desc) {
|
82 |
|
content += '<div class="x-epg-desc">' + desc + '</div>';
|
|
103 |
content += '<div class="x-epg-desc">' + tvheadend.labelFormatting(desc) + '</div>';
|
83 |
104 |
content += '<hr class="x-epg-hr"/>';
|
84 |
105 |
}
|
85 |
106 |
content += tvheadend.getDisplayCredits(credits);
|
... | ... | |
124 |
145 |
encodeURIComponent(title)+'&searchseriesid=&tab=listseries&function=Search','_blank');
|
125 |
146 |
}
|
126 |
147 |
|
|
148 |
var windowHeight = Ext.getBody().getViewSize().height - 100;
|
|
149 |
|
127 |
150 |
var win = new Ext.Window({
|
128 |
151 |
title: title,
|
129 |
152 |
iconCls: 'info',
|
130 |
153 |
layout: 'fit',
|
131 |
154 |
width: 650,
|
132 |
|
height: 450,
|
|
155 |
height: windowHeight, //450
|
133 |
156 |
constrainHeader: true,
|
134 |
157 |
buttonAlign: 'center',
|
|
158 |
autoScroll: true,
|
135 |
159 |
buttons: buttons,
|
136 |
160 |
html: content
|
137 |
161 |
});
|