Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WEBUI: Fix the top information (CSV parsing)
  • Loading branch information
perexg committed Oct 26, 2015
1 parent 1e63698 commit f61e259
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/webui/static/app/tvheadend.js
Expand Up @@ -15,6 +15,19 @@ tvheadend.regexEscape = function(s) {
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
}

tvheadend.fromCSV = function(s) {
var a = s.split(',');
var r = [];
for (var i in a) {
var v = a[i];
if (v[0] == '"' && v[v.length-1] == '"')
r.push(v.substring(1, v.length - 1));
else
r.push(v);
}
return r;
}

/**
* Displays a help popup window
*/
Expand Down Expand Up @@ -627,7 +640,7 @@ tvheadend.RootTabPanel = Ext.extend(Ext.TabPanel, {
},

setInfoArea: function(info_area) {
this.info_area = info_area.split(',');
this.info_area = tvheadend.fromCSV(info_area);
this.on('beforetabchange', function(tp, p) {
for (var k in this.extra)
if (p == this.extra[k])
Expand Down

0 comments on commit f61e259

Please sign in to comment.