diff --git a/web/app/assets/javascripts/accounts_profile_interests.js b/web/app/assets/javascripts/accounts_profile_interests.js index 4d44c835c..6257e69ed 100644 --- a/web/app/assets/javascripts/accounts_profile_interests.js +++ b/web/app/assets/javascripts/accounts_profile_interests.js @@ -286,17 +286,9 @@ inheritClass: true }) - initializeHelpBubbles() + profileUtils.initializeHelpBubbles($screen) } - - function initializeHelpBubbles() { - // Help bubbles (topics stored as attributes on element): - $(".help").each(function( index ) { - context.JK.helpBubble($(this), $(this).attr("help-topic"), {}, {}) - }) - } - - + this.initialize = initialize this.beforeShow = beforeShow this.afterShow = afterShow diff --git a/web/app/assets/javascripts/band_setup.js b/web/app/assets/javascripts/band_setup.js index 15a869dc1..9f2ca3162 100644 --- a/web/app/assets/javascripts/band_setup.js +++ b/web/app/assets/javascripts/band_setup.js @@ -12,6 +12,7 @@ var NONE_SPECIFIED = 'None specified' var ui = new context.JK.UIHelper(JK.app) var logger = context.JK.logger; + var profileUtils = context.JK.ProfileUtils; var rest = context.JK.Rest(); var inviteMusiciansUtil = null; var invitationDialog = null; @@ -29,8 +30,9 @@ var concertCount=null; var currentStep = 0; var STEPS_COUNT=5; + var $screen=$("#band-setup") var $selectedInstruments=[] - + function navBack() { if (currentStep>0) { saveBand(function() { @@ -61,7 +63,7 @@ } function renderCurrentPage() { - $(".band-step").addClass("hidden") + $screen.find($(".band-step")).addClass("hidden") $("#band-setup-step-" + currentStep).removeClass("hidden") if(currentStep==0) { $("#btn-band-setup-back").addClass("hidden") @@ -80,17 +82,17 @@ if(e){e.stopPropagation()} // Is new member selected? - if ($('input[name="add_new_members"]:checked').val()=="yes") { - $(".new-member-dependent").removeClass("hidden") + if ($screen.find($('input[name="add_new_members"]:checked')).val()=="yes") { + $screen.find($(".new-member-dependent")).removeClass("hidden") } else { - $(".new-member-dependent").addClass("hidden") + $screen.find($(".new-member-dependent")).addClass("hidden") } // Is paid gigs selected? if ($('input[name="paid_gigs"]:checked').val()=="yes") { - $(".paid-gigs-dependent").removeClass("hidden") + $screen.find($(".paid-gigs-dependent")).removeClass("hidden") } else { - $(".paid-gigs-dependent").addClass("hidden") + $screen.find($(".paid-gigs-dependent")).addClass("hidden") } return false; } @@ -667,12 +669,13 @@ app.bindScreen('band/setup', screenBindings); - $('input[type=radio]') - .iCheck({ - checkboxClass: 'icheckbox_minimal', - radioClass: 'iradio_minimal', - inheritClass: true - }); + $('input[type=radio]').iCheck({ + checkboxClass: 'icheckbox_minimal', + radioClass: 'iradio_minimal', + inheritClass: true + }); + + profileUtils.initializeHelpBubbles() } this.initialize = initialize; diff --git a/web/app/assets/javascripts/profile_utils.js b/web/app/assets/javascripts/profile_utils.js index ee61b4272..d3c47f682 100644 --- a/web/app/assets/javascripts/profile_utils.js +++ b/web/app/assets/javascripts/profile_utils.js @@ -43,6 +43,7 @@ }; profileUtils.gigMap = { + "": "not specified", "0": "zero", "1": "under 10", "2": "10 to 50", @@ -83,6 +84,13 @@ return list; } + // Initialize standard profile help bubbles (topics stored as attributes on element): + profileUtils.initializeHelpBubbles = function(parentElement) { + $(".help", parentElement).each(function( index ) { + context.JK.helpBubble($(this), $(this).attr("help-topic"), {}, {}) + }) + } + // profile genres profileUtils.profileGenres = function(genres) { var matches = $.grep(genres, function(g) { diff --git a/web/app/views/clients/_band_setup.html.slim b/web/app/views/clients/_band_setup.html.slim index 4a9e2c3f2..4a21c6685 100644 --- a/web/app/views/clients/_band_setup.html.slim +++ b/web/app/views/clients/_band_setup.html.slim @@ -105,7 +105,7 @@ td label.strong-label for="new-member" | We want to add a new member   - a.help help-topic="profile-interests-virtual-band" [?] + a.help help-topic="band-profile-add-new-member" [?] td.new-member-dependent label for="desired-experience" | Desired Experience   @@ -138,7 +138,7 @@ td label.strong-label for="paid-gigs" | We want to play paid gigs   - a.help help-topic="profile-interests-paid-gigs" [?] + a.help help-topic="band-profile-play-paid-gigs" [?] td.paid-gigs-dependent label for="hourly-rate" Hourly Rate: td.paid-gigs-dependent @@ -159,7 +159,7 @@ td label.strong-label for="free-gigs" | We want to play free gigs   - a.help help-topic="profile-interests-free-gigs" [?] + a.help help-topic="band-profile-play-free-gigs" [?] tr td .radio-field diff --git a/web/app/views/clients/_help.html.slim b/web/app/views/clients/_help.html.slim index 390d3a2ca..dac0816e4 100644 --- a/web/app/views/clients/_help.html.slim +++ b/web/app/views/clients/_help.html.slim @@ -278,3 +278,11 @@ script type="text/template" id="template-help-profile-interests-free-sessions" script type="text/template" id="template-help-profile-interests-cowrite-partners" | For composers and songwriters who want to collaborate with others in composing and creating new music. +script type="text/template" id="template-help-band-profile-add-new-member" + | For bands that want to add one or more new members and let the JamKazam community of musicians know your band is looking for new members. + +script type="text/template" id="template-help-band-profile-play-paid-gigs" + | For professional bands that are qualified and interested in playing paid gigs at music venues and other events. + +script type="text/template" id="template-help-band-profile-play-free-gigs" + | For bands that are interested in playing free gigs, either for fun or to build experience.