VRFS-1820 fix latency indicator alignment issues

This commit is contained in:
Brian Smith 2014-06-27 01:53:33 -04:00
parent 79dc9c37c2
commit 3b6a65eec2
3 changed files with 28 additions and 11 deletions

View File

@ -41,7 +41,7 @@
showJoinLink = session.musician_access;
// render musicians who are already in the session
if (session.active_music_session && "participants" in session.active_music_session) {
if (session.active_music_session && "participants" in session.active_music_session && session.active_music_session.participants.length > 0) {
for (i=0; i < session.active_music_session.participants.length; i++) {
inSessionUsers.push(session.active_music_session.participants[i].user.id);
var inSessionUserInfo = createInSessionUser(session.active_music_session.participants[i]);
@ -49,6 +49,10 @@
latencyHtml += inSessionUserInfo[1];
}
}
// this provides a buffer at the top to shift the first latency tag down in the event there are NO in-session musicians
else {
latencyHtml += "<div style='height:15px;'>&nbsp;</div>";
}
// render users who have approved RSVPs
if (session.approved_rsvps) {
@ -133,7 +137,7 @@
var rsvpUsersHtml = '', openSlotsHtml = '', latencyHtml = '', notationFileHtml = '';
// render users who have approved RSVPs
if (session.approved_rsvps) {
if (session.approved_rsvps && session.approved_rsvps.length > 0) {
for (i=0; i < session.approved_rsvps.length; i++) {
if (session.approved_rsvps[i].id === context.JK.currentUserId) {
hasApprovedRsvp = true;
@ -143,6 +147,10 @@
latencyHtml += rsvpUserInfo[1];
}
}
// this provides a buffer at the top to shift the first latency tag down in the event there are NO RSVP musicians
else {
latencyHtml += "<div style='height:15px;'>&nbsp;</div>";
}
// render open slots
if (session.open_slots) {

View File

@ -22,6 +22,7 @@ table.findsession-table, table.local-recordings {
}
td.latency {
padding-top: 15px !important;
text-align:center !important;
}
@ -65,6 +66,7 @@ table.findsession-table, table.local-recordings {
font-weight:200;
font-size:11px;
background-color:#868686;
text-align:center;
}
.latency-green {
@ -74,6 +76,7 @@ table.findsession-table, table.local-recordings {
font-weight:200;
font-size:11px;
background-color:#71a43b;
text-align:center;
}
.latency-yellow {
@ -83,6 +86,7 @@ table.findsession-table, table.local-recordings {
font-weight:200;
font-size:11px;
background-color:#cc9900;
text-align:center;
}
.latency-red {
@ -92,6 +96,7 @@ table.findsession-table, table.local-recordings {
font-weight:200;
font-size:11px;
background-color:#980006;
text-align:center;
}
.avatar-tiny {

View File

@ -88,7 +88,7 @@
<td colspan="2">{description}</td>
</tr>
<tr>
<td colspan="2">Notation Files:</td>
<td>Notation Files:</td>
<td>{notation_files}</td>
</tr>
</table>
@ -121,10 +121,12 @@
</tr>
</table>
</td>
<td width="10%" align="center">
<table class="musicians" cellpadding="0" cellspacing="0">
{latency}
</table>
<td width="10%" class="latency">
<div class="ml10">
<table class="musicians" cellpadding="0" cellspacing="0">
{latency}
</table>
</div>
</td>
<td width="20%">
<table class="musicians" cellpadding="0" cellspacing="0">
@ -180,10 +182,12 @@
</tr>
</table>
</td>
<td width="10%" align="center">
<table class="musicians" cellpadding="0" cellspacing="0">
{latency}
</table>
<td width="10%" class="latency pt10">
<div class="ml10">
<table class="musicians" cellpadding="0" cellspacing="0">
{latency}
</table>
</div>
</td>
<td width="20%">
<table class="musicians" cellpadding="0" cellspacing="0">