Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WEBUI JS: root panel cleanups, ancient file removal
  • Loading branch information
perexg committed Sep 8, 2014
1 parent 565004f commit 0fa4c91
Show file tree
Hide file tree
Showing 15 changed files with 119 additions and 748 deletions.
4 changes: 0 additions & 4 deletions src/webui/extjs.c
Expand Up @@ -153,10 +153,6 @@ extjs_root(http_connection_t *hc, const char *remain, void *opaque)
extjs_load(hq, "static/app/esfilter.js");
#if ENABLE_MPEGTS
extjs_load(hq, "static/app/mpegts.js");
#endif
extjs_load(hq, "static/app/iptv.js");
#if ENABLE_V4L
extjs_load(hq, "static/app/v4l.js");
#endif
#if ENABLE_TIMESHIFT
extjs_load(hq, "static/app/timeshift.js");
Expand Down
7 changes: 5 additions & 2 deletions src/webui/static/app/acleditor.js
Expand Up @@ -2,16 +2,19 @@
* Access Control
*/

tvheadend.acleditor = function(panel)
tvheadend.acleditor = function(panel, index)
{
panel = new Ext.TabPanel({
panel2 = new Ext.TabPanel({
activeTab: 0,
autoScroll: true,
title: 'Access Control',
iconCls: 'group',
tabIndex: index,
items: []
});

tvheadend.paneladd(panel, panel2, index);

var list = 'enabled,username,password,prefix,streaming,adv_streaming,' +
'dvr,dvr_config,webui,admin,channel_min,channel_max,channel_tag,' +
'comment';
Expand Down
7 changes: 5 additions & 2 deletions src/webui/static/app/capmteditor.js
@@ -1,4 +1,5 @@
tvheadend.capmteditor = function() {
tvheadend.capmteditor = function(panel, index) {

var fm = Ext.form;

function setMetaAttr(meta, record) {
Expand Down Expand Up @@ -104,6 +105,8 @@ tvheadend.capmteditor = function() {
}
});

return new tvheadend.tableEditor('Capmt Connections', 'capmt', cm, rec,
var p = new tvheadend.tableEditor('Capmt Connections', 'capmt', cm, rec,
[], store, 'config_capmt.html', 'key');

tvheadend.paneladd(panel, p, index);
};
8 changes: 4 additions & 4 deletions src/webui/static/app/config.js
Expand Up @@ -31,7 +31,7 @@ tvheadend.comet.on('config', function(m) {
}
});

tvheadend.miscconf = function() {
tvheadend.miscconf = function(panel, index) {

/*
* Basic Config
Expand Down Expand Up @@ -240,7 +240,7 @@ tvheadend.miscconf = function() {
if (imagecache_form)
_items.push(imagecache_form);

var panel = new Ext.Panel({
var mpanel = new Ext.Panel({
title: 'General',
iconCls: 'wrench',
border: false,
Expand All @@ -251,6 +251,8 @@ tvheadend.miscconf = function() {
tbar: [saveButton, '->', helpButton]
});

tvheadend.paneladd(panel, mpanel, index);

/* ****************************************************************
* Load/Save
* ***************************************************************/
Expand Down Expand Up @@ -297,6 +299,4 @@ tvheadend.miscconf = function() {
}
});
}

return panel;
};
4 changes: 2 additions & 2 deletions src/webui/static/app/cwceditor.js
@@ -1,4 +1,4 @@
tvheadend.cwceditor = function() {
tvheadend.cwceditor = function(panel, index) {
var fm = Ext.form;

function setMetaAttr(meta, record) {
Expand Down Expand Up @@ -125,5 +125,5 @@ tvheadend.cwceditor = function() {
}
});

return grid;
tvheadend.paneladd(panel, grid, index);
};
14 changes: 7 additions & 7 deletions src/webui/static/app/dvr.js
Expand Up @@ -263,17 +263,17 @@ tvheadend.autorec_editor = function(panel, index) {
/**
*
*/
tvheadend.dvr = function() {
var panel = new Ext.TabPanel({
tvheadend.dvr = function(panel, index) {
var p = new Ext.TabPanel({
activeTab: 0,
autoScroll: true,
title: 'Digital Video Recorder',
iconCls: 'drive',
items: [],
});
tvheadend.dvr_upcoming(panel, 0);
tvheadend.dvr_finished(panel, 1);
tvheadend.dvr_failed(panel, 2);
tvheadend.autorec_editor(panel, 3);
return panel;
tvheadend.dvr_upcoming(p, 0);
tvheadend.dvr_finished(p, 1);
tvheadend.dvr_failed(p, 2);
tvheadend.autorec_editor(p, 3);
return p;
}
4 changes: 2 additions & 2 deletions src/webui/static/app/epggrab.js
Expand Up @@ -8,7 +8,7 @@ tvheadend.epggrabChannels = new Ext.data.JsonStore({
'mod-name']
});

tvheadend.epggrab = function() {
tvheadend.epggrab = function(panel, index) {

/* ****************************************************************
* Data
Expand Down Expand Up @@ -394,5 +394,5 @@ tvheadend.epggrab = function() {
});
}

return confpanel;
tvheadend.paneladd(panel, confpanel, index);
};
17 changes: 5 additions & 12 deletions src/webui/static/app/idnode.js
Expand Up @@ -1240,10 +1240,7 @@ tvheadend.idnode_grid = function(panel, conf)
page.changePage(0);
});

if (conf.tabIndex != null)
panel.insert(conf.tabIndex, grid);
else
panel.add(grid);
tvheadend.paneladd(panel, grid, conf.tabIndex);

/* Add comet listeners */
var update = function(o) {
Expand Down Expand Up @@ -1496,10 +1493,7 @@ tvheadend.idnode_form_grid = function(panel, conf)
items: [grid]
});

if (conf.tabIndex != null)
panel.insert(conf.tabIndex, mpanel);
else
panel.add(mpanel);
tvheadend.paneladd(panel, mpanel, conf.tabIndex);

/* Add comet listeners */
var update = function(o) {
Expand All @@ -1512,7 +1506,7 @@ tvheadend.idnode_form_grid = function(panel, conf)
/*
* IDNode Tree
*/
tvheadend.idnode_tree = function(conf)
tvheadend.idnode_tree = function(panel, conf)
{
var current = null;
var events = {};
Expand Down Expand Up @@ -1576,7 +1570,7 @@ tvheadend.idnode_tree = function(conf)
}
});

var panel = new Ext.Panel({
var mpanel = new Ext.Panel({
title: conf.title || '',
layout: 'hbox',
flex: 1,
Expand All @@ -1588,11 +1582,10 @@ tvheadend.idnode_tree = function(conf)
items: [tree]
});

tvheadend.paneladd(panel, mpanel, conf.tabIndex);

tree.on('beforerender', function() {
// To be honest this isn't quite right, but it'll do
tree.expandAll();
});

return panel;
};

0 comments on commit 0fa4c91

Please sign in to comment.