diff --git a/css/profile.css b/css/profile.css index 96dd839..f0c2b39 100644 --- a/css/profile.css +++ b/css/profile.css @@ -308,7 +308,3 @@ h1.profile-name { h2.profile-screen-name { display: block; } - -.profile-modal .modal-buttons { - display: none; -} diff --git a/css/style.css b/css/style.css index 3c39426..8a5b111 100644 --- a/css/style.css +++ b/css/style.css @@ -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; diff --git a/js/interface_common.js b/js/interface_common.js index a3d1e93..e7a4065 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -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); } diff --git a/js/twister_formatpost.js b/js/twister_formatpost.js index 3aa20a9..c7f65c4 100644 --- a/js/twister_formatpost.js +++ b/js/twister_formatpost.js @@ -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 = $('
'); + 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, diff --git a/theme_calm/css/profile.css b/theme_calm/css/profile.css index adf7f4a..929edc9 100644 --- a/theme_calm/css/profile.css +++ b/theme_calm/css/profile.css @@ -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, diff --git a/theme_calm/css/style.css b/theme_calm/css/style.css index 5cc723b..67791ca 100644 --- a/theme_calm/css/style.css +++ b/theme_calm/css/style.css @@ -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; diff --git a/theme_nin/css/style.css b/theme_nin/css/style.css index 45e5478..6aba4c4 100644 --- a/theme_nin/css/style.css +++ b/theme_nin/css/style.css @@ -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; diff --git a/theme_nin/sass/_postboard.sass b/theme_nin/sass/_postboard.sass index 761c8d8..adf5a7e 100755 --- a/theme_nin/sass/_postboard.sass +++ b/theme_nin/sass/_postboard.sass @@ -78,6 +78,10 @@ .post:hover cursor: pointer +.post.new + .post-info-time + color: $color-green + .open background: none