diff options
| author | Tristan Darricau <github@nicofuma.fr> | 2016-12-11 20:11:17 +0100 | 
|---|---|---|
| committer | Tristan Darricau <github@nicofuma.fr> | 2016-12-11 20:11:17 +0100 | 
| commit | e40afd8cd160a5b13cba08fa1725c50a27d0f022 (patch) | |
| tree | 556fd6f46e1b220cf21039c858c898460462c7e4 | |
| parent | ad3b7830b4efe732653bbb5dcef723055a591569 (diff) | |
| parent | daae2147c867335f8af0c64b78b4c9f674eb0d27 (diff) | |
| download | forums-e40afd8cd160a5b13cba08fa1725c50a27d0f022.tar forums-e40afd8cd160a5b13cba08fa1725c50a27d0f022.tar.gz forums-e40afd8cd160a5b13cba08fa1725c50a27d0f022.tar.bz2 forums-e40afd8cd160a5b13cba08fa1725c50a27d0f022.tar.xz forums-e40afd8cd160a5b13cba08fa1725c50a27d0f022.zip  | |
Merge pull request #4572 from javiexin/ticket/14855
[ticket/14855] Update notification and PM alert bubbles
* javiexin/ticket/14855:
  [ticket/14855] Update notification and PM alert bubbles
  [ticket/14855] Update notification and PM alert bubbles
  [ticket/14855] Update notification and PM alert bubbles
| -rw-r--r-- | phpBB/styles/prosilver/template/ajax.js | 5 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/navbar_header.html | 4 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/theme/common.css | 4 | ||||
| -rw-r--r-- | tests/functional/notification_test.php | 3 | 
4 files changed, 11 insertions, 5 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 311da92a95..ec9b53328f 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -132,9 +132,10 @@ phpbb.markNotifications = function($popup, unreadCount) {  	// Update the unread count.  	$('strong', '#notification_list_button').html(unreadCount); -	// Remove the Mark all read link & notification count if there are no unread notifications. +	// Remove the Mark all read link and hide notification count if there are no unread notifications.  	if (!unreadCount) { -		$('#mark_all_notifications, #notification_list_button > strong').remove(); +		$('#mark_all_notifications').remove(); +		$('#notification_list_button > strong').addClass('hidden');  	}  	// Update page title diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html index e5f354a943..bdfb5fb87d 100644 --- a/phpBB/styles/prosilver/template/navbar_header.html +++ b/phpBB/styles/prosilver/template/navbar_header.html @@ -72,12 +72,12 @@  		</li>  		<!-- IF S_DISPLAY_PM -->  			<li class="small-icon icon-pm rightside" data-skip-responsive="true"> -				<a href="{U_PRIVATEMSGS}" role="menuitem"><span>{L_PRIVATE_MESSAGES} </span><!-- IF PRIVATE_MESSAGE_COUNT --><strong class="badge">{PRIVATE_MESSAGE_COUNT}</strong><!-- ENDIF --></a> +				<a href="{U_PRIVATEMSGS}" role="menuitem"><span>{L_PRIVATE_MESSAGES} </span><strong class="badge<!-- IF not PRIVATE_MESSAGE_COUNT --> hidden<!-- ENDIF -->">{PRIVATE_MESSAGE_COUNT}</strong></a>  			</li>  		<!-- ENDIF -->  		<!-- IF S_NOTIFICATIONS_DISPLAY -->  			<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><!-- IF NOTIFICATIONS_COUNT --><strong class="badge">{NOTIFICATIONS_COUNT}</strong><!-- ENDIF --></a> +				<a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button" class="dropdown-trigger"><span>{L_NOTIFICATIONS} </span><strong class="badge<!-- IF not NOTIFICATIONS_COUNT --> hidden<!-- ENDIF -->">{NOTIFICATIONS_COUNT}</strong></a>  				<!-- INCLUDE notification_dropdown.html -->  			</li>  		<!-- ENDIF --> diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index cf6d14e6ab..0ac7a45a23 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -1269,6 +1269,10 @@ ul.linklist:after,  	padding: 4px 6px;  } +.badge.hidden { +	display: none; +} +  /* Navbar specific list items  ----------------------------------------*/ diff --git a/tests/functional/notification_test.php b/tests/functional/notification_test.php index d4c61cc062..f21d73817a 100644 --- a/tests/functional/notification_test.php +++ b/tests/functional/notification_test.php @@ -82,6 +82,7 @@ class phpbb_functional_notification_test extends phpbb_functional_test_case  		// Get form token  		$link = $crawler->selectLink($this->lang('NOTIFICATIONS_MARK_ALL_READ'))->link()->getUri();  		$crawler = self::request('GET', substr($link, strpos($link, 'ucp.'))); -		$this->assertCount(0, $crawler->filter('#notification_list_button strong')); +		$this->assertCount(1, $crawler->filter('#notification_list_button strong.badge.hidden')); +		$this->assertEquals("0", $crawler->filter('#notification_list_button strong.badge.hidden')->text());  	}  }  | 
