diff --git a/css/style.css b/css/style.css index b35a817..e44312b 100644 --- a/css/style.css +++ b/css/style.css @@ -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 **************************************/ diff --git a/home.html b/home.html index b3f3e66..0a751b3 100644 --- a/home.html +++ b/home.html @@ -480,7 +480,6 @@ -
    @@ -503,7 +502,8 @@ - + +
    diff --git a/js/interface_common.js b/js/interface_common.js index d9e0add..92d3c71 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -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' ) diff --git a/js/interface_localization.js b/js/interface_localization.js index b56c156..9738c2d 100644 --- a/js/interface_localization.js +++ b/js/interface_localization.js @@ -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": "Тенденции", diff --git a/js/twister_actions.js b/js/twister_actions.js index 9634626..cb1734a 100644 --- a/js/twister_actions.js +++ b/js/twister_actions.js @@ -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(); } } } diff --git a/js/twister_following.js b/js/twister_following.js index 3bcc575..cec7fb8 100644 --- a/js/twister_following.js +++ b/js/twister_following.js @@ -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 ); }