diff --git a/file/js/be.bastelstu.Chat.litcoffee b/file/js/be.bastelstu.Chat.litcoffee index 8ad112a..1440f4c 100644 --- a/file/js/be.bastelstu.Chat.litcoffee +++ b/file/js/be.bastelstu.Chat.litcoffee @@ -37,6 +37,7 @@ exposed by a function if necessary. current: {} allTime: {} currentRoom = {} + fileUploaded = no errorVisible = false inputErrorHidingTimer = null @@ -809,35 +810,218 @@ Remove the given callback from the given event. events[event].remove callback true - - if WCF?.Attachment?.Upload? + +The following code handles attachment uploads + +Enable attachment code if `WCF.Attachment.Upload` is defined + + if WCF?.Attachment?.Upload? and $('#timsChatUploadContainer').length Attachment = WCF.Attachment.Upload.extend + fileUploaded: no + +Initialize WCF.Attachment.Upload +See WCF.Attachment.Upload.init() + init: -> - @_super $('#timsChatUploadContainer'), $('