VRFS-232 Find Session style fixes
This commit is contained in:
parent
04f2128849
commit
8dc1b6334f
|
|
@ -5,9 +5,9 @@
|
|||
context.JK = context.JK || {};
|
||||
context.JK.FindSessionScreen = function(app) {
|
||||
var CATEGORY = {
|
||||
INVITATION : {index: 0, id: "#sessions-invitations"},
|
||||
FRIENDS : {index: 1, id: "#sessions-friends"},
|
||||
OTHER : {index: 2, id: "#sessions-other"}
|
||||
INVITATION : {index: 0, id: "table#sessions-invitations"},
|
||||
FRIENDS : {index: 1, id: "table#sessions-friends"},
|
||||
OTHER : {index: 2, id: "table#sessions-other"}
|
||||
};
|
||||
|
||||
var logger = context.JK.logger;
|
||||
|
|
@ -204,12 +204,54 @@
|
|||
function afterShow(data) {
|
||||
clearResults();
|
||||
loadSessions();
|
||||
|
||||
var priorVisible;
|
||||
|
||||
var INVITATIONS = 'div#sessions-invitations';
|
||||
var FRIENDS = 'div#sessions-friends';
|
||||
var OTHER = 'div#sessions-other';
|
||||
|
||||
// INVITATIONS
|
||||
if (invitationSessionGroup.length === undefined) {
|
||||
priorVisible = false;
|
||||
$(INVITATIONS).hide();
|
||||
}
|
||||
else {
|
||||
priorVisible = true;
|
||||
$(INVITATIONS).show();
|
||||
}
|
||||
|
||||
// FRIENDS
|
||||
if (!priorVisible) {
|
||||
$(FRIENDS).removeClass('mt35');
|
||||
}
|
||||
|
||||
if (friendSessionGroup.length === undefined) {
|
||||
priorVisible = false;
|
||||
$(FRIENDS).hide();
|
||||
}
|
||||
else {
|
||||
priorVisible = true;
|
||||
$(FRIENDS).show();
|
||||
}
|
||||
|
||||
// OTHER
|
||||
if (!priorVisible) {
|
||||
$(OTHER).removeClass('mt35');
|
||||
}
|
||||
|
||||
if (otherSessionGroup.length === undefined) {
|
||||
$(OTHER).hide();
|
||||
}
|
||||
else {
|
||||
$(OTHER).show();
|
||||
}
|
||||
}
|
||||
|
||||
function clearResults() {
|
||||
$('#sessions-invitations').children(':not(:first-child)').remove();
|
||||
$('#sessions-friends').children(':not(:first-child)').remove();
|
||||
$('#sessions-other').children(':not(:first-child)').remove();
|
||||
$(CATEGORY.INVITATION).children(':not(:first-child)').remove();
|
||||
$(CATEGORY.FRIENDS).children(':not(:first-child)').remove();
|
||||
$(CATEGORY.OTHER).children(':not(:first-child)').remove();
|
||||
}
|
||||
|
||||
function deleteSession(evt) {
|
||||
|
|
|
|||
|
|
@ -43,13 +43,13 @@
|
|||
</div>
|
||||
<div class="content-scroller">
|
||||
<div class="content-wrapper" style="padding-left:35px;padding-top:10px;">
|
||||
<div>
|
||||
<div id="sessions-invitations">
|
||||
<%= render :partial => "sessionList", :locals => {:title => "sessions you're invited to", :category => "sessions-invitations"} %>
|
||||
</div>
|
||||
<div>
|
||||
<div id="sessions-friends" class="mt35">
|
||||
<%= render :partial => "sessionList", :locals => {:title => "sessions with friends or bandmates", :category => "sessions-friends"} %>
|
||||
</div>
|
||||
<div>
|
||||
<div id="sessions-other" class="mt35">
|
||||
<%= render :partial => "sessionList", :locals => {:title => "other sessions", :category => "sessions-other"} %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue