mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 17:18:51 +02: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.
|
// 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});
|
$(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 oEventTarget = $(oEvent.target);
|
||||||
var aEventTargetPos = oEventTarget.position();
|
var aEventTargetPos = oEventTarget.position();
|
||||||
var aEventTargetOffset = oEventTarget.offset();
|
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);
|
$iHeight = Math.abs(aEventTargetOffset.top-100);
|
||||||
$(me.element).css({
|
$(me.element).css({
|
||||||
'max-height': $iHeight+'px',
|
'max-height': $iHeight+'px',
|
||||||
|
|||||||
Reference in New Issue
Block a user