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

Fixing errorhandling of getMessages

Set loading to false in complete, instead of success
This commit is contained in:
Tim Düsterhus 2012-06-28 19:21:34 +02:00
parent b141fac033
commit 864f00f284

View File

@ -278,7 +278,6 @@ window.console ?=
dataType: 'json' dataType: 'json'
type: 'POST' type: 'POST'
success: $.proxy((data, textStatus, jqXHR) -> success: $.proxy((data, textStatus, jqXHR) ->
@loading = false
@handleMessages(data.messages) @handleMessages(data.messages)
@handleUsers(data.users) @handleUsers(data.users)
, @) , @)
@ -290,6 +289,9 @@ window.console ?=
@freeTheFish() @freeTheFish()
console.error 'We got destroyed, but could free our friend the fish before he was killed as well. Have a nice life in freedom!' console.error 'We got destroyed, but could free our friend the fish before he was killed as well. Have a nice life in freedom!'
alert 'herp i cannot load messages' alert 'herp i cannot load messages'
, @),
complete: $.proxy(() ->
@loading = false
, @) , @)
beforeSend: $.proxy(() -> beforeSend: $.proxy(() ->
return false if @loading return false if @loading