Archived
1
0

add quick reply (initial)

This commit is contained in:
Jeff Becker 2017-04-19 07:27:40 -04:00
parent eeb57e3ae6
commit b83b75338c
5 changed files with 17 additions and 3 deletions

View File

@ -0,0 +1,11 @@
function quickreply(shorthash, longhash, url) {
if (!window.location.pathname.startsWith("/t/"))
{
window.location.href = url;
return;
}
var elem = document.getElementById("comment");
if(!elem) return;
elem.value += ">>" + shorthash + "\n";
}

View File

@ -18,6 +18,8 @@
<title>{{board.Board}}</title> <title>{{board.Board}}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="/static/krane.css" /> <link rel="stylesheet" href="/static/krane.css" />
<script type="text/javascript" src="/static/overchan.js">
</script>
</head> </head>
<body> <body>
{{{board.Navbar}}} {{{board.Navbar}}}

View File

@ -27,8 +27,8 @@
{{#post.Attachments}} {{#post.Attachments}}
<a href="{{Source}}" class="image_link" target="_blank" title="{{Filename}}"><img src="{{Thumbnail}}" class="image" /></a> <a href="{{Source}}" class="image_link" target="_blank" title="{{Filename}}"><img src="{{Thumbnail}}" class="image" /></a>
{{/post.Attachments}} {{/post.Attachments}}
<a name="{{post.PostHash}}"></a><span class="topicline"><b>{{post.subject}}</b> {{post.Name}} <span class="published">{{post.Date}}</span> <a href="{{post.PostURL}}" onclick="return '>>{{post.ShortHash}}';">&#8470;</a> <a name="{{post.PostHash}}"></a><span class="topicline"><b>{{post.subject}}</b> {{post.Name}} <span class="published">{{post.Date}}</span> <a href="{{post.PostURL}}">&#8470;</a>
<a href="{{post.PostURL}}" onclick="return quickreply('${articlehash}', '${articlehash_full}');"> {{post.ShortHash}}</a> <a href="#" onclick="return quickreply('{{post.ShortHash}}', '{{post.PostHash}}', '{{post.PostURL}}');"> {{post.ShortHash}}</a>
</span> </span>
<br /><br /> <br /><br />
<span class="message_span">{{{post.RenderBody}}}</span> <span class="message_span">{{{post.RenderBody}}}</span>

View File

@ -22,7 +22,7 @@
</tr> </tr>
<tr> <tr>
<th>Comment</th> <th>Comment</th>
<td><textarea name="message" class="postarea"></textarea></td> <td><textarea id="comment" name="message" class="postarea"></textarea></td>
</tr> </tr>
{{#files}} {{#files}}
<tr> <tr>

View File

@ -17,6 +17,7 @@
<title>{{board.Board}}</title> <title>{{board.Board}}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="/static/krane.css" /> <link rel="stylesheet" href="/static/krane.css" />
<script type="text/javascript" src="/static/overchan.js"></script>
</head> </head>
<body> <body>
{{{thread.Navbar}}} {{{thread.Navbar}}}