Merge pull request #13 from filkaris/notification_warning

Added popup warning before deleting all notifications
This commit is contained in:
Hadi Nategh 2017-08-23 16:13:36 +02:00 committed by GitHub
commit bf658d8dd8

View File

@ -365,7 +365,15 @@
// toggle notifications bar // toggle notifications bar
jQuery('.egwpopup_toggle').click(function(){window.app.notifications.toggle();}); jQuery('.egwpopup_toggle').click(function(){window.app.notifications.toggle();});
jQuery('#egwpopup_fw_notifications').click(function(){window.app.notifications.toggle();}); jQuery('#egwpopup_fw_notifications').click(function(){window.app.notifications.toggle();});
jQuery(".egwpopup_deleteall", '#egwpopup').click(function(){window.app.notifications.delete_all()}); jQuery(".egwpopup_deleteall", '#egwpopup').click(function(){
et2_dialog.show_dialog( function(_button){
if (_button == 2) window.app.notifications.delete_all();
},
egw.lang('Are you sure you want to delete all notifications?'),
egw.lang('Delete notifications'),
null, et2_dialog.BUTTON_YES_NO, et2_dialog.WARNING_MESSAGE, undefined, egw
);
});
jQuery(".egwpopup_seenall", '#egwpopup').click(function(){window.app.notifications.mark_all_seen()}); jQuery(".egwpopup_seenall", '#egwpopup').click(function(){window.app.notifications.mark_all_seen()});
}); });
})(); })();