diff --git a/resources/js/humhub.mail.notification.min.js b/resources/js/humhub.mail.notification.min.js index f770777a..0d4e6885 100644 --- a/resources/js/humhub.mail.notification.min.js +++ b/resources/js/humhub.mail.notification.min.js @@ -1 +1 @@ -humhub.module("mail.notification",function(n,e,t){var o,s=e("client"),a=e("ui.loader"),i=e("event"),l=(e("config"),e("ui.widget").Widget);n.initOnPjaxLoad=!0;var u=function(){s.get(n.config.url.count).then(function(e){d(parseInt(e.newMessages))})},d=function(e){var n=t("#badge-messages");e&&"0"!=e?(n.empty(),n.append(e),n.fadeIn("fast")):n.css("display","none")};n.export({init:function(e){e||(i.on("humhub:modules:mail:live:NewUserMessage",function(e,n){i=n[n.length-1],d(i.data.count)}).on("humhub:modules:mail:live:UserMessageDeleted",function(e,n){i=n[n.length-1],d(i.data.count)}),t("#icon-messages").click(function(){o&&o.abort(),t("#loader_messages").parent().find(":not(#loader_messages)").remove(),a.set(t("#loader_messages").show()),s.get(n.config.url.list,{beforeSend:function(e){o=e}}).then(function(e){o=void 0,t("#loader_messages").parent().prepend(t(e.html)),t("#loader_messages").hide()})})),u()},loadMessage:function(e){t("#mail-conversation-root").length?l.instance("#mail-conversation-root").loadMessage(e):s.redirect(e.url),e.finish()},setMailMessageCount:d,updateCount:u})}); \ No newline at end of file +humhub.module("mail.notification",function(n,e,t){var o,s=e("client"),a=e("ui.loader"),i=e("event"),l=e("ui.widget").Widget;n.initOnPjaxLoad=!0;var u=function(){s.get(n.config.url.count).then(function(e){d(parseInt(e.newMessages))})},d=function(e){var n=t("#badge-messages");e&&"0"!=e?(n.empty(),n.append(e),n.fadeIn("fast")):n.css("display","none")};n.export({init:function(e){e||(i.on("humhub:modules:mail:live:NewUserMessage",function(e,n){i=n[n.length-1],d(i.data.count)}).on("humhub:modules:mail:live:UserMessageDeleted",function(e,n){i=n[n.length-1],d(i.data.count)}),t("#icon-messages").click(function(){o&&o.abort(),t("#loader_messages").parent().find(":not(#loader_messages)").remove(),a.set(t("#loader_messages").show()),s.get(n.config.url.list,{beforeSend:function(e){o=e}}).then(function(e){o=void 0,t("#loader_messages").parent().prepend(t(e.html)),t("#loader_messages").hide()})})),u()},loadMessage:function(e){t("#mail-conversation-root").length?l.instance("#mail-conversation-root").loadMessage(e):s.redirect(e.url),e.finish()},setMailMessageCount:d,updateCount:u})}); \ No newline at end of file