show duration

This commit is contained in:
j 2018-12-05 14:07:11 +01:00
parent aa856e2404
commit 5b776ca0ee

View File

@ -169,6 +169,14 @@ function formatTime(row, cell, value, columnDef, dataContext) {
return formatDuration(time) return formatDuration(time)
} }
function formatShotTime(row, cell, value, columnDef, dataContext) {
if (data[row].duration) {
return formatDuration(data[row].duration)
}
return ''
}
function CheckmarkFormatter(row, cell, value, columnDef, dataContext) { function CheckmarkFormatter(row, cell, value, columnDef, dataContext) {
return value ? "<img src='/static/sg/images/tick.png'>" : ""; return value ? "<img src='/static/sg/images/tick.png'>" : "";
} }
@ -206,6 +214,7 @@ var columns = [
{id: "zoom_last", name: "Zoom Last", field: "zoom_last", cssClass: "cell-status", formatter: CheckmarkFormatter, editor: Slick.Editors.Checkbox, width: 60}, {id: "zoom_last", name: "Zoom Last", field: "zoom_last", cssClass: "cell-status", formatter: CheckmarkFormatter, editor: Slick.Editors.Checkbox, width: 60},
//{id: "duration", name: "Time", field: "duration", editor: Slick.Editors.Text, formatter: formatTime}, //{id: "duration", name: "Time", field: "duration", editor: Slick.Editors.Text, formatter: formatTime},
{id: "duration", name: "Time", field: "duration", formatter: formatTime}, {id: "duration", name: "Time", field: "duration", formatter: formatTime},
{id: "shot_duration", name: "Duration", field: "shot_duration", formatter: formatShotTime},
{id: "status", name: "Status", width: 80, minWidth: 20, maxWidth: 80, cssClass: "cell-status", field: "status", formatter: StatusFormatter} {id: "status", name: "Status", width: 80, minWidth: 20, maxWidth: 80, cssClass: "cell-status", field: "status", formatter: StatusFormatter}
]; ];
var options = { var options = {