diff --git a/build b/build index db8ab33a4..1c93eb214 100755 --- a/build +++ b/build @@ -61,9 +61,10 @@ popd > /dev/null if [ ! -z "$PACKAGE" ]; then - -DEB_SERVER=http://localhost:9010/apt-`uname -p` -GEM_SERVER=http://localhost:9000/gems + + source /etc/lsb-release + DEB_SERVER=http://localhost:9010/apt-`uname -p`/$DISTRIB_CODENAME + GEM_SERVER=http://localhost:9000/gems # if still going, then push all debs up if [[ "$GIT_BRANCH" == *develop* || "$GIT_BRANCH" == *master* || "$GIT_BRANCH" == *release* || "$GIT_BRANCH" == *feature* || "$GIT_BRANCH" == *hotfix* ]]; then diff --git a/web/app/assets/javascripts/accounts_profile_samples.js b/web/app/assets/javascripts/accounts_profile_samples.js index 882572141..112a0e78f 100644 --- a/web/app/assets/javascripts/accounts_profile_samples.js +++ b/web/app/assets/javascripts/accounts_profile_samples.js @@ -6,7 +6,7 @@ // TODO: Add a target type, which can be band or user -- call the // appropriate API methods. - context.JK.AccountProfileSamples = function(app) { + context.JK.AccountProfileSamples = function(app, parent, loadFn, updateFn) { var $document = $(document) // used to initialize RecordingSourceValidator in site_validator.js.coffee @@ -20,6 +20,7 @@ var ui = new context.JK.UIHelper(JK.app); var target = {}; var profileUtils = context.JK.ProfileUtils; + parent var parent = $(".account-profile-samples") var $screen = $('.profile-online-sample-controls', parent); @@ -60,8 +61,12 @@ } function afterShow(data) { - api.getUserProfile().done(function(targetPlayer) { - renderPlayer(targetPlayer) + $.when(loadFn()) + .done(function(targetPlayer) { + console.log("TARGET PLAYER", targetPlayer) + if (targetPlayer && targetPlayer.keys && targetPlayer.keys.length > 0) { + renderPlayer(targetPlayer) + } }) } @@ -288,7 +293,8 @@ disableSubmits() var player = buildPlayer() - api.updateUser({ + + updateFn({ website: player.website, online_presences: player.online_presences, performance_samples: player.performance_samples diff --git a/web/app/assets/javascripts/addNewGear.js b/web/app/assets/javascripts/addNewGear.js index cbe9f7d50..ab45745fd 100644 --- a/web/app/assets/javascripts/addNewGear.js +++ b/web/app/assets/javascripts/addNewGear.js @@ -3,18 +3,16 @@ "use strict"; context.JK = context.JK || {}; - context.JK.AddNewGearDialog = function(app, sessionScreen) { + context.JK.AddNewGearDialog = function(app) { var logger = context.JK.logger; function events() { $('#btn-leave-session-test').click(function() { - sessionScreen.setPromptLeave(false); + context.SessionActions.leaveSession.trigger({location: '/client#/home'}) app.layout.closeDialog('configure-tracks'); - context.location = "/client#/home"; - app.layout.startNewFtue(); }); diff --git a/web/app/assets/javascripts/musician_search_filter.js.coffee b/web/app/assets/javascripts/musician_search_filter.js.coffee index 4187d6acd..ebb777d5a 100644 --- a/web/app/assets/javascripts/musician_search_filter.js.coffee +++ b/web/app/assets/javascripts/musician_search_filter.js.coffee @@ -50,7 +50,7 @@ context.JK.MusicianSearchFilter = class MusicianSearchFilter this.loadSearchFilter(sFilter) loadSearchFilter: (sFilter) => - @searchFilter = JSON.parse(sFilter) + @searchFilter = JSON.parse(sFilter) args = interests: @searchFilter.data_blob.interests skill_level: @searchFilter.data_blob.skill_level @@ -235,7 +235,7 @@ context.JK.MusicianSearchFilter = class MusicianSearchFilter @searchFilter[key] = this._builderSelectValue(key) $.each gon.musician_search_meta.filter_keys.multi, (index, key) => @searchFilter[key] = this._builderSelectMultiValue(key) - @rest.postMusicianSearchFilter({ filter: JSON.stringify(@searchFilter), page: @pageNumber }).done(this.didSearch) + @rest.postMusicianSearchFilter({ filter: JSON.stringify(@searchFilter.data_blob), page: @pageNumber }).done(this.didSearch) renderResultsHeader: () => @screen.find('#musician-search-filter-description').html(@searchResults.description) @@ -397,7 +397,7 @@ context.JK.MusicianSearchFilter = class MusicianSearchFilter if @pageNumber < @searchResults.page_count && this.willSearch(false) @screen.find('.paginate-wait').show() @pageNumber += 1 - @rest.postMusicianSearchFilter({ filter: JSON.stringify(@searchFilter), page: @pageNumber }).done(this.didSearch) + @rest.postMusicianSearchFilter({ filter: JSON.stringify(@searchFilter.data_blob), page: @pageNumber }).done(this.didSearch) return true false diff --git a/web/app/assets/stylesheets/client/content-orig.css.scss b/web/app/assets/stylesheets/client/content-orig.css.scss index e653f3f50..5c898a493 100644 --- a/web/app/assets/stylesheets/client/content-orig.css.scss +++ b/web/app/assets/stylesheets/client/content-orig.css.scss @@ -349,7 +349,7 @@ ul.shortcuts { white-space:normal; } -.smallbutton { + .smallbutton { font-size:10px !important; padding:2px 8px !important; } diff --git a/web/app/assets/stylesheets/client/content.css.scss b/web/app/assets/stylesheets/client/content.css.scss index 852622cf8..a9292790a 100644 --- a/web/app/assets/stylesheets/client/content.css.scss +++ b/web/app/assets/stylesheets/client/content.css.scss @@ -179,7 +179,7 @@ margin-top: 10px; margin-bottom: 10px; > a.smallbutton { - margin: 2px; + margin: 4px; &.button-grey { display:none; // @FIXME VRFS-930 / VRFS-931 per comment from David - don't show. } diff --git a/web/app/assets/stylesheets/client/musician.css.scss b/web/app/assets/stylesheets/client/musician.css.scss index e075a212e..36c1181ce 100644 --- a/web/app/assets/stylesheets/client/musician.css.scss +++ b/web/app/assets/stylesheets/client/musician.css.scss @@ -138,17 +138,23 @@ } } - #musician-filter-results { - margin: 0 10px 0px 10px; + #musician-search-filter-results-wrapper { + margin: 0 10px; } #musician-search-filter-results-header { padding: 10px 10px 10px 10px; + background-color: #4C4C4C; } #btn-musician-search-builder { float: left; } + .musician-search-text { + float:left; + font-size:12px; + margin-top:4px; + } #musician-search-filter-description { padding: 5px 5px 5px 5px; diff --git a/web/app/views/clients/_addNewGear.html.erb b/web/app/views/clients/_addNewGear.html.erb index 462040b57..2740e74ca 100644 --- a/web/app/views/clients/_addNewGear.html.erb +++ b/web/app/views/clients/_addNewGear.html.erb @@ -9,7 +9,7 @@

CANCEL  - LEAVE SESSION & START TEST + LEAVE SESSION & START TEST

diff --git a/web/app/views/clients/_musician_search_filter.html.slim b/web/app/views/clients/_musician_search_filter.html.slim index f9f87697d..413003fa6 100644 --- a/web/app/views/clients/_musician_search_filter.html.slim +++ b/web/app/views/clients/_musician_search_filter.html.slim @@ -4,6 +4,7 @@ div#musician-search-filter-results.content-wrapper div#musician-search-filter-results-header a#btn-musician-search-builder.button-orange href="#" SEARCH + span.musician-search-text Click search button to look for musicians with similar interests, skill levels, etc. a#btn-musician-search-reset.button-grey href="#" RESET div#musician-search-filter-description div.clearall diff --git a/web/app/views/clients/index.html.erb b/web/app/views/clients/index.html.erb index 5ed69e288..5002f53ea 100644 --- a/web/app/views/clients/index.html.erb +++ b/web/app/views/clients/index.html.erb @@ -240,7 +240,7 @@ var accountProfileInterests = new JK.AccountProfileInterests(JK.app); accountProfileInterests.initialize(); - var accountProfileSamples = new JK.AccountProfileSamples(JK.app) + var accountProfileSamples = new JK.AccountProfileSamples(JK.app, $(".account-profile-samples"), api.getUserProfile, api.updateUser) accountProfileSamples.initialize(); var accountAudioProfile = new JK.AccountAudioProfile(JK.app); @@ -316,7 +316,6 @@ var redeemCompleteScreen = new JK.RedeemCompleteScreen(JK.app); redeemCompleteScreen.initialize(); - var findBandScreen = new JK.FindBandScreen(JK.app); findBandScreen.initialize(); @@ -325,6 +324,10 @@ AppActions.appInit.trigger(JK.app) + + var addNewGearDialog = new JK.AddNewGearDialog(JK.app); + addNewGearDialog.initialize(); + var sessionSettingsDialog = new JK.SessionSettingsDialog(JK.app); sessionSettingsDialog.initialize(); diff --git a/web/spec/features/in_session_spec.rb b/web/spec/features/in_session_spec.rb index a17f0d16a..18784d3ca 100644 --- a/web/spec/features/in_session_spec.rb +++ b/web/spec/features/in_session_spec.rb @@ -47,7 +47,7 @@ describe "In a Session", :js => true, :type => :feature, :capybara_feature => tr assert_all_tracks_seen(users=[user, finder]) in_client(user) do - find('#track-settings').trigger(:click) + find('.session-track-settings').trigger(:click) wait_for_ajax expect(page).to have_selector('h1', text: 'configure tracks') @@ -159,7 +159,7 @@ describe "In a Session", :js => true, :type => :feature, :capybara_feature => tr recording = FactoryGirl.create(:recording, owner: user) in_client(user) do create_session - find('#open-a-recording').trigger(:click) + find('.open-recording').trigger(:click) within('table.local-recordings') do expect(page).to have_content recording.name end diff --git a/web/spec/features/musician_profile_spec.rb b/web/spec/features/musician_profile_spec.rb index f6d1de28f..39988b281 100644 --- a/web/spec/features/musician_profile_spec.rb +++ b/web/spec/features/musician_profile_spec.rb @@ -26,32 +26,37 @@ describe "Musicians", :js => true, :type => :feature, :capybara_feature => true navigate_musician_setup #save_screenshot("setup.png") expect(page).to have_selector('#user-profile', visible: true) - expect(page).to have_selector('#no-samples', visible: true) + expect(page).to have_selector('.no-samples', visible: true) end it "shows Online Presence" do - PerformanceSample.create!(:player_id => user.id, :service_type => "jamkazam", :claimed_recording_id => claimed_recording.id) - PerformanceSample.create!(:player_id => user.id, :service_type => "soundcloud", :service_id => "67890") - PerformanceSample.create!(:player_id => user.id, :service_type => "soundcloud", :service_id => "67891") - navigate_musician_setup - expect(page).to have_selector('#no-samples', visible: true) - - expect(page).to have_selector('.jamkazam-playable', count: 1) - expect(page).to have_selector('.twitter-playable', count: 0) - expect(page).to have_selector('.sound-cloud-playable', count: 2) - end - - it "shows Performance Samples" do OnlinePresence.create!({:player_id => user.id, :username => "myonlineusername", :service_type => "facebook"}) OnlinePresence.create!({:player_id => user.id, :username => "myonlineusername", :service_type => "twitter"}) OnlinePresence.create!({:player_id => user.id, :username => "myonlineusername", :service_type => "soundcloud"}) navigate_musician_setup - expect(page).to have_selector('#facebook-presence', visible: true) - expect(page).to have_selector('#soundcloud-presence', visible: true) - expect(page).to have_selector('#twitter-presence', visible: true) + expect(page).to have_selector('.no-samples', visible: true) + expect(page).to have_selector('.facebook-presence', visible: true) + expect(page).to have_selector('.soundcloud-presence', visible: true) + expect(page).to have_selector('.twitter-presence', visible: true) + + end + + it "shows Performance Samples" do + PerformanceSample.create!(:player_id => user.id, :service_type => "jamkazam", :claimed_recording_id => claimed_recording.id) + PerformanceSample.create!(:player_id => user.id, :service_type => "soundcloud", :service_id => "67890") + PerformanceSample.create!(:player_id => user.id, :service_type => "soundcloud", :service_id => "67891") + + navigate_musician_setup + expect(page).to have_selector('.jamkazam-playable', count: 1) + expect(page).to have_selector('.twitter-playable', count: 0) + expect(page).to have_selector('.sound-cloud-playable', count: 2) + + expect(page).to have_selector('.facebook-presence', visible: true) + expect(page).to have_selector('.soundcloud-presence', visible: true) + expect(page).to have_selector('.twitter-presence', visible: true) end end \ No newline at end of file diff --git a/web/spec/support/utilities.rb b/web/spec/support/utilities.rb index 17e2bbc44..a57ef4757 100644 --- a/web/spec/support/utilities.rb +++ b/web/spec/support/utilities.rb @@ -602,7 +602,7 @@ def set_session_access access_type access_level = "Musicians may join at will" end - find('#session-settings-button').trigger(:click) + find('.session-settings').trigger(:click) within('#session-settings-dialog') do jk_select(access_level, '#session-settings-dialog #session-settings-musician-access') find('#session-settings-dialog-submit').trigger(:click) @@ -644,7 +644,7 @@ end def change_session_genre #randomly just change it here = 'select.genre-list' #wait_for_ajax - find('#session-settings-button').trigger(:click) + find('.session-settings').trigger(:click) find('#session-settings-dialog') # ensure the dialog is visible within('#session-settings-dialog') do wait_for_ajax @@ -658,7 +658,7 @@ end def get_session_genre here = 'select.genre-list' - find('#session-settings-button').trigger(:click) + find('.session-settings').trigger(:click) wait_for_ajax @current_genres = selected_genres find('#session-settings-dialog-submit').trigger(:click) @@ -677,7 +677,7 @@ def assert_all_tracks_seen(users=[]) users.each do |user| in_client(user) do users.reject {|u| u==user}.each do |other| - find("div.track-label[title='#{other.name}']") + find(".session-track", text: other.name) #puts user.name + " is able to see " + other.name + "\'s track" end end