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

Add missing square bracket.

This commit is contained in:
Tim Düsterhus 2012-03-22 17:24:00 +01:00
parent ca4ee2d14d
commit 5667d5d949

View File

@ -47,7 +47,7 @@ consoleMock ?=
refreshRoomList: null refreshRoomList: null
fish: null fish: null
init: () -> init: () ->
console.log '[be.bastelstu.WCF.Chat Initializing' console.log '[be.bastelstu.WCF.Chat] Initializing'
@bindEvents() @bindEvents()
@events.newMessage.add $.proxy @notify, @ @events.newMessage.add $.proxy @notify, @
@ -56,7 +56,7 @@ consoleMock ?=
@refreshRoomList() @refreshRoomList()
@getMessages() @getMessages()
console.log '[be.bastelstu.WCF.Chat Finished initializing - Shields at 104 percent' console.log '[be.bastelstu.WCF.Chat] Finished initializing - Shields at 104 percent'
### ###
# Autocompletes a username # Autocompletes a username
### ###
@ -122,7 +122,7 @@ consoleMock ?=
firstChars = @autocompleteValue.substring(@autocompleteValue.lastIndexOf(' ')+1) firstChars = @autocompleteValue.substring(@autocompleteValue.lastIndexOf(' ')+1)
console.log '[be.bastelstu.WCF.Chat Autocompleting "' + firstChars + '"' console.log '[be.bastelstu.WCF.Chat] Autocompleting "' + firstChars + '"'
return if firstChars.length is 0 return if firstChars.length is 0
# Insert name and increment offset # Insert name and increment offset
@ -219,7 +219,7 @@ consoleMock ?=
### ###
freeTheFish: () -> freeTheFish: () ->
return if $.wcfIsset 'fish' return if $.wcfIsset 'fish'
console.warn '[be.bastelstu.WCF.Chat Freeing the fish' console.warn '[be.bastelstu.WCF.Chat] Freeing the fish'
fish = $ '<div id="fish">' + WCF.String.escapeHTML('><((((\u00B0>') + '</div>' fish = $ '<div id="fish">' + WCF.String.escapeHTML('><((((\u00B0>') + '</div>'
fish.css fish.css
position: 'absolute' position: 'absolute'
@ -258,12 +258,12 @@ consoleMock ?=
@handleUsers(data.users) @handleUsers(data.users)
, @) , @)
error: $.proxy((jqXHR, textStatus, errorThrown) -> error: $.proxy((jqXHR, textStatus, errorThrown) ->
console.error '[be.bastelstu.WCF.Chat Battle Station hit - shields at ' + (--@shields / 3 * 104) + ' percent' console.error '[be.bastelstu.WCF.Chat] Battle Station hit - shields at ' + (--@shields / 3 * 104) + ' percent'
if @shields is 0 if @shields is 0
@pe.refreshRoomList.stop() @pe.refreshRoomList.stop()
@pe.getMessages.stop() @pe.getMessages.stop()
@freeTheFish() @freeTheFish()
console.error '[be.bastelstu.WCF.Chat We got destroyed, but could free our friend the fish before he was killed as well. Have a nice life in freedom!' console.error '[be.bastelstu.WCF.Chat] 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'
, @) , @)
### ###
@ -310,12 +310,12 @@ consoleMock ?=
# Move the user to the correct position # Move the user to the correct position
if element[0] if element[0]
console.log '[be.bastelstu.WCF.Chat Moving User: "' + user.username + '"' console.log '[be.bastelstu.WCF.Chat] Moving User: "' + user.username + '"'
element = element.detach() element = element.detach()
$('#timsChatUserList').append element $('#timsChatUserList').append element
# Insert the user # Insert the user
else else
console.log '[be.bastelstu.WCF.Chat Inserting User: "' + user.username + '"' console.log '[be.bastelstu.WCF.Chat] Inserting User: "' + user.username + '"'
li = $ '<li></li>' li = $ '<li></li>'
li.attr 'id', id li.attr 'id', id
li.addClass 'timsChatUser' li.addClass 'timsChatUser'
@ -341,7 +341,7 @@ consoleMock ?=
# Remove users that were not found # Remove users that were not found
$('.timsChatUser').each () -> $('.timsChatUser').each () ->
if typeof foundUsers[$(@).attr('id')] is 'undefined' if typeof foundUsers[$(@).attr('id')] is 'undefined'
console.log '[be.bastelstu.WCF.Chat Removing User: "' + $(@).data('username') + '"' console.log '[be.bastelstu.WCF.Chat] Removing User: "' + $(@).data('username') + '"'
$(@).remove(); $(@).remove();
@ -393,7 +393,7 @@ consoleMock ?=
# Refreshes the room-list. # Refreshes the room-list.
### ###
refreshRoomList: () -> refreshRoomList: () ->
console.log '[be.bastelstu.WCF.Chat Refreshing the roomlist' console.log '[be.bastelstu.WCF.Chat] Refreshing the roomlist'
$('#toggleRooms a').addClass 'ajaxLoad' $('#toggleRooms a').addClass 'ajaxLoad'
$.ajax $('#toggleRooms a').data('refreshUrl'), $.ajax $('#toggleRooms a').data('refreshUrl'),
@ -416,7 +416,7 @@ consoleMock ?=
@changeRoom $ event.target @changeRoom $ event.target
, @ , @
console.log '[be.bastelstu.WCF.Chat Found ' + data.length + ' rooms' console.log '[be.bastelstu.WCF.Chat] Found ' + data.length + ' rooms'
, @) , @)
### ###
# Handles submitting of messages. # Handles submitting of messages.