* Add dateTimeFormat
This commit is contained in:
parent
e0f267c9a5
commit
8b3b36fd83
|
@ -88,6 +88,9 @@ function getDefaultConfig() {
|
||||||
},
|
},
|
||||||
timeFormat : {
|
timeFormat : {
|
||||||
short : 'h:mm a',
|
short : 'h:mm a',
|
||||||
|
},
|
||||||
|
dateTimeFormat : {
|
||||||
|
short : 'MM/DD/YYYY h:mm a',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -438,8 +438,7 @@ function FullScreenEditorModule(options) {
|
||||||
toView.setText(self.message.toUserName);
|
toView.setText(self.message.toUserName);
|
||||||
subjView.setText(self.message.subject);
|
subjView.setText(self.message.subject);
|
||||||
|
|
||||||
// :TODO: set full date/time -- need a defaults dateTimeFormat
|
tsView.setText(moment(self.message.modTimestamp).format(self.client.currentTheme.helpers.getDateTimeFormat()));
|
||||||
tsView.setText(moment(self.message.modTimestamp).format(self.client.currentTheme.helpers.getDateFormat()));
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -77,6 +77,17 @@ function loadTheme(themeID, cb) {
|
||||||
if(_.has(theme, 'customization.defaults.timeFormat')) {
|
if(_.has(theme, 'customization.defaults.timeFormat')) {
|
||||||
return theme.customization.defaults.timeFormat[style] || format;
|
return theme.customization.defaults.timeFormat[style] || format;
|
||||||
}
|
}
|
||||||
|
return format;
|
||||||
|
},
|
||||||
|
getDateTimeFormat : function(style) {
|
||||||
|
style = style || 'short';
|
||||||
|
|
||||||
|
var format = Config.defaults.dateTimeFormat[style] || 'MM/DD/YYYY h:mm a';
|
||||||
|
|
||||||
|
if(_.has(theme, 'customization.defaults.dateTimeFormat')) {
|
||||||
|
return theme.customization.defaults.dateTimeFormat[style] || format;
|
||||||
|
}
|
||||||
|
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue