mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-27 07:04:24 +00:00
Merge remote-tracking branch 'origin/tasty-fixes-13'
This commit is contained in:
commit
3b19eb584e
@ -308,7 +308,3 @@ h1.profile-name {
|
||||
h2.profile-screen-name {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.profile-modal .modal-buttons {
|
||||
display: none;
|
||||
}
|
||||
|
@ -954,10 +954,11 @@ ol.toptrends-list {
|
||||
transition: background .1s linear;
|
||||
-moz-transition: background .1s linear;
|
||||
}
|
||||
.post.new
|
||||
{
|
||||
background: #F7F8E0;
|
||||
|
||||
.post.new {
|
||||
background-color: #FFFFED;
|
||||
}
|
||||
|
||||
.post.open
|
||||
{
|
||||
margin: 10px 0;
|
||||
|
@ -627,7 +627,7 @@ function posPostPreview(event) {
|
||||
if (textArea[0].value.length)
|
||||
postPreview.html(htmlFormatMsg(textArea[0].value).html).show();
|
||||
else
|
||||
postPreview.slideUp('fast');
|
||||
postPreview.hide();
|
||||
textArea.before(postPreview);
|
||||
}
|
||||
|
||||
|
@ -35,22 +35,6 @@ $(document).ready(function() {
|
||||
// format "userpost" to html element
|
||||
// kind = "original"/"ancestor"/"descendant"
|
||||
function postToElem(post, kind, promoted) {
|
||||
|
||||
function setPostCommon(elem, username, time) {
|
||||
var postInfoName = elem.find('.post-info-name')
|
||||
.text(username).attr('href', $.MAL.userUrl(username));
|
||||
|
||||
getFullname(username, postInfoName);
|
||||
//elem.find('.post-info-tag').text("@" + username); // FIXME
|
||||
getAvatar(username, elem.find('.avatar'));
|
||||
|
||||
elem.find('.post-info-time')
|
||||
.attr('title', timeSincePost(time))
|
||||
.find('span:last')
|
||||
.text(timeGmtToText(time))
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
"userpost" :
|
||||
{
|
||||
@ -170,19 +154,22 @@ function postToElem(post, kind, promoted) {
|
||||
if (typeof retweeted_by !== 'undefined') {
|
||||
var postContext = elem.find('.post-context');
|
||||
if (userpost.msg) {
|
||||
postContext.append(_templatePostRtReference.clone(true))
|
||||
.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);
|
||||
setPostReference(postContext, rt, userpost.sig_rt);
|
||||
} else {
|
||||
postContext.append(_templatePostRtBy.clone(true))
|
||||
.find('.post-retransmited-by')
|
||||
.attr('href', $.MAL.userUrl(retweeted_by)).text('@' + retweeted_by)
|
||||
;
|
||||
// let's check original post and grab some possible RT
|
||||
dhtget(username, 'post' + k, 's',
|
||||
function(args, post) {
|
||||
if (post && post.userpost.msg && post.userpost.rt) {
|
||||
var postContext = $('<div class="post-context"></div>');
|
||||
setPostReference(postContext, post.userpost.rt, post.userpost.sig_rt);
|
||||
args.elem.find('.post-text').after(postContext);
|
||||
}
|
||||
}, {elem: elem}
|
||||
);
|
||||
}
|
||||
postContext.show();
|
||||
}
|
||||
@ -226,6 +213,32 @@ function postToElem(post, kind, promoted) {
|
||||
return elem;
|
||||
}
|
||||
|
||||
function setPostCommon(elem, username, time) {
|
||||
var postInfoName = elem.find('.post-info-name')
|
||||
.text(username).attr('href', $.MAL.userUrl(username));
|
||||
|
||||
getFullname(username, postInfoName);
|
||||
//elem.find('.post-info-tag').text("@" + username); // FIXME
|
||||
getAvatar(username, elem.find('.avatar'));
|
||||
|
||||
elem.find('.post-info-time')
|
||||
.attr('title', timeSincePost(time))
|
||||
.find('span:last')
|
||||
.text(timeGmtToText(time))
|
||||
;
|
||||
}
|
||||
|
||||
function setPostReference(elem, rt, sig_rt) {
|
||||
elem.append(_templatePostRtReference.clone(true))
|
||||
.find('.post-rt-reference')
|
||||
.attr('data-screen-name', rt.n)
|
||||
.attr('data-id', rt.k)
|
||||
.attr('data-userpost', $.toJSON({userpost: rt, sig_userpost: sig_rt}))
|
||||
.find('.post-text').html(htmlFormatMsg(rt.msg).html)
|
||||
;
|
||||
setPostCommon(elem, rt.n, rt.time);
|
||||
}
|
||||
|
||||
function setPostInfoSent(n, k, item) {
|
||||
if( n === defaultScreenName && k >= 0 ) {
|
||||
getPostMaxAvailability(n,k,
|
||||
|
@ -385,10 +385,6 @@ h2.profile-screen-name {
|
||||
color: #8f95a4;
|
||||
}
|
||||
|
||||
.profile-modal .modal-buttons {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.profile-modal h1.profile-name,
|
||||
.profile-modal h2.profile-screen-name,
|
||||
.profile-modal span.profile-location,
|
||||
|
@ -1156,6 +1156,11 @@ textarea.splited-post {
|
||||
transition: background .1s linear;
|
||||
-moz-transition: background .1s linear;
|
||||
}
|
||||
|
||||
.post.new {
|
||||
background-color: #FFFFED;
|
||||
}
|
||||
|
||||
.post.open
|
||||
{
|
||||
margin: 10px 0;
|
||||
|
@ -771,6 +771,10 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu,
|
||||
color: #414244;
|
||||
}
|
||||
|
||||
.post.new .post-info-time {
|
||||
color: #B4C669;
|
||||
}
|
||||
|
||||
/* line 55, ../sass/_postboard.sass */
|
||||
.post-data {
|
||||
padding: 10px;
|
||||
|
@ -78,6 +78,10 @@
|
||||
.post:hover
|
||||
cursor: pointer
|
||||
|
||||
.post.new
|
||||
.post-info-time
|
||||
color: $color-green
|
||||
|
||||
|
||||
.open
|
||||
background: none
|
||||
|
Loading…
x
Reference in New Issue
Block a user