From 8df348fbc3e749228f2b97519c872bb625b51f82 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Sun, 21 Dec 2014 20:46:00 +0100 Subject: [PATCH] WEBUI JS DVR: Correct the start column width --- src/webui/static/app/dvr.js | 6 +++--- src/webui/static/app/idnode.js | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/webui/static/app/dvr.js b/src/webui/static/app/dvr.js index a828a23a..2d81cfd8 100644 --- a/src/webui/static/app/dvr.js +++ b/src/webui/static/app/dvr.js @@ -441,7 +441,7 @@ tvheadend.autorec_editor = function(panel, index) { minduration: { width: 80 }, maxduration: { width: 80 }, weekdays: { width: 160 }, - start: { width: 100 }, + start: { width: 120 }, start_window: { width: 100 }, pri: { width: 80 }, config_name: { width: 120 }, @@ -495,8 +495,8 @@ tvheadend.timerec_editor = function(panel, index) { title: { width: 300 }, channel: { width: 200 }, weekdays: { width: 160 }, - start: { width: 100 }, - stop: { width: 100 }, + start: { width: 120 }, + stop: { width: 120 }, pri: { width: 80 }, config_name: { width: 120 }, owner: { width: 100 }, diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index dbf192bd..c7e0627e 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -233,7 +233,7 @@ tvheadend.IdNodeField = function(conf) ftype = this.hexa ? 'string' : 'numeric'; w = 80; } else if (this.type === 'time') { - w = 120; + w = 140; ftype = 'date'; if (this.duration) { ftype = 'numeric'; @@ -297,13 +297,20 @@ tvheadend.IdNodeField = function(conf) } if (this.date) { return function(v) { - var dt = new Date(v * 1000); - return dt.toLocaleDateString(); + if (v > 0) { + var dt = new Date(v * 1000); + return dt.toLocaleDateString(); + } + return ''; } } return function(v) { - var dt = new Date(v * 1000); - return dt.toLocaleString(window.navigator.language, {weekday: 'short'}) + ' ' + dt.toLocaleString(); + if (v > 0) { + var dt = new Date(v * 1000); + var wd = dt.toLocaleString(window.navigator.language, {weekday: 'short'}); + return wd + ' ' + dt.toLocaleString(); + } + return ''; } }