diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-03-05 16:24:22 -0500 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-03-05 16:24:22 -0500 |
commit | 1168e132e90f0653700134b7a7f0b81edfaead8e (patch) | |
tree | eb513a9ecb28c3389c7385335654b54695503860 | |
parent | 267d7001b4c4a08f5c26cd75f6a156cf974c739f (diff) | |
download | patchfoo-1168e132e90f0653700134b7a7f0b81edfaead8e.tar.gz patchfoo-1168e132e90f0653700134b7a7f0b81edfaead8e.zip |
Put rel on same line as dig link
-rw-r--r-- | lib/render-msg.js | 22 | ||||
-rw-r--r-- | lib/serve.js | 4 |
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) { |