From 0bc0c09ad6d0755d5978a4706fab8f0de26abe8e Mon Sep 17 00:00:00 2001 From: cel Date: Fri, 1 Feb 2019 00:01:01 -1000 Subject: Arrange edit & discard buttons horizontally --- lib/serve.js | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/lib/serve.js b/lib/serve.js index 5090f0e..0d9b76b 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -4258,23 +4258,21 @@ Serve.prototype.drafts = function (path) { var composerUrl = self.app.render.toUrl(draft.url) + (form.composer_id ? '#' + encodeURIComponent(form.composer_id) : '') cb(null, ph('div', [ - ph('form', {method: 'post', action: composerUrl}, [ - hiddenInput('draft_id', id), - hiddenInput('restored_draft', '1'), - Object.keys(form).map(function (key) { - if (key === 'draft_id' || key === 'save_draft') return '' - return hiddenInput(key, draft.form[key]) - }), - ph('p', [ + ph('table', ph('tr', [ + ph('td', ph('form', {method: 'post', action: composerUrl}, [ + hiddenInput('draft_id', id), + hiddenInput('restored_draft', '1'), + Object.keys(form).map(function (key) { + if (key === 'draft_id' || key === 'save_draft') return '' + return hiddenInput(key, draft.form[key]) + }), ph('input', {type: 'submit', name: 'draft_edit', value: 'Edit'}) - ]) - ]), - ph('form', {method: 'post', action: ''}, [ - ph('p', [ + ])), + ph('td', ph('form', {method: 'post', action: ''}, [ ph('input', {type: 'submit', name: 'draft_discard', value: 'Discard', title: 'Discard draft'}) - ]) - ]), + ])) + ])), self.phPreview(content, {draftId: id}) ])) }) -- cgit v1.2.3