mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Fix marking of messages in speech bubbles
It failed on appending a new message to the same speech bubble
This commit is contained in:
parent
4091a6e7e6
commit
6f9418e167
@ -381,15 +381,17 @@ Visibly mark the message once the associated checkbox is checked.
|
||||
|
||||
if checked
|
||||
elem.parents('.timsChatMessage').addClass 'checked'
|
||||
elem.parents('.timsChatTextContainer').siblings('.timsChatMessageBlockMarker').prop 'checked', true
|
||||
elem.parents('.timsChatTextContainer').siblings('.timsChatMessageGroupMarker').prop 'checked', true
|
||||
else
|
||||
delete markedMessages[messageID]
|
||||
|
||||
parent.removeClass 'checked'
|
||||
elem.parents('.timsChatMessage').removeClass 'checked'
|
||||
elem.parents('.timsChatTextContainer').siblings('.timsChatMessageBlockMarker').prop 'checked', false
|
||||
elem.parents('.timsChatTextContainer').siblings('.timsChatMessageGroupMarker').prop 'checked', false
|
||||
|
||||
$(document).on 'click', '.timsChatMessageBlockMarker', (event) ->
|
||||
# This function can be used to toggle the marking state of every “submessage” of one message container (speech bubble)
|
||||
# The according element with the class “.timsChatMessageGroupMarker” has to be made visible via CSS.
|
||||
$(document).on 'click', '.timsChatMessageGroupMarker', (event) ->
|
||||
$(event.target).siblings('.timsChatTextContainer').children('li').each (key, value) ->
|
||||
elem = $(value).find '.timsChatMessageMarker'
|
||||
|
||||
@ -654,7 +656,12 @@ Insert the given messages into the chat stream.
|
||||
else
|
||||
messageContainerID = 0
|
||||
|
||||
$("#timsChatMessageContainer#{messageContainerID} .timsChatMessage:last-child .timsChatTextContainer").append $(output).find('.timsChatTextContainer li:last-child')
|
||||
textContainer = $("#timsChatMessageContainer#{messageContainerID}").find '.timsChatMessage:last-child .timsChatTextContainer'
|
||||
textContainer.append $(output).find('.timsChatTextContainer li:last-child')
|
||||
|
||||
# unmark messages
|
||||
textContainer.parents('.timsChatMessage').removeClass 'checked'
|
||||
textContainer.siblings('.timsChatMessageGroupMarker').prop 'checked', false
|
||||
|
||||
lastMessage = message
|
||||
|
||||
|
@ -296,7 +296,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.timsChatMessageMarker, .timsChatMessageBlockMarker {
|
||||
.timsChatMessageMarker, .timsChatMessageGroupMarker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -356,22 +356,22 @@
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.timsChatMessageBlockMarker {
|
||||
.timsChatMessageGroupMarker {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.timsChatMessageMarker, .timsChatMessageBlockMarker {
|
||||
.timsChatMessageMarker, .timsChatMessageGroupMarker {
|
||||
position: absolute;
|
||||
right: -@wcfGapLarge ;
|
||||
}
|
||||
|
||||
&.bubble {
|
||||
.timsChatMessageMarker, .timsChatMessageBlockMarker {
|
||||
.timsChatMessageMarker, .timsChatMessageGroupMarker {
|
||||
right: -@wcfGapLarge - 1;
|
||||
}
|
||||
|
||||
&.right {
|
||||
.timsChatMessageMarker, .timsChatMessageBlockMarker {
|
||||
.timsChatMessageMarker, .timsChatMessageGroupMarker {
|
||||
// maybe find a better way, will do it for now
|
||||
right: -@wcfGapLarge - @wcfGapMedium - 32 - 1;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<input type="checkbox" class="timsChatMessageBlockMarker jsTooltip" value="{@$message.messageID}" title="{lang}chat.global.markAll{/lang}" />
|
||||
<input type="checkbox" class="timsChatMessageGroupMarker jsTooltip" value="{@$message.messageID}" title="{lang}chat.global.markAll{/lang}" />
|
||||
{elseif $message.type == $messageTypes.INFORMATION}
|
||||
<div class="timsChatTextContainer">
|
||||
<span class="timsChatText" data-message-id="{@$message.messageID}">
|
||||
|
Loading…
Reference in New Issue
Block a user