forked from extern/egroupware
Fix broken links in notifications popup, plus preserve the poped up
messages after re-generating Notifications list.
This commit is contained in:
parent
a79875a63a
commit
3f3154ead4
@ -126,6 +126,13 @@
|
|||||||
notifications.prototype.display = function() {
|
notifications.prototype.display = function() {
|
||||||
// list container
|
// list container
|
||||||
var $egwpopup_list = jQuery("#egwpopup_list");
|
var $egwpopup_list = jQuery("#egwpopup_list");
|
||||||
|
|
||||||
|
// Preserve already poped notifications
|
||||||
|
var poped = [];
|
||||||
|
$egwpopup_list.find('.egwpopup_expanded').each(function(index, item){
|
||||||
|
// store messages ids of poped messages
|
||||||
|
poped.push(item.id.replace('egwpopup_message_', ''));
|
||||||
|
});
|
||||||
// clear the list
|
// clear the list
|
||||||
$egwpopup_list.empty();
|
$egwpopup_list.empty();
|
||||||
// define time label deviders
|
// define time label deviders
|
||||||
@ -257,6 +264,15 @@
|
|||||||
$message.click(jQuery.proxy(this.clickOnMessage, this,[$message]));
|
$message.click(jQuery.proxy(this.clickOnMessage, this,[$message]));
|
||||||
this.update_message_status(id, notifymessages[id]['status']);
|
this.update_message_status(id, notifymessages[id]['status']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (poped.length > 0)
|
||||||
|
{
|
||||||
|
for (var key in poped)
|
||||||
|
{
|
||||||
|
// pop again those where opened before refresh
|
||||||
|
$egwpopup_list.find('#egwpopup_message_'+poped[key]).trigger('click');
|
||||||
|
}
|
||||||
|
}
|
||||||
this.counterUpdate();
|
this.counterUpdate();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -417,17 +433,6 @@
|
|||||||
*/
|
*/
|
||||||
notifications.prototype.append = function(_id, _message, _browser_notify,
|
notifications.prototype.append = function(_id, _message, _browser_notify,
|
||||||
_status, _created, _current) {
|
_status, _created, _current) {
|
||||||
if(!this.check_browser_notify() || typeof notifymessages[_id] != 'undefined')
|
|
||||||
{
|
|
||||||
notifymessages[_id] = {
|
|
||||||
message:_message,
|
|
||||||
status:_status,
|
|
||||||
created:_created,
|
|
||||||
current: _current
|
|
||||||
};
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var data = this.getData(_message);
|
var data = this.getData(_message);
|
||||||
// Prevent the same thing popping up multiple times
|
// Prevent the same thing popping up multiple times
|
||||||
notifymessages[_id] = {
|
notifymessages[_id] = {
|
||||||
|
Loading…
Reference in New Issue
Block a user