From 63109cf01d45994d1b465058a56be4d3f21a6cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Wed, 17 Mar 2010 19:15:46 +0000 Subject: [PATCH] * Prior to this release the color (i.e. connection status) of the CWC entries were not correctly updated when a connection was established or lost. This is now fixed. Ticket #144 --- debian/changelog | 4 ++++ src/webui/static/app/cwceditor.js | 34 +++++++++++++++++-------------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/debian/changelog b/debian/changelog index a4c240c7..06b7670d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,10 @@ hts-tvheadend (2.11-WIP) hts; urgency=low * Add support for appending season and episode numbers to filenames during recording. + * Prior to this release the color (i.e. connection status) of the + CWC entries were not correctly updated when a connection was established + or lost. This is now fixed. Ticket #144 + hts-tvheadend (2.10) hts; urgency=high * Fix a crash in HTSP server. diff --git a/src/webui/static/app/cwceditor.js b/src/webui/static/app/cwceditor.js index 9853d4eb..99daadf1 100644 --- a/src/webui/static/app/cwceditor.js +++ b/src/webui/static/app/cwceditor.js @@ -85,26 +85,30 @@ tvheadend.cwceditor = function() { ]); var rec = Ext.data.Record.create([ - 'enabled','connected','hostname','port','username','password','deskey','emm','comment' + 'enabled', 'connected', 'hostname', 'port', 'username', + 'password', 'deskey', 'emm', 'comment' ]); - store = new Ext.data.JsonStore({ - root: 'entries', - fields: rec, - url: "tablemgr", - autoLoad: true, - id: 'id', - baseParams: {table: 'cwc', op: "get"} + var store = new Ext.data.JsonStore({ + root: 'entries', + fields: rec, + url: "tablemgr", + autoLoad: true, + id: 'id', + baseParams: {table: 'cwc', op: "get"} }); - tvheadend.comet.on('cwcStatus', function(server) { - var rec = store.getById(server.id); - if(rec){ - rec.set('connected', server.connected); + var grid = new tvheadend.tableEditor('Code Word Client', 'cwc', cm, rec, + [enabledColumn, emmColumn], store, + 'config_cwc.html', 'key'); + + tvheadend.comet.on('cwcStatus', function(msg) { + var rec = store.getById(msg.id); + if(rec) { + rec.set('connected', msg.connected); + grid.getView().refresh(); } }); - return new tvheadend.tableEditor('Code Word Client', 'cwc', cm, rec, - [enabledColumn, emmColumn], store, - 'config_cwc.html', 'key'); + return grid; }