Browse Source

Merge remote-tracking branch 'origin/tasty-fixes-13'

master
Simon Grim 9 years ago
parent
commit
3b19eb584e
  1. 4
      css/profile.css
  2. 7
      css/style.css
  3. 2
      js/interface_common.js
  4. 61
      js/twister_formatpost.js
  5. 4
      theme_calm/css/profile.css
  6. 5
      theme_calm/css/style.css
  7. 4
      theme_nin/css/style.css
  8. 4
      theme_nin/sass/_postboard.sass

4
css/profile.css

@ -308,7 +308,3 @@ h1.profile-name { @@ -308,7 +308,3 @@ h1.profile-name {
h2.profile-screen-name {
display: block;
}
.profile-modal .modal-buttons {
display: none;
}

7
css/style.css

@ -954,10 +954,11 @@ ol.toptrends-list { @@ -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;

2
js/interface_common.js

@ -627,7 +627,7 @@ function posPostPreview(event) { @@ -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);
}

61
js/twister_formatpost.js

@ -35,22 +35,6 @@ $(document).ready(function() { @@ -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) { @@ -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) { @@ -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,

4
theme_calm/css/profile.css

@ -385,10 +385,6 @@ h2.profile-screen-name { @@ -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,

5
theme_calm/css/style.css

@ -1156,6 +1156,11 @@ textarea.splited-post { @@ -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;

4
theme_nin/css/style.css

@ -771,6 +771,10 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, @@ -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;

4
theme_nin/sass/_postboard.sass

@ -78,6 +78,10 @@ @@ -78,6 +78,10 @@
.post:hover
cursor: pointer
.post.new
.post-info-time
color: $color-green
.open
background: none

Loading…
Cancel
Save