aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-02-01 00:01:01 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-02-01 00:01:01 -1000
commit0bc0c09ad6d0755d5978a4706fab8f0de26abe8e (patch)
tree353e45a6f92d799b9cab3af2cec2b01e148f5c92
parentf45c79b0d6eba673d537ba86b9cd8797666ad4b7 (diff)
downloadpatchfoo-0bc0c09ad6d0755d5978a4706fab8f0de26abe8e.tar.gz
patchfoo-0bc0c09ad6d0755d5978a4706fab8f0de26abe8e.zip
Arrange edit & discard buttons horizontally
-rw-r--r--lib/serve.js26
1 files 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})
]))
})