From 0e31053b1ca4164462a78bcc2e4963287d842346 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 19 Mar 2014 17:37:41 +0100 Subject: [PATCH] An attempt to make the default columns widths in idnode grids better --- src/webui/static/app/chconf.js | 1 + src/webui/static/app/idnode.js | 13 ++++++++++--- src/webui/static/app/mpegts.js | 2 ++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/webui/static/app/chconf.js b/src/webui/static/app/chconf.js index c11951cb..46bec483 100644 --- a/src/webui/static/app/chconf.js +++ b/src/webui/static/app/chconf.js @@ -205,6 +205,7 @@ tvheadend.channel_tab = function(panel) tbar : [ mapButton, lowNoButton, noUpButton, noDownButton, noSwapButton ], lcol : [ { + width : 50, header : 'Play', renderer : function (v, o, r) { return "Play"; diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index 5a8577e3..ffc02906 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -128,13 +128,20 @@ tvheadend.IdNodeField = function (conf) this.column = function () { + var w = 300; var ftype = 'string'; if (this.type == 'int' || this.type == 'u32' || - this.type == 'u16' || this.type == 'dbl') + this.type == 'u16' || this.type == 'dbl') { ftype = 'numeric'; - else if (this.type == 'bool') - ftype = 'boolean' + w = 80; + } else if (this.type == 'bool') { + ftype = 'boolean'; + w = 60; + } + if (this.enum || this.list) + w = 300; return { + width : w, dataIndex: this.id, header : this.text, sortable : true, diff --git a/src/webui/static/app/mpegts.js b/src/webui/static/app/mpegts.js index ab46c5a8..2113db06 100644 --- a/src/webui/static/app/mpegts.js +++ b/src/webui/static/app/mpegts.js @@ -81,6 +81,7 @@ tvheadend.muxes = function(panel) del : true, lcol : [ { + width : 50, header : 'Play', renderer : function(v, o, r) { return "Play"; @@ -123,6 +124,7 @@ tvheadend.services = function(panel) tbar : [ mapButton ], lcol : [ { + width : 50, header : 'Play', renderer : function(v, o, r) { return "Play";