mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge pull request #4504 from VSEphpbb/ticket/14855
[ticket/14855] Update notification and PM alert bubbles
This commit is contained in:
commit
372324cead
5 changed files with 31 additions and 14 deletions
|
@ -132,9 +132,9 @@ phpbb.markNotifications = function($popup, unreadCount) {
|
||||||
|
|
||||||
// Update the unread count.
|
// Update the unread count.
|
||||||
$('strong', '#notification_list_button').html(unreadCount);
|
$('strong', '#notification_list_button').html(unreadCount);
|
||||||
// Remove the Mark all read link if there are no unread notifications.
|
// Remove the Mark all read link & notification count if there are no unread notifications.
|
||||||
if (!unreadCount) {
|
if (!unreadCount) {
|
||||||
$('#mark_all_notifications').remove();
|
$('#mark_all_notifications, #notification_list_button > strong').remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update page title
|
// Update page title
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<!-- IF S_USER_LOGGED_IN -->
|
<!-- IF S_USER_LOGGED_IN -->
|
||||||
<li class="small-icon icon-search-new"><a href="{U_SEARCH_NEW}" role="menuitem">{L_SEARCH_NEW}</a></li>
|
<li class="small-icon icon-search-new"><a href="{U_SEARCH_NEW}" role="menuitem">{L_SEARCH_NEW}</a></li>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF S_LOAD_UNREADS -->
|
<!-- IF S_LOAD_UNREADS -->
|
||||||
<li class="small-icon icon-search-unread"><a href="{U_SEARCH_UNREAD}" role="menuitem">{L_SEARCH_UNREAD}</a></li>
|
<li class="small-icon icon-search-unread"><a href="{U_SEARCH_UNREAD}" role="menuitem">{L_SEARCH_UNREAD}</a></li>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<li class="small-icon icon-search-unanswered"><a href="{U_SEARCH_UNANSWERED}" role="menuitem">{L_SEARCH_UNANSWERED}</a></li>
|
<li class="small-icon icon-search-unanswered"><a href="{U_SEARCH_UNANSWERED}" role="menuitem">{L_SEARCH_UNANSWERED}</a></li>
|
||||||
|
@ -55,14 +55,14 @@
|
||||||
<div class="pointer"><div class="pointer-inner"></div></div>
|
<div class="pointer"><div class="pointer-inner"></div></div>
|
||||||
<ul class="dropdown-contents" role="menu">
|
<ul class="dropdown-contents" role="menu">
|
||||||
<!-- IF U_RESTORE_PERMISSIONS --><li class="small-icon icon-restore-permissions"><a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a></li><!-- ENDIF -->
|
<!-- IF U_RESTORE_PERMISSIONS --><li class="small-icon icon-restore-permissions"><a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a></li><!-- ENDIF -->
|
||||||
|
|
||||||
<!-- EVENT navbar_header_profile_list_before -->
|
<!-- EVENT navbar_header_profile_list_before -->
|
||||||
|
|
||||||
<li class="small-icon icon-ucp"><a href="{U_PROFILE}" title="{L_PROFILE}" role="menuitem">{L_PROFILE}</a></li>
|
<li class="small-icon icon-ucp"><a href="{U_PROFILE}" title="{L_PROFILE}" role="menuitem">{L_PROFILE}</a></li>
|
||||||
<li class="small-icon icon-profile"><a href="{U_USER_PROFILE}" title="{L_READ_PROFILE}" role="menuitem">{L_READ_PROFILE}</a></li>
|
<li class="small-icon icon-profile"><a href="{U_USER_PROFILE}" title="{L_READ_PROFILE}" role="menuitem">{L_READ_PROFILE}</a></li>
|
||||||
|
|
||||||
<!-- EVENT navbar_header_profile_list_after -->
|
<!-- EVENT navbar_header_profile_list_after -->
|
||||||
|
|
||||||
<li class="separator"></li>
|
<li class="separator"></li>
|
||||||
<li class="small-icon icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">{L_LOGIN_LOGOUT}</a></li>
|
<li class="small-icon icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">{L_LOGIN_LOGOUT}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -72,12 +72,12 @@
|
||||||
</li>
|
</li>
|
||||||
<!-- IF S_DISPLAY_PM -->
|
<!-- IF S_DISPLAY_PM -->
|
||||||
<li class="small-icon icon-pm rightside" data-skip-responsive="true">
|
<li class="small-icon icon-pm rightside" data-skip-responsive="true">
|
||||||
<a href="{U_PRIVATEMSGS}" role="menuitem"><span>{L_PRIVATE_MESSAGES} [</span><strong>{PRIVATE_MESSAGE_COUNT}</strong><span>]</span></a>
|
<a href="{U_PRIVATEMSGS}" role="menuitem"><span>{L_PRIVATE_MESSAGES} </span><!-- IF PRIVATE_MESSAGE_COUNT --><strong class="badge">{PRIVATE_MESSAGE_COUNT}</strong><!-- ENDIF --></a>
|
||||||
</li>
|
</li>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF S_NOTIFICATIONS_DISPLAY -->
|
<!-- IF S_NOTIFICATIONS_DISPLAY -->
|
||||||
<li class="small-icon icon-notification dropdown-container dropdown-{S_CONTENT_FLOW_END} rightside" data-skip-responsive="true">
|
<li class="small-icon icon-notification dropdown-container dropdown-{S_CONTENT_FLOW_END} rightside" data-skip-responsive="true">
|
||||||
<a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button" class="dropdown-trigger"><span>{L_NOTIFICATIONS} [</span><strong>{NOTIFICATIONS_COUNT}</strong><span>]</span></a>
|
<a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button" class="dropdown-trigger"><span>{L_NOTIFICATIONS} </span><!-- IF NOTIFICATIONS_COUNT --><strong class="badge">{NOTIFICATIONS_COUNT}</strong><!-- ENDIF --></a>
|
||||||
<!-- INCLUDE notification_dropdown.html -->
|
<!-- INCLUDE notification_dropdown.html -->
|
||||||
</li>
|
</li>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
|
@ -1161,3 +1161,8 @@ ul.linklist li.responsive-menu a.responsive-menu-link:hover:before, ul.linklist
|
||||||
li.notification-reported strong, li.notification-disapproved strong {
|
li.notification-reported strong, li.notification-disapproved strong {
|
||||||
color: #D31141;
|
color: #D31141;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
background-color: #D31141;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
|
@ -1251,6 +1251,22 @@ ul.linklist:after,
|
||||||
margin-left: 58px;
|
margin-left: 58px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
border-radius: 10px;
|
||||||
|
opacity: 0.8;
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size: 10px;
|
||||||
|
line-height: 1;
|
||||||
|
float: right;
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 3px;
|
||||||
|
vertical-align: baseline;
|
||||||
|
position: relative;
|
||||||
|
top: 3px;
|
||||||
|
padding: 4px 6px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Navbar specific list items
|
/* Navbar specific list items
|
||||||
----------------------------------------*/
|
----------------------------------------*/
|
||||||
|
|
||||||
|
@ -1281,10 +1297,6 @@ ul.linklist:after,
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.compact .icon-notification > a > strong, .compact .icon-pm > a > strong {
|
|
||||||
padding-left: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-page-jump .dropdown {
|
.dropdown-page-jump .dropdown {
|
||||||
top: 20px;
|
top: 20px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,6 +82,6 @@ class phpbb_functional_notification_test extends phpbb_functional_test_case
|
||||||
// Get form token
|
// Get form token
|
||||||
$link = $crawler->selectLink($this->lang('NOTIFICATIONS_MARK_ALL_READ'))->link()->getUri();
|
$link = $crawler->selectLink($this->lang('NOTIFICATIONS_MARK_ALL_READ'))->link()->getUri();
|
||||||
$crawler = self::request('GET', substr($link, strpos($link, 'ucp.')));
|
$crawler = self::request('GET', substr($link, strpos($link, 'ucp.')));
|
||||||
$this->assertEquals(0, $crawler->filter('#notification_list_button strong')->text());
|
$this->assertCount(0, $crawler->filter('#notification_list_button strong'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue