mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-27 07:04:24 +00:00
fix showing of tmobile's single post
This commit is contained in:
parent
fa79bc595c
commit
a8a3d42ca7
@ -169,11 +169,14 @@ var router=new $.mobile.Router(
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
post: function(type,match,ui) {
|
post: function(type,match,ui) {
|
||||||
var params=router.getParams(match[1]);
|
initializeTwister( true, true, function (req) {
|
||||||
initializeTwister( true, true, function() {
|
if (!req || !req.userpost) return;
|
||||||
|
|
||||||
|
var originalLi = postToElem(JSON.parse(req.userpost), 'original', false, twister.tmpl.postFull)
|
||||||
|
.addClass('expanded-post')
|
||||||
|
;
|
||||||
var $ulPost = $("#post ul.posts");
|
var $ulPost = $("#post ul.posts");
|
||||||
$ulPost.text("");
|
$ulPost.text("");
|
||||||
var originalLi = postToElem(JSON.parse(params.userpost), 'original', false, twister.tmpl.postFull);
|
|
||||||
$ulPost.append(originalLi);
|
$ulPost.append(originalLi);
|
||||||
$ulPost.find(".post-interactions").trigger('create');
|
$ulPost.find(".post-interactions").trigger('create');
|
||||||
$ulPost.listview('refresh');
|
$ulPost.listview('refresh');
|
||||||
@ -185,7 +188,7 @@ var router=new $.mobile.Router(
|
|||||||
// RTs faces and counter
|
// RTs faces and counter
|
||||||
var postDataElem = originalLi.find('.post-data');
|
var postDataElem = originalLi.find('.post-data');
|
||||||
requestRTs(postDataElem.attr('data-screen-name'), postDataElem.attr('data-id'));
|
requestRTs(postDataElem.attr('data-screen-name'), postDataElem.attr('data-id'));
|
||||||
});
|
}, router.getParams(match[1]));
|
||||||
},
|
},
|
||||||
newmsg: function(type,match,ui) {
|
newmsg: function(type,match,ui) {
|
||||||
var params=router.getParams(match[1]);
|
var params=router.getParams(match[1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user