mirror of
https://github.com/twisterarmy/twister-calm.git
synced 2025-01-12 07:58:05 +00:00
update hashtag search
This commit is contained in:
parent
8c9a69b267
commit
be8bfd6d42
@ -1836,6 +1836,25 @@ input.userMenu-search-field:focus::-ms-input-placeholder {
|
||||
width: 100%;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.no-posts-found-message {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
left: 30%;
|
||||
font-size: 12px;
|
||||
}
|
||||
.no-posts-found-message:after {
|
||||
content: ' : (';
|
||||
display: block;
|
||||
width: 42px;
|
||||
margin-top: 20px;
|
||||
height: 40px;
|
||||
font-size: 30px;
|
||||
line-height: 40px;
|
||||
position: relative;
|
||||
left: 40%;
|
||||
-webkit-transform: rotate(90deg);
|
||||
}
|
||||
/*************************************
|
||||
****************** FOLLOWING MODAL
|
||||
**************************************/
|
||||
|
@ -480,7 +480,6 @@
|
||||
<!--o botão de novas postagens deve ser ocultado quando o usuário clicá-lo via javascript-->
|
||||
<button class="postboard-news" style="display:none;"></button>
|
||||
</h2>
|
||||
<div id="separator"></div>
|
||||
|
||||
<div class="postboard-posts-wrapper">
|
||||
<ol id="profile-posts" class="postboard-posts">
|
||||
@ -503,7 +502,8 @@
|
||||
<!-- o botão de novas postagens deve ser ocultado quando o usuário clicá-lo via javascript -->
|
||||
<button class="postboard-news" style="display:none;"></button>
|
||||
</h2>
|
||||
|
||||
|
||||
<span class="no-posts-found-message" style="display:none;">There aren't any posts with this hashtag.</span>
|
||||
<ol id="profile-posts" class="postboard-posts">
|
||||
</ol>
|
||||
|
||||
|
@ -163,6 +163,19 @@ function openHashtagModal(e)
|
||||
$( "."+hashtagModalClass + " h3" ).text( "#" + hashtag );
|
||||
}
|
||||
|
||||
function openHashtagModalFromSearch(hashtag)
|
||||
{
|
||||
var hashtagModalClass = "hashtag-modal";
|
||||
openModal( hashtagModalClass );
|
||||
$( "."+hashtagModalClass ).attr("data-resource","hashtag");
|
||||
|
||||
var hashtagModalContent = newHashtagModal( hashtag );
|
||||
hashtagModalContent.appendTo("." +hashtagModalClass + " .modal-content");
|
||||
|
||||
//título do modal
|
||||
$( "."+hashtagModalClass + " h3" ).text( "#" + hashtag );
|
||||
}
|
||||
|
||||
function updateHashtagModal(postboard,hashtag) {
|
||||
var $hashtagModalClass = $(".hashtag-modal");
|
||||
if( !$hashtagModalClass.length || $hashtagModalClass.css("display") == 'none' )
|
||||
|
@ -133,6 +133,7 @@ if(preferredLanguage == "en"){
|
||||
"Do you want to check Network Status page instead?",
|
||||
"The File APIs are not fully supported in this browser.": "The File APIs are not fully supported in this browser.",
|
||||
"Theme": "Theme",
|
||||
"There aren't any posts with this hashtag.": "There aren't any posts with this hashtag.",
|
||||
"time_ago": "%{time} ago", // 5 minutes ago
|
||||
"Time of the last block:": "Time of the last block: ",
|
||||
"twisted again by": "twisted again by ",
|
||||
@ -1144,6 +1145,7 @@ if(preferredLanguage == "ru"){
|
||||
"Не хотите перейти на страницу настройки сети?",
|
||||
"The File APIs are not fully supported in this browser.": "File APIs не полностью поддерживается этим браузером.",
|
||||
"Theme": "Тема оформления",
|
||||
"There aren't any posts with this hashtag.": "Посты по данному тегу отсутствуют.",
|
||||
"time_ago": "%{time} назад", // 5 minutes ago
|
||||
"Time of the last block:": "Время последнего блока: ",
|
||||
"Top Trends": "Тенденции",
|
||||
|
@ -228,6 +228,9 @@ function processHashtag(postboard, hashtag, data) {
|
||||
}
|
||||
}
|
||||
|
||||
if(!postboard.children().length&&!_hashtagPendingPosts.length)
|
||||
postboard.closest("div").find(".no-posts-found-message").show();
|
||||
|
||||
if( _hashtagPendingPosts.length ) {
|
||||
if( !postboard.children().length || autoUpdateHashtag ) {
|
||||
displayHashtagPending(postboard);
|
||||
@ -236,6 +239,7 @@ function processHashtag(postboard, hashtag, data) {
|
||||
newTweetsBar.text(polyglot.t("new_posts", _hashtagPendingPosts.length));
|
||||
newTweetsBar.fadeIn("slow");
|
||||
}
|
||||
postboard.closest("div").find(".no-posts-found-message").hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -354,9 +354,22 @@ function closeSearchDialog()
|
||||
_lastSearchUsersResults = [];
|
||||
}
|
||||
|
||||
function userSearchKeypress(item) {
|
||||
function userSearchKeypress(event) {
|
||||
var partialName = $(".userMenu-search-field").val().toLowerCase();
|
||||
|
||||
var searchResults = $(".search-results");
|
||||
|
||||
if ( partialName.substr( 0, 1 ) == '#' ) {
|
||||
|
||||
if(searchResults.is(":visible"))
|
||||
searchResults.slideUp( "fast" );
|
||||
|
||||
if ( event.which == 13 )
|
||||
openHashtagModalFromSearch(partialName.substr(1));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ( partialName.substr( 0, 1 ) == '@' ) {
|
||||
partialName = partialName.substr( 1 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user