 stompClient = {}
 lastUser = {}
 lastMessage = ''
+tempMessages = {}
 
 $('#temporaryInput').on 'click', (event) ->
     $('#chatMessage').popover('toggle')

          </table>"""

        $('#connectedUsersTable').html tableDef
    else if msg.status is 'closeTime'
        selectedDate = $('#datetimepickerInline').data('DateTimePicker').date().format('YYYY-MM-DD')
        $('#area00').append """

    , 1000


# update temporary input
setInterval ->
        message = {}
        message.text = _.escape($.trim($('#chatMessage').val()))
        message.status = 'temp'
        message.chatroom = $('#chatRoomSelected').val()
        message.username = $('#userName').val()

        stompClient.send "/app/tempMessage", {}, JSON.stringify(message)
    , 700


# store userName into localStorage
$('#userName').on 'keyup', ->
    localStorage['userName'] = $('#userName').val()
