From 0e37dc75377cce170341957e44b2950ba0875cd5 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Mon, 30 Mar 2015 23:26:07 +0500 Subject: [PATCH] hiding of mentions autocomleting if posts before appear, tuning of css --- css/style.css | 13 ++++++++----- js/twister_actions.js | 21 ++++++++++++--------- theme_calm/css/style.css | 1 + theme_nin/css/style.css | 5 +++-- theme_nin/sass/style.sass | 4 +++- 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/css/style.css b/css/style.css index 5fb81b2..6c28d37 100644 --- a/css/style.css +++ b/css/style.css @@ -619,6 +619,11 @@ button.follow:hover, button.unfollow:hover, .following-list button.private:hover padding: 4px; font-size: 13px; } + +.post-area-new textarea:focus { + border: solid 1px rgba( 227, 79, 66, .5 ); +} + .mini-profile .post-area-new { padding: 9px; @@ -631,8 +636,6 @@ button.follow:hover, button.unfollow:hover, .following-list button.private:hover .post-area-new.open textarea { height: 80px; - border: solid 1px rgba( 227, 79, 66, .5 ); - box-shadow: 0 0 10px rgba(0, 0, 0, .3 ); } textarea.splited-post { box-shadow: none!important; @@ -1350,7 +1353,7 @@ ol.toptrends-list { left: 50%; height: 80%; margin-left: -290px; - box-shadow: 0 0 30px rgba( 0, 0, 0, .6 ); + box-shadow: 10px 12px 18px 0px rgba(0,0,0, .3); background: rgba( 255, 255,255, 1.0 ); z-index: 3; } @@ -1644,8 +1647,8 @@ ol.toptrends-list { position: fixed; top: 50%; left: 50%; - background: rgba( 255, 255,255, 1.0 ); - box-shadow: 0 0 30px rgba( 0, 0, 0, .6 ); + background: #fff; + box-shadow: 10px 12px 18px 0px rgba(0,0,0, .3); z-index: 5; width: 600px; margin-left:-300px; diff --git a/js/twister_actions.js b/js/twister_actions.js index ac3e8bb..818b4bd 100644 --- a/js/twister_actions.js +++ b/js/twister_actions.js @@ -30,14 +30,17 @@ function requestRepliedBefore(postLi) if( reply_n != undefined && reply_k != undefined ) { dhtget( reply_n, "post" + reply_k, "s", - function(postLi, postFromJson) { - var newStreamPost = postToElem(postFromJson, "related"); - newStreamPost.hide(); - postLi.before(newStreamPost); - newStreamPost.slideDown("fast"); - $.MAL.relatedPostLoaded(); - requestRepliedBefore(newStreamPost); - }, postLi); + function(postLi, postFromJson) { + if (postFromJson) { + postLi.find('textarea').textcomplete('destroy'); // FIXME maybe we need to reset position instead (but curently it's cheaper) + var newStreamPost = postToElem(postFromJson, "related"); + newStreamPost.hide(); + postLi.before(newStreamPost); + newStreamPost.slideDown("fast"); + $.MAL.relatedPostLoaded(); + requestRepliedBefore(newStreamPost); + } + }, postLi); } } @@ -150,7 +153,7 @@ var profilePostsLoading = false; function requestPost(containerToAppend,username,resource,cbFunc,cbArgs){ - console.log('dhtget '+username+' '+resource); + //console.log('dhtget '+username+' '+resource); dhtget( username, resource, "s", function(args, postFromJson) { diff --git a/theme_calm/css/style.css b/theme_calm/css/style.css index d96eb40..8c5318c 100644 --- a/theme_calm/css/style.css +++ b/theme_calm/css/style.css @@ -1017,6 +1017,7 @@ textarea.splited-post { color: rgba( 255, 255, 255, 1 ); border-bottom: solid 1px rgba( 69, 71, 77, .1 ); margin: 0 0 5px 0; + padding-left: 10px; background: #7691ce; border-radius: 2px; } diff --git a/theme_nin/css/style.css b/theme_nin/css/style.css index 2969a8c..42bdde5 100644 --- a/theme_nin/css/style.css +++ b/theme_nin/css/style.css @@ -1911,6 +1911,8 @@ button.disabled:hover, .mini-profile-actions span.disabled:hover, a.button.disab right: -10px; width: 250px; overflow: hidden; + border-bottom: solid 2px #B4C669; + box-shadow: 8px 10px 15px 0px rgba(0,0,0, .3); } /* line 85, ../sass/style.sass */ @@ -3199,9 +3201,8 @@ ul.dropdown-menu { margin: 2px 0 0; list-style: none; background-color: #fff; - border: 1px solid rgba(0, 0, 0, 0.2); border-bottom: solid 2px #B4C669; - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 8px 10px 10px 0px rgba(0,0,0, .2); } /* line 1105, ../sass/style.sass */ diff --git a/theme_nin/sass/style.sass b/theme_nin/sass/style.sass index 7d4b1f3..54d8291 100755 --- a/theme_nin/sass/style.sass +++ b/theme_nin/sass/style.sass @@ -82,6 +82,8 @@ right: -10px width: 250px overflow: hidden + border-bottom: solid 2px #B4C669 + box-shadow: 8px 10px 15px 0px rgba(0,0,0, .3) .userMenu-search .dialog-modal:after right: auto @@ -1131,7 +1133,7 @@ ul.dropdown-menu background-color: #fff border: 1px solid rgba(0, 0, 0, 0.2) border-bottom: solid 2px #B4C669 - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2) + box-shadow: 8px 10px 10px 0px rgba(0,0,0, .2) li > li > a padding: 3px 20px