diff --git a/ruby/lib/jam_ruby/models/search.rb b/ruby/lib/jam_ruby/models/search.rb index f1f2fa202..db86dfc82 100644 --- a/ruby/lib/jam_ruby/models/search.rb +++ b/ruby/lib/jam_ruby/models/search.rb @@ -74,8 +74,9 @@ module JamRuby PARAM_MUSICIAN = :srch_m PARAM_BAND = :srch_b + PARAM_FEED = :srch_f - B_PER_PAGE = M_PER_PAGE = 10 + F_PER_PAGE = B_PER_PAGE = M_PER_PAGE = 10 M_MILES_DEFAULT = 500 B_MILES_DEFAULT = 0 @@ -87,6 +88,18 @@ module JamRuby DISTANCE_OPTS = B_DISTANCE_OPTS = M_DISTANCE_OPTS = [['Any', 0], [1000.to_s, 1000], [500.to_s, 500], [250.to_s, 250], [100.to_s, 100], [50.to_s, 50], [25.to_s, 25]] + F_SORT_RECENT = ['Most Recent', :recent] + F_SORT_OLDEST = ['Ending Soonest', :ending_soon] + F_SORT_LENGTH = ['Session Length', :session_length] + F_SORT_OPTS = [F_SORT_RECENT, F_SORT_LENGTH, F_SORT_OLDEST] + + SHOW_BOTH = ['Both', :both] + SHOW_SESSIONS = ['Sessions', :sessions] + SHOW_RECORDINGS = ['Recordings', :recordings] + SHOW_OPTS = [SHOW_BOTH, SHOW_SESSIONS, SHOW_RECORDINGS] + + DATE_OPTS = [['Today', 0], ['This week', 7], ['Past 2 weeks', 14], ['This month', 30], ['Past year', 365], ['All', -1]] + def self.order_param(params, keys=M_ORDERING_KEYS) ordering = params[:orderby] ordering.blank? ? keys[0] : keys.detect { |oo| oo.to_s == ordering } diff --git a/web/app/assets/javascripts/createSession.js b/web/app/assets/javascripts/createSession.js index 6a6f1a9dc..ae3e5ff92 100644 --- a/web/app/assets/javascripts/createSession.js +++ b/web/app/assets/javascripts/createSession.js @@ -7,81 +7,19 @@ var logger = context.JK.logger; var rest = context.JK.Rest(); var realtimeMessaging = context.JK.JamServer; - var friendSelectorDialog = null; var invitationDialog = null; - var autoComplete = null; - var userNames = []; - var userIds = []; - var userPhotoUrls = []; + var inviteMusiciansUtil = null; var MAX_GENRES = 1; - var selectedFriendIds = {}; var sessionSettings = {}; function beforeShow(data) { - userNames = []; - userIds = []; - userPhotoUrls = []; + inviteMusiciansUtil.clearSelections(); context.JK.GenreSelectorHelper.render('#create-session-genre'); resetForm(); } function afterShow(data) { - friendSelectorDialog.setCallback(friendSelectorCallback); - - var friends = rest.getFriends({ id: context.JK.currentUserId }) - .done(function(friends) { - $.each(friends, function() { - userNames.push(this.name); - userIds.push(this.id); - userPhotoUrls.push(this.photo_url); - }); - - var autoCompleteOptions = { - lookup: { suggestions: userNames, data: userIds }, - onSelect: addInvitation - }; - - $('#friend-input').attr("placeholder", "Type a friend\'s name").prop('disabled', false); - - if (!autoComplete) { - autoComplete = $('#friend-input').autocomplete(autoCompleteOptions); - } - else { - autoComplete.setOptions(autoCompleteOptions); - } - - $(".autocomplete").width("150px"); - }) - .fail(function() { - $('#friend-input').attr("placeholder", "Unable to lookup friends"); - app.ajaxError(arguments); - }); - } - - function friendSelectorCallback(newSelections) { - var keys = Object.keys(newSelections); - for (var i=0; i < keys.length; i++) { - addInvitation(newSelections[keys[i]].userName, newSelections[keys[i]].userId); - } - } - - function addInvitation(value, data) { - if ($('#selected-friends div[user-id=' + data + ']').length === 0) { - var template = $('#template-added-invitation').html(); - var invitationHtml = context.JK.fillTemplate(template, {userId: data, userName: value}); - $('#selected-friends').append(invitationHtml); - $('#friend-input').select(); - selectedFriendIds[data] = true; - } - else { - $('#friend-input').select(); - context.alert('Invitation already exists for this musician.'); - } - } - - function removeInvitation(evt) { - delete selectedFriendIds[$(evt.currentTarget).parent().attr('user-id')]; - $(evt.currentTarget).closest('.invitation').remove(); + inviteMusiciansUtil.loadFriends(); } function resetForm() { @@ -226,7 +164,7 @@ data: jsonData, success: function(response) { var newSessionId = response.id; - var invitationCount = createInvitations(newSessionId, function() { + var invitationCount = inviteMusiciansUtil.createInvitations(newSessionId, function() { context.location = '#/session/' + newSessionId; }); // Re-loading the session settings will cause the form to reset with the right stuff in it. @@ -248,49 +186,12 @@ return false; } - function createInvitations(sessionId, onComplete) { - var callCount = 0; - var totalInvitations = 0; - $('#selected-friends .invitation').each(function(index, invitation) { - callCount++; - totalInvitations++; - var invite_id = $(invitation).attr('user-id'); - var invite = { - music_session: sessionId, - receiver: invite_id - }; - $.ajax({ - type: "POST", - url: "/api/invitations", - data: invite - }).done(function(response) { - callCount--; - }).fail(app.ajaxError); - }); - // TODO - this is the second time I've used this pattern. - // refactor to make a common utility for this. - function checker() { - if (callCount === 0) { - onComplete(); - } else { - context.setTimeout(checker, 10); - } - } - checker(); - return totalInvitations; - } - function events() { $('#create-session-form').on('submit', submitForm); $('#btn-create-session').on("click", submitForm); - $('#selected-friends').on("click", ".invitation a", removeInvitation); $('#musician-access').change(toggleMusicianAccess); $('#fan-access').change(toggleFanAccess); - $('#btn-choose-friends').click(function() { - friendSelectorDialog.showDialog(selectedFriendIds); - }); - $('div[layout-id="createSession"] .btn-email-invitation').click(function() { invitationDialog.showEmailDialog(); }); @@ -373,38 +274,10 @@ }); } - function searchFriends(query) { - if (query.length < 2) { - $('#friend-search-results').empty(); - return; - } - var url = "/api/search?query=" + query + "&userId=" + context.JK.currentUserId; - $.ajax({ - type: "GET", - url: url, - success: friendSearchComplete - }); - } - - function friendSearchComplete(response) { - // reset search results each time - $('#friend-search-results').empty(); - - // loop through each - $.each(response.friends, function() { - // only show friends who are musicians - if (this.musician === true) { - var template = $('#template-friend-search-results').html(); - var searchResultHtml = context.JK.fillTemplate(template, {userId: this.id, name: this.first_name + ' ' + this.last_name}); - $('#friend-search-results').append(searchResultHtml); - $('#friend-search-results').attr('style', 'display:block'); - } - }); - } - - function initialize(invitationDialogInstance, friendSelectorDialogInstance) { - friendSelectorDialog = friendSelectorDialogInstance; + function initialize(invitationDialogInstance, inviteMusiciansUtilInstance) { invitationDialog = invitationDialogInstance; + inviteMusiciansUtil = inviteMusiciansUtilInstance; + inviteMusiciansUtil.inviteSessionCreate('#create-session-invite-musicians'); events(); loadBands(); loadSessionSettings(); @@ -419,8 +292,6 @@ this.submitForm = submitForm; this.validateForm = validateForm; this.loadBands = loadBands; - this.searchFriends = searchFriends; - this.addInvitation = addInvitation; return this; }; diff --git a/web/app/assets/javascripts/findMusician.js b/web/app/assets/javascripts/findMusician.js index cdd36acb0..52a44c077 100644 --- a/web/app/assets/javascripts/findMusician.js +++ b/web/app/assets/javascripts/findMusician.js @@ -89,6 +89,10 @@ for (ii=0, len=musicians.length; ii < len; ii++) { mm = musicians[ii]; + if (context.JK.currentUserId === mm.id) { + // VRFS-294.3 (David) => skip if current user is musician + continue; + } instr_logos = ''; for (var jj=0, ilen=mm['instruments'].length; jj invitedFriends.indexOf(data)) { + var template = $('#template-added-invitation').html(); + var imgStyle = _inviteExists(data) ? 'display:none' : ''; + var invitationHtml = context.JK.fillTemplate(template, + {userId: data, + userName: value, + imageStyle: imgStyle}); + $('.selected-friends').append(invitationHtml); + $('#friend-input').select(); + invitedFriends.push(data); + + } else { + $('#friend-input').select(); + context.alert('Invitation already exists for this musician.'); + } + } + + function removeInvitation(evt) { + var idx = invitedFriends.indexOf($(evt.currentTarget).parent().attr('user-id')); + if (0 <= idx) invitedFriends.splice(idx, 1); + $(evt.currentTarget).closest('.invitation').remove(); + } + + function createInvitations(sessionId, onComplete) { + var callCount = 0; + var totalInvitations = invitedFriends.length - existingInvites.length; + invitedFriends.map(function(invite_id) { + if (!_inviteExists(invite_id)) { + callCount++; + var invite = { + music_session: sessionId, + receiver: invite_id + }; + $.ajax({ + type: "POST", + url: "/api/invitations", + data: invite + }).done(function(response) { + callCount--; + }).fail(app.ajaxError); + } + }); + // TODO - this is the second time I've used this pattern. + // refactor to make a common utility for this. + function checker() { + callCount === 0 ? onComplete() : context.setTimeout(checker, 10); + } + if (onComplete) checker(); + return totalInvitations; + } + this.createInvitations = createInvitations; + + function searchFriends(query) { + if (query.length < 2) { + $('#friend-search-results').empty(); + return; + } + var url = "/api/search?query=" + query + "&userId=" + context.JK.currentUserId; + $.ajax({ + type: "GET", + url: url, + success: friendSearchComplete + }); + } + + function friendSearchComplete(response) { + // reset search results each time + $('#friend-search-results').empty(); + + // loop through each + $.each(response.friends, function() { + // only show friends who are musicians + if (this.musician === true) { + var template = $('#template-friend-search-results').html(); + var searchResultHtml = context.JK.fillTemplate(template, {userId: this.id, name: this.first_name + ' ' + this.last_name}); + $('#friend-search-results').append(searchResultHtml); + $('#friend-search-results').attr('style', 'display:block'); + } + }); + } + + function _friendSelectorHTML() { + return context.JK.fillTemplate($('#template-session-invite-musicians').html(), + {choose_friends_id: 'btn-choose-friends-'+inviteAction, + selected_friends_id: 'selected-friends-'+inviteAction}); + } + + function _appendFriendSelector(elemSelector) { + elemSelector.append(_friendSelectorHTML()); + $('#selected-friends-'+inviteAction).on("click", ".invitation a", removeInvitation); + $('#btn-choose-friends-'+inviteAction).click(function(){ + var obj = {}; + invitedFriends.map(function(uid) { obj[uid] = true; }); + friendSelectorDialog.showDialog(obj); + }); + }; + + this.initialize = function(friendSelectorDialogInstance) { + friendSelectorDialog = friendSelectorDialogInstance; + }; + + return this; + }; + +})(window,jQuery); \ No newline at end of file diff --git a/web/app/assets/javascripts/session.js b/web/app/assets/javascripts/session.js index 4245dbee8..e017d1de6 100644 --- a/web/app/assets/javascripts/session.js +++ b/web/app/assets/javascripts/session.js @@ -14,6 +14,8 @@ var addNewGearDialog; var localRecordingsDialog = null; var recordingFinishedDialog = null; + var friendSelectorDialog = null; + var inviteMusiciansUtil = null; var screenActive = false; var currentMixerRangeMin = null; var currentMixerRangeMax = null; @@ -1302,12 +1304,17 @@ } } + function inviteMusicians() { + inviteMusiciansUtil.inviteSessionUpdate('#update-session-invite-musicians', sessionId); + } + function events() { $('#session-resync').on('click', sessionResync); $('#session-contents').on("click", '[action="delete"]', deleteSession); $('#tracks').on('click', 'div[control="mute"]', toggleMute); $('#recording-start-stop').on('click', startStopRecording); $('#open-a-recording').on('click', openRecording); + $('#session-invite-musicians').on('click', inviteMusicians); $('#track-settings').click(function() { configureTrackDialog.showVoiceChatPanel(true); configureTrackDialog.showMusicAudioPanel(true); @@ -1319,9 +1326,10 @@ .on('change-position', onChangePlayPosition); } - this.initialize = function(localRecordingsDialogInstance, recordingFinishedDialogInstance) { + this.initialize = function(localRecordingsDialogInstance, recordingFinishedDialogInstance, inviteMusiciansUtilInstance) { localRecordingsDialog = localRecordingsDialogInstance; recordingFinishedDialog = recordingFinishedDialogInstance; + inviteMusiciansUtil = inviteMusiciansUtilInstance; context.jamClient.SetVURefreshRate(150); playbackControls = new context.JK.PlaybackControls($('.session-recordings .recording-controls')); events(); diff --git a/web/app/assets/stylesheets/client/content.css.scss b/web/app/assets/stylesheets/client/content.css.scss index 88550ab29..5282c4209 100644 --- a/web/app/assets/stylesheets/client/content.css.scss +++ b/web/app/assets/stylesheets/client/content.css.scss @@ -155,6 +155,9 @@ margin-bottom: 10px; > a.smallbutton { margin: 2px; + &.button-grey { + display:none; // @FIXME VRFS-930 / VRFS-931 per comment from David - don't show. + } } } @@ -204,7 +207,6 @@ .friendbox { padding:5px; - width:100%; height:60px; } diff --git a/web/app/assets/stylesheets/client/createSession.css.scss b/web/app/assets/stylesheets/client/createSession.css.scss index c9fe9d001..3d189bae2 100644 --- a/web/app/assets/stylesheets/client/createSession.css.scss +++ b/web/app/assets/stylesheets/client/createSession.css.scss @@ -11,7 +11,7 @@ } } -#btn-choose-friends { +.btn-choose-friends { margin:0; } #create-session-genre select, #create-session-band select { diff --git a/web/app/assets/stylesheets/client/profile.css.scss b/web/app/assets/stylesheets/client/profile.css.scss index 5e766429d..b51f22bf6 100644 --- a/web/app/assets/stylesheets/client/profile.css.scss +++ b/web/app/assets/stylesheets/client/profile.css.scss @@ -1,5 +1,11 @@ @import "client/common.css.scss"; +.profile-head { + +} +.profile-body { + +} .profile-header { padding:10px 20px; // height:120px; diff --git a/web/app/assets/stylesheets/client/session.css.scss b/web/app/assets/stylesheets/client/session.css.scss index ad415a5da..fc455d55a 100644 --- a/web/app/assets/stylesheets/client/session.css.scss +++ b/web/app/assets/stylesheets/client/session.css.scss @@ -716,3 +716,6 @@ table.vu td { } +#update-session-invite-musicians { + margin: 10px; +} \ No newline at end of file diff --git a/web/app/controllers/api_invitations_controller.rb b/web/app/controllers/api_invitations_controller.rb index 266f97d6d..ac487c8a9 100644 --- a/web/app/controllers/api_invitations_controller.rb +++ b/web/app/controllers/api_invitations_controller.rb @@ -14,8 +14,11 @@ class ApiInvitationsController < ApiController if current_user.id != sender_id raise PermissionError, "You can only ask for your own sent invitations" end - - @invitations = Invitation.where(:sender_id => current_user.id) + if session_id = params[:session_id] + @invitations = Invitation.where(:sender_id => sender_id, :music_session_id => session_id) + else + @invitations = Invitation.where(:sender_id => current_user.id) + end elsif !receiver_id.nil? if current_user.id != receiver_id raise PermissionError, "You can only ask for your own received invitations" @@ -34,25 +37,33 @@ class ApiInvitationsController < ApiController sender = current_user join_request = JoinRequest.find(params[:join_request]) unless params[:join_request].nil? - @invitation = Invitation.new - @invitation.music_session = music_session - @invitation.sender = sender - @invitation.receiver = receiver - @invitation.join_request = join_request - - @invitation.save - - unless @invitation.errors.any? - User.save_session_settings(current_user, music_session) - - # send notification - Notification.send_session_invitation(receiver, current_user, music_session.id) + @invitation = Invitation.limit(1) + .where(:receiver_id => params[:receiver], + :sender_id => current_user.id, + :music_session_id => params[:music_session]) + .first + if @invitation respond_with @invitation, :responder => ApiResponder, :location => api_invitation_detail_url(@invitation) - else - # we have to do this because api_invitation_detail_url will fail with a bad @invitation - response.status = :unprocessable_entity - respond_with @invitation + @invitation = Invitation.new + @invitation.music_session = music_session + @invitation.sender = sender + @invitation.receiver = receiver + @invitation.join_request = join_request + @invitation.save + + unless @invitation.errors.any? + User.save_session_settings(current_user, music_session) + + # send notification + Notification.send_session_invitation(receiver, current_user, music_session.id) + respond_with @invitation, :responder => ApiResponder, :location => api_invitation_detail_url(@invitation) + + else + # we have to do this because api_invitation_detail_url will fail with a bad @invitation + response.status = :unprocessable_entity + respond_with @invitation + end end end diff --git a/web/app/views/api_search/index.rabl b/web/app/views/api_search/index.rabl index 6442d3cae..05009f2e3 100644 --- a/web/app/views/api_search/index.rabl +++ b/web/app/views/api_search/index.rabl @@ -43,6 +43,10 @@ if @search.musicians_filter_search? @search.is_follower?(musician) end + node :biography do |musician| + musician.biography.nil? ? "" : musician.biography + end + child :musician_instruments => :instruments do attributes :instrument_id, :description, :proficiency_level, :priority end @@ -73,6 +77,10 @@ if @search.bands_filter_search? @search.is_follower?(band) end + node :biography do |band| + band.biography.nil? ? "" : band.biography + end + child :genres => :genres do attributes :genre_id, :description end @@ -81,7 +89,7 @@ if @search.bands_filter_search? node :user_id do |uu| uu.id end node :photo_url do |uu| uu.photo_url end node :name do |uu| uu.name end - node :instruments do |uu| uu.instruments.map(&:id).join(',') end + node :instruments do |uu| uu.instruments.map(&:id).join(',') end end node :follow_count do |band| @search.follow_count(band) end diff --git a/web/app/views/api_users/band_index.rabl b/web/app/views/api_users/band_index.rabl index fb7b3a748..2439ee419 100644 --- a/web/app/views/api_users/band_index.rabl +++ b/web/app/views/api_users/band_index.rabl @@ -26,4 +26,8 @@ node :genres do |band| attributes :id, :description end end -end \ No newline at end of file +end + +node :biography do |band| + band.biography.nil? ? "" : band.biography +end diff --git a/web/app/views/clients/_bands.html.erb b/web/app/views/clients/_bands.html.erb index 2dc713b39..4b6c04455 100644 --- a/web/app/views/clients/_bands.html.erb +++ b/web/app/views/clients/_bands.html.erb @@ -22,7 +22,7 @@ - diff --git a/web/app/views/clients/_inviteMusicians.html.erb b/web/app/views/clients/_inviteMusicians.html.erb new file mode 100644 index 000000000..27931c00e --- /dev/null +++ b/web/app/views/clients/_inviteMusicians.html.erb @@ -0,0 +1,38 @@ + +
+
+
+
+
+ CANCEL  +
+
+ INVITE +
+
+ + + + + + diff --git a/web/app/views/clients/_musicians.html.erb b/web/app/views/clients/_musicians.html.erb index 0df6f6e06..2b4c565de 100644 --- a/web/app/views/clients/_musicians.html.erb +++ b/web/app/views/clients/_musicians.html.erb @@ -22,24 +22,35 @@ diff --git a/web/app/views/clients/_session.html.erb b/web/app/views/clients/_session.html.erb index d044ff38c..308178ef1 100644 --- a/web/app/views/clients/_session.html.erb +++ b/web/app/views/clients/_session.html.erb @@ -69,8 +69,8 @@

live tracks

-
- + @@ -178,3 +178,4 @@ + diff --git a/web/app/views/clients/_testBridge.html.erb b/web/app/views/clients/_testBridge.html.erb index 6b6d51ada..7a6286a27 100644 --- a/web/app/views/clients/_testBridge.html.erb +++ b/web/app/views/clients/_testBridge.html.erb @@ -40,7 +40,7 @@
-

SetFTUE

diff --git a/web/app/views/clients/_web_filter.html.erb b/web/app/views/clients/_web_filter.html.erb index cfad92687..a4c6d0ad6 100644 --- a/web/app/views/clients/_web_filter.html.erb +++ b/web/app/views/clients/_web_filter.html.erb @@ -4,36 +4,61 @@ filter_label = :band when Search::PARAM_MUSICIAN filter_label = :musician + when Search::PARAM_FEED + filter_label = :feed end %> <%= content_tag(:div, :id => defined?(id) ? id : 'session-controls', :class => "#{filter_label}-filter filter-head") do %> <%= content_tag(:div, :class => "filter-element wrapper") do -%> - <%= content_tag(:div, 'Filter By:', :class => 'filter-element desc') %> - - <%= select_tag("#{filter_label}_order_by", options_for_select(Search::ORDERINGS), {:class => "#{filter_label}-order-by"} ) %> + <% if :feed == filter_label %> + + <%= content_tag(:div, 'Sort Feed by:', :class => 'filter-element desc') %> + <%= select_tag("#{filter_label}_order_by", options_for_select(Search::F_SORT_OPTS), {:class => "#{filter_label}-order-by"} ) %> + + <% else %> + + <%= content_tag(:div, 'Filter By:', :class => 'filter-element desc') %> + <%= select_tag("#{filter_label}_order_by", options_for_select(Search::ORDERINGS), {:class => "#{filter_label}-order-by"} ) %> + + <% end %> <% end -%> <%= content_tag(:div, :class => 'filter-element wrapper') do -%> <% if :musician == filter_label %> - + <%= content_tag(:div, 'Instrument:', :class => 'filter-element desc') %> <%= select_tag("#{filter_label}_instrument", options_for_select([['Any', '']].concat(JamRuby::Instrument.all.collect { |ii| [ii.description, ii.id] }))) %> + <% elsif :band == filter_label %> - + <%= content_tag(:div, 'Genre:', :class => 'filter-element desc') %> <%= select_tag("#{filter_label}_genre", options_for_select([['Any', '']].concat(JamRuby::Genre.all.collect { |ii| [ii.description, ii.id] }))) %> + + <% elsif :feed == filter_label %> + + <%= content_tag(:div, 'Include Dates:', :class => 'filter-element desc') %> + <%= select_tag("#{filter_label}_date", options_for_select(Search::DATE_OPTS)) %> + <% end %> <% end -%> - <%= content_tag(:div, :class => 'filter-element wrapper') do -%> - <%= content_tag(:div, 'Within', :class => 'filter-element desc') %> - <%= content_tag(:div, :class => 'query-distance-params') do -%> - <% default_distance = :musician == filter_label ? Search::M_MILES_DEFAULT : Search::B_MILES_DEFAULT %> - <%= select_tag("#{filter_label}_query_distance", options_for_select(Search::DISTANCE_OPTS, default_distance)) %> - <% end -%> - <%= content_tag(:div, :class => 'filter-element desc') do -%> - miles of <%= content_tag(:span, current_user.current_city(request.remote_ip), :id => "#{filter_label}-filter-city") %> - <% end -%> + <% if :feed == filter_label %> + + <%= content_tag(:div, 'Show:', :class => 'filter-element desc') %> + <%= select_tag("#{filter_label}_show", options_for_select(Search::SHOW_OPTS)) %> + + <% else %> + + <%= content_tag(:div, 'Within', :class => 'filter-element desc') %> + <%= content_tag(:div, :class => 'query-distance-params') do -%> + <% default_distance = :musician == filter_label ? Search::M_MILES_DEFAULT : Search::B_MILES_DEFAULT %> + <%= select_tag("#{filter_label}_query_distance", options_for_select(Search::DISTANCE_OPTS, default_distance)) %> + <% end -%> + <%= content_tag(:div, :class => 'filter-element desc') do -%> + miles of <%= content_tag(:span, current_user.current_city(request.remote_ip), :id => "#{filter_label}-filter-city") %> + <% end -%> + + <% end %> <% end -%> <% end -%> \ No newline at end of file diff --git a/web/app/views/clients/index.html.erb b/web/app/views/clients/index.html.erb index bbd434dbf..0f0e47fb3 100644 --- a/web/app/views/clients/index.html.erb +++ b/web/app/views/clients/index.html.erb @@ -35,6 +35,7 @@ <%= render "account_profile_avatar" %> <%= render "account_audio_profile" %> <%= render "invitationDialog" %> +<%= render "inviteMusicians" %> <%= render "whatsNextDialog" %> <%= render "recordingFinishedDialog" %> <%= render "localRecordingsDialog" %> @@ -105,6 +106,9 @@ var friendSelectorDialog = new JK.FriendSelectorDialog(JK.app); friendSelectorDialog.initialize(); + var inviteMusiciansUtil = new JK.InviteMusiciansUtil(JK.app); + inviteMusiciansUtil.initialize(friendSelectorDialog); + var userDropdown = new JK.UserDropdown(JK.app); JK.UserDropdown = userDropdown; userDropdown.initialize(invitationDialog); @@ -148,7 +152,7 @@ JK.Banner.initialize(); var createSessionScreen = new JK.CreateSessionScreen(JK.app); - createSessionScreen.initialize(invitationDialog, friendSelectorDialog); + createSessionScreen.initialize(invitationDialog, inviteMusiciansUtil); var bandSetupScreen = new JK.BandSetupScreen(JK.app); bandSetupScreen.initialize(invitationDialog, friendSelectorDialog); @@ -170,7 +174,7 @@ findBandScreen.initialize(); var sessionScreen = new JK.SessionScreen(JK.app); - sessionScreen.initialize(localRecordingsDialog, recordingFinishedDialog); + sessionScreen.initialize(localRecordingsDialog, recordingFinishedDialog, inviteMusiciansUtil); var sessionSettingsDialog = new JK.SessionSettingsDialog(JK.app, sessionScreen); sessionSettingsDialog.initialize(); diff --git a/web/app/views/users/_create_account_form.html.erb b/web/app/views/users/_create_account_form.html.erb index 44d0567b2..77cbbafed 100644 --- a/web/app/views/users/_create_account_form.html.erb +++ b/web/app/views/users/_create_account_form.html.erb @@ -102,7 +102,7 @@

--> - <%= f.submit "CREATE ACCOUNT", class: "right button-orange" %>

+ <%= f.submit "CREATE ACCOUNT", class: "right button-orange" %>