VRFS-1669 VRFS-1672 bug fixes

This commit is contained in:
Brian Smith 2014-06-25 22:20:32 -04:00
parent 20e4a39a61
commit 8e335e28ca
5 changed files with 11 additions and 7 deletions

View File

@ -99,10 +99,8 @@
// date filter
var date = $('#session-date-filter').val();
if (date !== null && date.length > 0) {
console.log(date);
currentQuery.day = context.JK.formatDateYYYYMMDD(date);
// console.log("currentQuery.day=%o", currentQuery.day);
currentQuery.timezone_offset = new Date().getTimezoneOffset();
currentQuery.timezone_offset = (new Date().getTimezoneOffset()) / 60;
}
// language filter

View File

@ -132,7 +132,9 @@
}
function updateSession(id, newSession) {
return $.ajax('/api/sessions/' + id, {
console.log("newSession=%o", newSession);
return $.ajax({
url: '/api/sessions/' + id,
type: "PUT",
data : newSession,
dataType : 'json'

View File

@ -54,7 +54,8 @@
// render users who have approved RSVPs
if (session.approved_rsvps) {
for (i=0; i < session.approved_rsvps.length; i++) {
if (!(session.approved_rsvps[i].id in inSessionUsers)) {
// do not show the user in this section if he is already in the session
if ($.inArray(session.approved_rsvps[i].id, inSessionUsers) === -1) {
if (session.approved_rsvps[i].id === context.JK.currentUserId) {
showJoinLink = true;
}
@ -62,6 +63,9 @@
rsvpUsersHtml += rsvpUserInfo[0];
latencyHtml += rsvpUserInfo[1];
}
else {
showJoinLink = false;
}
}
}

View File

@ -67,7 +67,7 @@
var data = {};
data.genre = $('#session-settings-genre').val();
data.genre = context.JK.GenreSelectorHelper.getSelectedGenres('#session-settings-genre')[0];
data.name = $('#session-settings-name').val();
data.description = $('#session-settings-description').val();
data.language = $('#session-settings-language').val();

View File

@ -59,7 +59,7 @@
.clearall.right.mt10
%a.button-orange{:href => 'TBD', :rel => 'external'} HELP
%a.button-grey{'layout-action' => "close"} CANCEL
%a.button-orange{:id => "session-settings-dialog-submit", :href => "#"} UPDATE SETTINGS
%a.button-orange{:id => "session-settings-dialog-submit"} UPDATE SETTINGS
%br/
%br{:clear => 'all'}/