From: Adam Sutton Date: Tue, 10 Sep 2013 15:27:22 +0000 (+0100) Subject: webui: some attempt to make enum lists more usable. X-Git-Tag: v4.1~2543 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=73b35edae720ca03cb15bb83cbddca17f30b8dc4;p=thirdparty%2Ftvheadend.git webui: some attempt to make enum lists more usable. --- diff --git a/src/service.c b/src/service.c index 44a0252db..94316eaee 100644 --- a/src/service.c +++ b/src/service.c @@ -127,14 +127,19 @@ static const char * service_class_get_title ( idnode_t *self ) { static char *ret = NULL; + const char *str = NULL; service_t *s = (service_t*)self; + pthread_mutex_lock(&s->s_stream_mutex); if (ret) { free(ret); ret = NULL; } - pthread_mutex_lock(&s->s_stream_mutex); - if (s->s_nicename) - ret = strdup(s->s_nicename); + if (s->s_channel_name) + str = s->s_channel_name(s); + if (!str) + str = s->s_nicename; + if (str) + ret = strdup(str); pthread_mutex_unlock(&s->s_stream_mutex); return ret; } diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index 01e6c362f..9120235ed 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -128,10 +128,11 @@ tvheadend.idnode_editor_field = function(f, create) valueField : 'key', displayField : 'val', store : tvheadend.idnode_enum_store(f), - typeAhead : true, - forceSelection : true, + /*typeAhead : true,*/ + /*forceSelection : true,*/ triggerAction : 'all', emptyText :'Select ' + f.caption +' ...', + clearFilterOnReset: false, listeners : { keyup: function() { this.store.filter('val', this.getRawValue(), true, false);