1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Unbind 'click' later

This commit is contained in:
Tim Düsterhus 2011-12-26 17:26:47 +01:00
parent 6b10542737
commit 461be89d85

View File

@ -179,13 +179,13 @@ TimWolla.WCF ?= {}
# Refreshes the room-list. # Refreshes the room-list.
### ###
refreshRoomList: () -> refreshRoomList: () ->
$('.chatRoom').unbind 'click'
$('#toggleRooms a').addClass 'ajaxLoad' $('#toggleRooms a').addClass 'ajaxLoad'
$.ajax $('#toggleRooms a').data('refreshUrl'), $.ajax $('#toggleRooms a').data('refreshUrl'),
dataType: 'json' dataType: 'json'
type: 'POST' type: 'POST'
success: $.proxy((data, textStatus, jqXHR) -> success: $.proxy((data, textStatus, jqXHR) ->
$('.chatRoom').unbind 'click'
$('#chatRoomList li').remove() $('#chatRoomList li').remove()
$('#toggleRooms a').removeClass 'ajaxLoad' $('#toggleRooms a').removeClass 'ajaxLoad'
for room in data for room in data