Browse Source

add `click to post citation to open post in tmobile`

master
Simon Grim 10 years ago
parent
commit
80be52b2d9
  1. 9
      js/tmobile.js
  2. 3
      js/twister_formatpost.js

9
js/tmobile.js

@ -488,6 +488,15 @@ function handleAvatarFileSelectMobile(evt) { @@ -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() {

3
js/twister_formatpost.js

@ -120,7 +120,7 @@ function postToElem(post, kind, promoted) { @@ -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) { @@ -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);

Loading…
Cancel
Save