Skip to content

Commit

Permalink
Fixed #61, first messages now show up when sent by staff
Browse files Browse the repository at this point in the history
  • Loading branch information
dlareau authored and Dillon Lareau committed Sep 12, 2018
1 parent b444f94 commit 0316bc7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
22 changes: 11 additions & 11 deletions huntserver/static/huntserver/admin.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
button {
background-color: white;
background-color: white;
border: 1px solid black;
margin: 1px;
margin: 1px;
text-align: center;
text-decoration: none;
border-radius: 4px;
white-space: nowrap;
border-radius: 4px;
white-space: nowrap;
display: inline-block;}

button:hover {
background-color: lightgrey; }
background-color: lightgrey; }

button:active {
background-color: grey; }
button.active {
background-color: lightgrey; }

#queue {
width: 100%; }
Expand All @@ -39,10 +39,10 @@ td {
border: 1px solid black; }

th {
text-align: center;
padding-left: 3px;
padding-right: 3px;
border: 1px solid black; }
text-align: center;
padding-left: 3px;
padding-right: 3px;
border: 1px solid black; }

#puzzles .meta {
background: #DADAF8; }
Expand Down
2 changes: 1 addition & 1 deletion huntserver/static/huntserver/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

.chatselect {
background-color: white;
width: 100%;
width:45%;
}

.admin-message {
Expand Down
3 changes: 2 additions & 1 deletion huntserver/static/huntserver/staff_chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
$('.chatselect').click(function() {
$('.chatselect').each(function() {
$("#chat_" + $(this).data('id')).hide();
$(this).removeClass('active')
});
$("#chat_" + $(this).data('id')).show();
curr_team = $(this).data('id');
$("button[data-id=" + curr_team + "]").css("background-color", "white");
$("button[data-id=" + curr_team + "]").addClass('active')
$("#chatcontainer").scrollTop($("#chatcontainer")[0].scrollHeight);
});
}
Expand Down
5 changes: 5 additions & 0 deletions huntserver/templates/staff_chat.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ <h1> Staff Chat </h1>
{{dict.messages}}
</div>
{% endfor %}
{% for team in teams %}
{% if team.team_name not in message_dict %}
<div id='chat_{{ team.pk }}' class="chatwindow"></div>
{% endif %}
{% endfor %}
</div>
<div style="margin-top: 10px">
<input id="messagebox" typpe='text'> </input>
Expand Down

0 comments on commit 0316bc7

Please sign in to comment.