diff --git a/core/userrights.class.inc.php b/core/userrights.class.inc.php index 2bb733baf9..723ba827f9 100644 --- a/core/userrights.class.inc.php +++ b/core/userrights.class.inc.php @@ -1117,8 +1117,7 @@ class UserRights */ public static function GetContactPicture($sName = '') { - // TODO: replace with console one - $sPictureUrl = utils::GetAbsoluteUrlAppRoot().'images/user-pictures/' . appUserPreferences::GetPref('user_picture_placeholder', 'default-placeholder.png'); + $sPictureUrl = utils::GetAbsoluteUrlAppRoot().'images/user-pictures/' . appUserPreferences::GetPref('user_picture_placeholder', 'user-profile-default-256px.png'); if (empty($sName)) { diff --git a/js/components/popover-menu.js b/js/components/popover-menu.js index fcc19040d2..c9bdfa9cd5 100644 --- a/js/components/popover-menu.js +++ b/js/components/popover-menu.js @@ -89,5 +89,16 @@ $(function() { this._closePopup(); }, + togglePopup: function() + { + if(this.element.hasClass(this.css_classes.opened)) + { + this._closePopup(); + } + else + { + this._openPopup(); + } + }, }); }); diff --git a/js/layouts/navigation-menu.js b/js/layouts/navigation-menu.js index bd5849af2e..8f9cb4817b 100644 --- a/js/layouts/navigation-menu.js +++ b/js/layouts/navigation-menu.js @@ -189,7 +189,7 @@ $(function() 'top': (aEventTargetPos.top + parseInt(oEventTarget.css('marginTop'), 10) - $(this.js_selectors.user_menu).height()) + 'px', 'left': (aEventTargetPos.left + parseInt(oEventTarget.css('marginLeft'), 10) + oEventTarget.width()) + 'px' }); - $(this.js_selectors.user_menu).popover_menu('openPopup'); + $(this.js_selectors.user_menu).popover_menu('togglePopup'); }, // Methods diff --git a/js/newsroom_menu.js b/js/newsroom_menu.js index 1b8756a5f9..d9067cc674 100644 --- a/js/newsroom_menu.js +++ b/js/newsroom_menu.js @@ -34,7 +34,7 @@ $(function() 'left': (aEventTargetPos.left + parseInt(oEventTarget.css('marginLeft'), 10) + oEventTarget.width()) + 'px', 'max-height' : (aEventTargetPos.top + parseInt(oEventTarget.css('marginTop'), 10) - 100) + 'px' }); - $(me.element).popover_menu("openPopup"); + $(me.element).popover_menu("togglePopup"); }); this.element .addClass('itop-newsroom_menu'); @@ -199,7 +199,7 @@ $(function() }, _buildSingleShowAllMessagesItem: function() { - return '' + this.options.labels.view_all + ''; + return '' + this.options.labels.view_all + ''; }, _buildMultipleShowAllMessagesItem: function(aUnreadMessagesByProvider) { @@ -296,7 +296,7 @@ $(function() oElem.css({ 'left': (aEventTargetPos.left + parseInt(oEventTarget.css('marginLeft'), 10) + oEventTarget.width()) + 'px' }); - oElem.popover_menu("openPopup"); + oElem.popover_menu("togglePopup"); }); } @@ -312,7 +312,7 @@ $(function() // window.open(sUrl, '_blank'); // $('#newsroom_menu').remove(); // $('#newsroom_menu_counter_container').remove(); - $(me.element).popover_menu("closePopup"); + $(me.element).popover_menu("togglePopup"); this._getAllMessages(); }, _resetUnseenCount: function()