Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WEBUI JS DVR: Correct the start column width
  • Loading branch information
perexg committed Dec 21, 2014
1 parent 5dade4f commit 8df348f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/webui/static/app/dvr.js
Expand Up @@ -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 },
Expand Down Expand Up @@ -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 },
Expand Down
17 changes: 12 additions & 5 deletions src/webui/static/app/idnode.js
Expand Up @@ -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';
Expand Down Expand Up @@ -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 '';
}
}

Expand Down

0 comments on commit 8df348f

Please sign in to comment.