mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 07:42:17 +02:00
N°2847 * Fix wrong image name for default placeholder
* Close popupmenu when clicking on toggler a second time * Fix an error in newsroom menu
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
@@ -89,5 +89,16 @@ $(function()
|
||||
{
|
||||
this._closePopup();
|
||||
},
|
||||
togglePopup: function()
|
||||
{
|
||||
if(this.element.hasClass(this.css_classes.opened))
|
||||
{
|
||||
this._closePopup();
|
||||
}
|
||||
else
|
||||
{
|
||||
this._openPopup();
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 '<a class="ibo-popover-menu--item" data-role="ibo-navigation-menu--notifications-show-all" href="'+me.options.providers[0].view_all_url+'">' + this.options.labels.view_all + '</a>';
|
||||
return '<a class="ibo-popover-menu--item" data-role="ibo-navigation-menu--notifications-show-all" href="'+this.options.providers[0].view_all_url+'">' + this.options.labels.view_all + '</a>';
|
||||
},
|
||||
_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()
|
||||
|
||||
Reference in New Issue
Block a user