From f851f518d3120d5545dc98378f95097715a55cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Sat, 11 Oct 2008 11:37:03 +0000 Subject: [PATCH] Add an about tab in the web user interface. --- webui/extjs.c | 33 +++++++++++++++++++++++++++++++++ webui/static/app/ext.css | 5 +++++ webui/static/app/tvheadend.js | 11 +++++++++-- 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/webui/extjs.c b/webui/extjs.c index 01958bd5..c32bf769 100644 --- a/webui/extjs.c +++ b/webui/extjs.c @@ -45,6 +45,7 @@ #include "epg.h" extern const char *htsversion; +extern const char *htsversion_full; static void extjs_load(htsbuf_queue_t *hq, const char *script) @@ -153,6 +154,37 @@ extjs_root(http_connection_t *hc, const char *remain, void *opaque) } +/** + * + */ +static int +page_about(http_connection_t *hc, const char *remain, void *opaque) +{ + htsbuf_queue_t *hq = &hc->hc_reply; + + htsbuf_qprintf(hq, + "
" + "
" + "HTS Tvheadend %s" + "

" + "© 2006 - 2008 Andreas \303\226man, et al.

" + "
" + "" + "http://hts.lonelycoder.com/

" + "Based on software from " + "FFmpeg and " + "ExtJS.
" + "
" + "Build %s" + "
", + htsversion, + htsversion_full); + + http_output_html(hc); + return 0; +} + + /** * */ @@ -1201,6 +1233,7 @@ extjs_dvrlist(http_connection_t *hc, const char *remain, void *opaque) void extjs_start(void) { + http_path_add("/about.html", NULL, page_about, ACCESS_WEB_INTERFACE); http_path_add("/extjs.html", NULL, extjs_root, ACCESS_WEB_INTERFACE); http_path_add("/tablemgr", NULL, extjs_tablemgr, ACCESS_WEB_INTERFACE); http_path_add("/dvbtree", NULL, extjs_dvbtree, ACCESS_WEB_INTERFACE); diff --git a/webui/static/app/ext.css b/webui/static/app/ext.css index 53dfe826..3c015afe 100644 --- a/webui/static/app/ext.css +++ b/webui/static/app/ext.css @@ -149,4 +149,9 @@ .hts-doc-text img { padding: 10px; +} + +.about-title { + font:normal 24px verdana; + font-weight: bold; } \ No newline at end of file diff --git a/webui/static/app/tvheadend.js b/webui/static/app/tvheadend.js index b9741b7c..30a9ac23 100644 --- a/webui/static/app/tvheadend.js +++ b/webui/static/app/tvheadend.js @@ -58,10 +58,17 @@ function accessUpdate(o) { tvheadend.rootTabPanel.add(tvheadend.confpanel); } + tvheadend.aboutPanel = new Ext.Panel({ + border: false, + layout:'fit', + title:'About', + autoLoad: '/about.html' + }); + + tvheadend.rootTabPanel.add(tvheadend.aboutPanel); + tvheadend.rootTabPanel.doLayout(); - - console.log(o); } /**