aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/render-msg.js22
-rw-r--r--lib/serve.js4
2 files changed, 14 insertions, 12 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 1af0b34..b150522 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -108,13 +108,14 @@ RenderMsg.prototype.wrap = function (content, cb) {
{href: this.toUrl(this.msg.key)}, this.msg.key)),
channel ? [' ', h('a', {href: this.toUrl(channel)}, channel)] : ''),
this.issues(done())),
- h('td.msg-right', h('form', {method: 'post', action: '/vote'},
- this.msg.rel ? [this.msg.rel, ' '] : '',
- this.msg.key ? [
+ h('td.msg-right', this.msg.key ?
+ h('form', {method: 'post', action: '/vote'},
+ this.msg.rel ? [this.msg.rel, ' '] : '',
h('a', {href: this.toUrl(this.msg.key) + '?raw'}, 'raw'), ' ',
this.voteFormInner('dig')
- ] : ''
- ))
+ ) : [
+ this.msg.rel ? [this.msg.rel, ' '] : ''
+ ])
), h('tr',
h('td.msg-content', {colspan: 2}, content)
)])
@@ -138,13 +139,14 @@ RenderMsg.prototype.wrapMini = function (content, cb) {
href: this.msg.key ? this.toUrl(this.msg.key) : undefined
}, htime(date)), ' ',
content),
- h('td.msg-right', h('form', {method: 'post', action: '/vote'},
- this.msg.rel ? [this.msg.rel, ' '] : '',
- this.msg.key ? [
+ h('td.msg-right', this.msg.key ?
+ h('form', {method: 'post', action: '/vote'},
+ this.msg.rel ? [this.msg.rel, ' '] : '',
h('a', {href: this.toUrl(this.msg.key) + '?raw'}, 'raw'), ' ',
this.voteFormInner('dig')
- ] : ''
- ))
+ ) : [
+ this.msg.rel ? [this.msg.rel, ' '] : ''
+ ])
))
done(cb)
}
diff --git a/lib/serve.js b/lib/serve.js
index c2ac2ee..7c4350b 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -922,7 +922,7 @@ Serve.prototype.composer = function (opts, cb) {
msgContainer.appendChild(el)
}, cb)
)
- return h('form', {method: 'post', action: '#reply'},
+ return [
h('input', {type: 'hidden', name: 'content',
value: JSON.stringify(content)}),
h('div', h('em', 'draft:')),
@@ -930,7 +930,7 @@ Serve.prototype.composer = function (opts, cb) {
h('div.composer-actions',
h('input', {type: 'submit', name: 'action', value: 'publish'})
)
- )
+ ]
}
function publish(cb) {