link forums page topics to last page
This commit is contained in:
parent
e4242eb580
commit
2211d2ef11
|
@ -153,10 +153,10 @@ var imageExts = ["png","jpg","jpe","jpeg","jif","jfi","jfif","svg","bmp","gif","
|
|||
addInitHook("end_bind_topic", () => {
|
||||
log("in member.js end_bind_topic")
|
||||
|
||||
let changeListener = (files,handler) => {
|
||||
let changeListener = (files,h) => {
|
||||
if(files!=null) {
|
||||
files.removeEventListener("change", handler, false);
|
||||
files.addEventListener("change", handler, false);
|
||||
files.removeEventListener("change", h, false);
|
||||
files.addEventListener("change", h, false);
|
||||
}
|
||||
};
|
||||
let uploadFiles = document.getElementById("upload_files");
|
||||
|
@ -306,9 +306,7 @@ var imageExts = ["png","jpg","jpe","jpeg","jif","jfi","jfif","svg","bmp","gif","
|
|||
data: JSON.stringify(selectedTopics),
|
||||
contentType: "application/json",
|
||||
error: ajaxError,
|
||||
success: () => {
|
||||
window.location.reload();
|
||||
}
|
||||
success: () => window.location.reload()
|
||||
});
|
||||
};
|
||||
// TODO: Should we unbind this here to avoid binding multiple listeners to this accidentally?
|
||||
|
|
|
@ -110,8 +110,8 @@ func TopicListCommon(w http.ResponseWriter, r *http.Request, user *c.User, h *c.
|
|||
var cfids []int
|
||||
if len(fids) > 0 {
|
||||
inSlice := func(haystack []int, needle int) bool {
|
||||
for _, item := range haystack {
|
||||
if needle == item {
|
||||
for _, it := range haystack {
|
||||
if needle == it {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,8 +18,9 @@
|
|||
<span class="forum_right shift_right">
|
||||
{{if .LastReplyer.MicroAvatar}}<a href="{{.LastReplyer.Link}}"><img class="extra_little_row_avatar"src="{{.LastReplyer.MicroAvatar}}"height=64 width=64 alt="Avatar"title="{{.LastReplyer.Name}}'s Avatar"aria-hidden="true"></a>{{end}}
|
||||
<span>
|
||||
<a {{if .LastTopic.Link}}class="forum_poster"href="{{.LastTopic.Link}}"{{else}}class="forum_no_poster"{{end}}>{{if .LastTopic.Title}}{{.LastTopic.Title}}{{else}}{{lang "forums_none"}}{{end}}</a>
|
||||
{{if .LastTopicTime}}<br><span class="rowsmall"title="{{abstime .LastTopic.LastReplyAt}}">{{.LastTopicTime}}</span>{{end}}
|
||||
<a class={{if .LastTopic.Link}}"forum_poster"href="{{.LastTopic.Link}}"{{else}}"forum_no_poster"{{end}}>{{if .LastTopic.Title}}{{.LastTopic.Title}}{{else}}{{lang "forums_none"}}{{end}}</a>
|
||||
{{/**{{if .LastTopicTime}}<br><span class="rowsmall"title="{{abstime .LastTopic.LastReplyAt}}">{{.LastTopicTime}}</span>{{end}}**/}}
|
||||
<br><a href="{{.LastTopic.Link}}{{if ne .LastPage 1}}?page={{.LastPage}}{{end}}{{if .LastTopic.LastReplyID}}#post-{{.LastTopic.LastReplyID}}{{end}}"class="rowsmall lastReplyAt"title="{{abstime .LastTopic.LastReplyAt}}">{{.LastTopicTime}}</a>
|
||||
</span>
|
||||
</span><div style="clear:both;"></div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="topic_row{{if .Sticky}} topic_sticky{{else if .IsClosed}} topic_closed{{end}}{{if .CanMod}} can_mod{{end}}" data-tid="{{.ID}}">
|
||||
<div class="topic_row{{if .Sticky}} topic_sticky{{else if .IsClosed}} topic_closed{{end}}{{if .CanMod}} can_mod{{end}}"data-tid={{.ID}}>
|
||||
<div class="rowitem topic_left passive datarow">
|
||||
<span class="selector"></span>
|
||||
<a href="{{.Creator.Link}}"><img src="{{.Creator.MicroAvatar}}"height=64 alt="Avatar"title="{{.Creator.Name}}'s Avatar"aria-hidden="true"></a>
|
||||
<a href="{{.Creator.Link}}"><img src="{{.Creator.MicroAvatar}}"alt="Avatar"title="{{.Creator.Name}}'s Avatar"aria-hidden="true"height=64></a>
|
||||
<span class="topic_inner_left">
|
||||
<a class="rowtopic"href="{{.Link}}"itemprop="itemListElement"title="{{.Title}}"><span>{{.Title}}</span></a> {{if .ForumName}}<a class="rowsmall parent_forum"href="{{.ForumLink}}"title="{{.ForumName}}">{{.ForumName}}</a>{{end}}
|
||||
<br><a class="rowsmall starter"href="{{.Creator.Link}}"title="{{.Creator.Name}}">{{.Creator.Name}}</a>
|
||||
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
<div class="rowitem topic_right passive datarow">
|
||||
<div class="topic_right_inside">
|
||||
<a href="{{.LastUser.Link}}"><img src="{{.LastUser.MicroAvatar}}"height=64 alt="Avatar"title="{{.LastUser.Name}}'s Avatar"aria-hidden="true"></a>
|
||||
<a href="{{.LastUser.Link}}"><img src="{{.LastUser.MicroAvatar}}"alt="Avatar"title="{{.LastUser.Name}}'s Avatar"aria-hidden="true"height=64></a>
|
||||
<span>
|
||||
<a href="{{.LastUser.Link}}"class="lastName"title="{{.LastUser.Name}}">{{.LastUser.Name}}</a><br>
|
||||
<a href="{{.Link}}?page={{.LastPage}}{{if .LastReplyID}}#post-{{.LastReplyID}}{{end}}"class="rowsmall lastReplyAt"title="{{abstime .LastReplyAt}}">{{reltime .LastReplyAt}}</a>
|
||||
|
|
Loading…
Reference in New Issue