mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Merge pull request #1888 from hswolff/additional-ux
Update placeholder of published data in editor
This commit is contained in:
commit
cd750b11fb
1 changed files with 6 additions and 2 deletions
|
@ -29,7 +29,8 @@
|
|||
var slug = this.model ? this.model.get('slug') : '',
|
||||
pubDate = this.model ? this.model.get('published_at') : 'Not Published',
|
||||
$pubDateEl = this.$('.post-setting-date'),
|
||||
$postSettingSlugEl = this.$('.post-setting-slug');
|
||||
$postSettingSlugEl = this.$('.post-setting-slug'),
|
||||
publishedDateFormat = 'DD MMM YY HH:mm';
|
||||
|
||||
$postSettingSlugEl.val(slug);
|
||||
|
||||
|
@ -40,7 +41,10 @@
|
|||
|
||||
// Insert the published date, and make it editable if it exists.
|
||||
if (this.model && this.model.get('published_at')) {
|
||||
pubDate = moment(pubDate).format('DD MMM YY HH:mm');
|
||||
pubDate = moment(pubDate).format(publishedDateFormat);
|
||||
$pubDateEl.attr('placeholder', '');
|
||||
} else {
|
||||
$pubDateEl.attr('placeholder', moment().format(publishedDateFormat));
|
||||
}
|
||||
|
||||
if (this.model && this.model.get('id')) {
|
||||
|
|
Loading…
Add table
Reference in a new issue