add click to post citation to open post in tmobile

This commit is contained in:
Simon Grim 2015-08-16 00:25:17 +05:00
parent 7a6669d926
commit 80be52b2d9
2 changed files with 11 additions and 1 deletions

View File

@ -488,6 +488,15 @@ function handleAvatarFileSelectMobile(evt) {
}
}
function openConversationClick(event) {
event.stopPropagation();
event.preventDefault();
var userpost = $(event.target).closest(event.data.feeder).attr('data-userpost');
$.mobile.showPageLoadingMsg();
$.mobile.navigate('#post?userpost=' + encodeURIComponent(userpost));
}
function clearProfilePage() {

View File

@ -120,7 +120,7 @@ function postToElem(post, kind, promoted) {
.attr('data-content_to_sigrt', content_to_sigrt)
.attr('data-screen-name', username)
.attr('data-id', k)
.attr('data-lastk', userpost["lastk"])
.attr('data-lastk', userpost.lastk)
.attr('data-text', msg)
;
if (userpost.reply) {
@ -170,6 +170,7 @@ function postToElem(post, kind, promoted) {
.find('.post-rt-reference')
.attr('data-screen-name', rt.n)
.attr('data-id', rt.k)
.attr('data-userpost', $.toJSON({userpost: rt, sig_userpost: userpost.sig_rt}))
.find('.post-text').html(htmlFormatMsg(rt.msg).html)
;
setPostCommon(postContext, rt.n, rt.time);