Fix #1266: use a renderer when displaying Unix timestamps.

The timestamp is displayed read only in a large window, and not sortable,
hence we use the human readable renderer.
This commit is contained in:
Emmanuel Kasper 2017-01-31 16:48:50 +01:00 committed by Dietmar Maurer
parent 3f6336553c
commit 4092576b1b

View File

@ -80,6 +80,7 @@ Ext.define('PVE.window.Snapshot', {
items.push({
xtype: 'displayfield',
name: 'snaptime',
renderer: PVE.Utils.render_timestamp_human_readable,
fieldLabel: gettext('Timestamp')
});
} else {
@ -199,7 +200,7 @@ Ext.define('PVE.window.Snapshot', {
summarystore.resumeEvents();
summarystore.fireEvent('refresh', summarystore);
form.findField('snaptime').setValue(new Date(data.snaptime));
form.findField('snaptime').setValue(data.snaptime);
form.findField('description').setValue(data.description);
}
});