wrapping up post history work

This commit is contained in:
Julian Lam
2018-02-16 21:22:26 -05:00
parent c1fef4561b
commit a86d91a552
5 changed files with 91 additions and 7 deletions

View File

@@ -8,7 +8,8 @@ define('forum/topic/postTools', [
'translator',
'forum/topic/votes',
'forum/topic/move-post',
], function (share, navigator, components, translator, votes, movePost) {
'forum/topic/diffs',
], function (share, navigator, components, translator, votes, movePost, diffs) {
var PostTools = {};
var staleReplyAnyway = false;
@@ -139,6 +140,11 @@ define('forum/topic/postTools', [
}
});
postContainer.on('click', '[component="post/view-history"], [component="post/edit-indicator"]', function () {
var btn = $(this);
diffs.open(getData(btn, 'data-pid'));
});
postContainer.on('click', '[component="post/delete"]', function () {
var btn = $(this);
var timestamp = parseInt(getData(btn, 'data-timestamp'), 10);