tooltip for hidden notices from blocked users

This commit is contained in:
Hannes Mannerheim 2015-11-18 22:14:12 +01:00
parent 3ffc3a445e
commit 8e001e3708
24 changed files with 67 additions and 27 deletions

View File

@ -1405,7 +1405,9 @@ body.rtl #footer-spinner-container {
transition-duration: 0.1s;
transition-timing-function: ease-in;
transition-delay: 0.6s;
word-break: break-all;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
.tooltip-caret {
z-index: 10000;
@ -1940,6 +1942,24 @@ body.rtl .queet.rtl .expanded-content {
height:15px;
overflow:hidden;
}
.stream-item:not(.expanded).profile-blocked-by-me::before {
display: block;
position: absolute;
left:0;
top:0;
height:15px;
width:calc(100% - 20px);
background-color: #fff;
content: ' ';
z-index: 101;
border-bottom:1px solid #ddd;
box-sizing: border-box;
}
.stream-item:not(.expanded).profile-blocked-by-me .queet {
width:20px;
position:absolute;
right:0;
}
.stream-item:not(.expanded).profile-blocked-by-me .queet::before {
display: block;
position: absolute;
@ -1959,9 +1979,6 @@ body.rtl .queet.rtl .expanded-content {
border-bottom:1px solid #ddd;
box-sizing: border-box;
}
.stream-item:not(.expanded).profile-blocked-by-me:hover .queet::before {
background-color: #f5f5f5;
}
/* only show activity notices if they are conversation starters
we never need to see these, but sometimes someone replies to

View File

@ -1841,10 +1841,12 @@ function addToFeed(feed, after, extraClasses, isReply) {
function buildQueetHtml(obj, idInStream, extraClassesThisRun, requeeted_by, isConversation) {
// if we've blocked this user, but it has slipped through anyway
var blockingTooltip = '';
if(typeof window.allBlocking != 'undefined') {
$.each(window.allBlocking,function(){
if(this == obj.user.id){
extraClassesThisRun = extraClassesThisRun + ' profile-blocked-by-me';
blockingTooltip = ' data-tooltip="' + window.sL.thisIsANoticeFromABlockedUser + '"';
return false; // break
}
});
@ -2010,7 +2012,7 @@ function buildQueetHtml(obj, idInStream, extraClassesThisRun, requeeted_by, isCo
data-in-reply-to-screen-name="' + in_reply_to_screen_name + '" \
data-in-reply-to-status-id="' + obj.in_reply_to_status_id + '"\
' + requeetedByMe + '>\
<div class="queet" id="' + idPrepend + 'q-' + obj.id + '">\
<div class="queet" id="' + idPrepend + 'q-' + obj.id + '"' + blockingTooltip + '>\
' + requeetHtml + '\
' + ostatusHtml + '\
<div class="queet-content">\

View File

@ -133,7 +133,7 @@ $('body').on({
// regular tooltips
if($(e.target).is('[data-tooltip]')) {
tooltip_data = $(e.target).attr('data-tooltip');
var tooltipElement = $('<div class="tooltip">' + tooltip_data + '</div>');
var tooltipElement = $('<div class="tooltip" lang="' + window.selectedLanguage + '">' + tooltip_data + '</div>');
var tooltipCaret = $('<div class="tooltip-caret"></div>');
$('body').prepend(tooltipElement);
$('body').prepend(tooltipCaret);

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Échec de lenregistrement de vos paramètres",
"ERRORfailedMarkingAllNotificationsAsRead":"Échec du marquage de toutes les notifications comme vues",
"newNotification": "{new-notice-count} nouvelle notification",
"newNotifications": "{new-notice-count} nouvelles notifications"
"newNotifications": "{new-notice-count} nouvelles notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Feilet ved lagring av innstillinger",
"ERRORfailedMarkingAllNotificationsAsRead":"Feilet ved forsøk å markere alle notifikasjoner som lest.",
"newNotification": "{new-notice-count} ny notifikasjon",
"newNotifications": "{new-notice-count} nye notifikasjoner"
"newNotifications": "{new-notice-count} nye notifikasjoner",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -150,5 +150,6 @@
"ERRORfailedSavingYourSetting":"Misslyckades med att spara din inställning",
"ERRORfailedMarkingAllNotificationsAsRead":"Misslyckades med att markera alla notiser som lästa.",
"newNotification": "{new-notice-count} ny notis",
"newNotifications": "{new-notice-count} nya notiser"
"newNotifications": "{new-notice-count} nya notiser",
"thisIsANoticeFromABlockedUser":"Varning! Det här är en qvittring från en användare som du har blockerat. Klicka för att visa den."
}

View File

@ -149,5 +149,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}

View File

@ -149,5 +149,6 @@
"ERRORfailedSavingYourSetting":"Failed saving your setting",
"ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.",
"newNotification": "{new-notice-count} new notification",
"newNotifications": "{new-notice-count} new notifications"
"newNotifications": "{new-notice-count} new notifications",
"thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it."
}