mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°2039 - Refresh messages without waiting for the providers TTL to avoid news not being visible even though they have been created
This commit is contained in:
@@ -45,11 +45,15 @@ $(function()
|
||||
|
||||
// Important: For now, the popover menu is manually instantiated even though the PHP NewsroomMenu class inherits PopoverMenu because the jQuery widget doesn't. We might refactor this in the future.
|
||||
$(me.element).popover_menu({'toggler': this.js_selectors.menu_toggler});
|
||||
$(this.js_selectors.menu_toggler).on('click', function (oEvent) {
|
||||
$(this.js_selectors.menu_toggler).off('click').on('click', function (oEvent) {
|
||||
var oEventTarget = $(oEvent.target);
|
||||
var aEventTargetPos = oEventTarget.position();
|
||||
var aEventTargetOffset = oEventTarget.offset();
|
||||
|
||||
// N°2039 - When opening the menu, refresh messages without waiting for the providers TTL to avoid news not being visible even though they have been created
|
||||
me.clearCache();
|
||||
me._getAllMessages();
|
||||
|
||||
$iHeight = Math.abs(aEventTargetOffset.top-100);
|
||||
$(me.element).css({
|
||||
'max-height': $iHeight+'px',
|
||||
|
||||
Reference in New Issue
Block a user