0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Publish date and time display fix

no issue

- add @ symbol to ensure date and time are clear
This commit is contained in:
Hannah Wolfe 2014-01-13 02:21:39 +00:00
parent f166440334
commit 2705a28da9

View file

@ -30,7 +30,7 @@
pubDate = this.model ? this.model.get('published_at') : 'Not Published', pubDate = this.model ? this.model.get('published_at') : 'Not Published',
$pubDateEl = this.$('.post-setting-date'), $pubDateEl = this.$('.post-setting-date'),
$postSettingSlugEl = this.$('.post-setting-slug'), $postSettingSlugEl = this.$('.post-setting-slug'),
publishedDateFormat = 'DD MMM YY HH:mm'; publishedDateFormat = 'DD MMM YY @ HH:mm';
$postSettingSlugEl.val(slug); $postSettingSlugEl.val(slug);
@ -143,7 +143,7 @@
e.preventDefault(); e.preventDefault();
var self = this, var self = this,
parseDateFormats = ['DD MMM YY HH:mm', 'DD MMM YYYY HH:mm', 'DD/MM/YY HH:mm', 'DD/MM/YYYY HH:mm', 'DD-MM-YY HH:mm', 'DD-MM-YYYY HH:mm'], parseDateFormats = ['DD MMM YY HH:mm', 'DD MMM YYYY HH:mm', 'DD/MM/YY HH:mm', 'DD/MM/YYYY HH:mm', 'DD-MM-YY HH:mm', 'DD-MM-YYYY HH:mm'],
displayDateFormat = 'DD MMM YY HH:mm', displayDateFormat = 'DD MMM YY @ HH:mm',
errMessage = '', errMessage = '',
pubDate = self.model.get('published_at'), pubDate = self.model.get('published_at'),
pubDateEl = e.currentTarget, pubDateEl = e.currentTarget,
@ -184,7 +184,7 @@
// Validate new Published date // Validate new Published date
if (!newPubDateMoment.isValid()) { if (!newPubDateMoment.isValid()) {
errMessage = 'Published Date must be a valid date with format: DD MMM YY HH:mm (e.g. 6 Dec 14 15:00)'; errMessage = 'Published Date must be a valid date with format: DD MMM YY @ HH:mm (e.g. 6 Dec 14 @ 15:00)';
} }
if (newPubDateMoment.diff(new Date(), 'h') > 0) { if (newPubDateMoment.diff(new Date(), 'h') > 0) {