An attempt to make the default columns widths in idnode grids better

This commit is contained in:
Jaroslav Kysela 2014-03-19 17:37:41 +01:00
parent cd713e2de7
commit 0e31053b1c
3 changed files with 13 additions and 3 deletions

View file

@ -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 "<a href='stream/channel/" + r.id + "'>Play</a>";

View file

@ -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,

View file

@ -81,6 +81,7 @@ tvheadend.muxes = function(panel)
del : true,
lcol : [
{
width : 50,
header : 'Play',
renderer : function(v, o, r) {
return "<a href='stream/mux/" + r.id + "'>Play</a>";
@ -123,6 +124,7 @@ tvheadend.services = function(panel)
tbar : [ mapButton ],
lcol : [
{
width : 50,
header : 'Play',
renderer : function(v, o, r) {
return "<a href='stream/service/" + r.id + "'>Play</a>";