* Mobile theme: fix mobile theme sidebar not showing notifications

This commit is contained in:
Hadi Nategh
2019-12-10 14:17:50 +01:00
parent 1064759020
commit 4276ebbe5f
8 changed files with 184 additions and 54 deletions

View File

@ -1164,5 +1164,39 @@ var fw_base = (function(){ "use strict"; return Class.extend(
}
}
}
},
/**
* Set a notification message for topmenu info item
*
* @param {string} _id id of topmenu info item with its prefix
* @param {string} _message message that should be displayed
* @param {string} _tooltip hint text as tooltip
*/
topmenu_info_notify: function(_id, _switch, _message, _tooltip) {
var $items = jQuery('#egw_fw_topmenu_info_items').children();
var prefix = "topmenu_info_";
$items.each(function(i,item){
if (item.id == prefix+_id || item.id == _id)
{
var $notify = jQuery(item).find('.egw_fw_topmenu_info_notify');
if (_switch)
{
if ($notify.length == 0)
{
$notify = jQuery(document.createElement('div'))
.addClass('egw_fw_topmenu_info_notify')
.prop('title', _tooltip)
.appendTo(item);
}
$notify.prop('title', _tooltip).text(_message);
}
else
{
$notify.remove();
}
}
});
}
});}).call(this);