From 80d58f99cbb222b24a4b3a249e05232746301e42 Mon Sep 17 00:00:00 2001 From: Rish Date: Thu, 7 Nov 2019 10:54:26 +0700 Subject: [PATCH] Added preview modal toggle in publish menu --- ghost/admin/app/components/gh-publishmenu-draft.js | 4 ++++ ghost/admin/app/components/gh-publishmenu.js | 4 ++++ .../app/templates/components/gh-publishmenu-draft.hbs | 10 ++++++++++ .../admin/app/templates/components/gh-publishmenu.hbs | 1 + ghost/admin/app/templates/editor.hbs | 1 + 5 files changed, 20 insertions(+) diff --git a/ghost/admin/app/components/gh-publishmenu-draft.js b/ghost/admin/app/components/gh-publishmenu-draft.js index 33cd55f278..4907280229 100644 --- a/ghost/admin/app/components/gh-publishmenu-draft.js +++ b/ghost/admin/app/components/gh-publishmenu-draft.js @@ -55,6 +55,10 @@ export default Component.extend({ } }, + toggleEmailPreviewModal() { + this.toggleEmailPreviewModal(); + }, + setDate(date) { let post = this.post; let dateString = moment(date).format('YYYY-MM-DD'); diff --git a/ghost/admin/app/components/gh-publishmenu.js b/ghost/admin/app/components/gh-publishmenu.js index 7ab06b8388..89abb18a4b 100644 --- a/ghost/admin/app/components/gh-publishmenu.js +++ b/ghost/admin/app/components/gh-publishmenu.js @@ -154,6 +154,10 @@ export default Component.extend({ } }, + toggleEmailPreviewModal() { + this.toggleEmailPreviewModal(); + }, + close(dropdown, e) { let post = this.post; diff --git a/ghost/admin/app/templates/components/gh-publishmenu-draft.hbs b/ghost/admin/app/templates/components/gh-publishmenu-draft.hbs index f74beadcc3..af5fb70d82 100644 --- a/ghost/admin/app/templates/components/gh-publishmenu-draft.hbs +++ b/ghost/admin/app/templates/components/gh-publishmenu-draft.hbs @@ -50,6 +50,16 @@ {{/unless}} {{/if}} + {{#unless this.deliveredAction}} +
+ +
+ {{/unless}} {{/if}} diff --git a/ghost/admin/app/templates/components/gh-publishmenu.hbs b/ghost/admin/app/templates/components/gh-publishmenu.hbs index c742333078..244f5ae74e 100644 --- a/ghost/admin/app/templates/components/gh-publishmenu.hbs +++ b/ghost/admin/app/templates/components/gh-publishmenu.hbs @@ -27,6 +27,7 @@ backgroundTask=this.backgroundTask deliveredAction=this.deliveredAction memberCount=this.memberCount + toggleEmailPreviewModal=(action "toggleEmailPreviewModal") sendEmailWhenPublished=this.sendEmailWhenPublishedScratch}} {{/if}} diff --git a/ghost/admin/app/templates/editor.hbs b/ghost/admin/app/templates/editor.hbs index b9ec5b7fed..0a7179dca2 100644 --- a/ghost/admin/app/templates/editor.hbs +++ b/ghost/admin/app/templates/editor.hbs @@ -58,6 +58,7 @@ onOpen=(action "cancelAutosave") backgroundTask=this.backgroundLoader deliveredAction=this.deliveredAction + toggleEmailPreviewModal=(action "toggleEmailPreviewModal") memberCount=this.memberCount}} {{/if}} {{/unless}}