diff --git a/web/app/assets/javascripts/band_setup.js b/web/app/assets/javascripts/band_setup.js index 311b3ef58..a333019b0 100644 --- a/web/app/assets/javascripts/band_setup.js +++ b/web/app/assets/javascripts/band_setup.js @@ -22,7 +22,10 @@ var nilOptionText = 'n/a'; var bandId = ''; var friendInput=null; - + var bandType=null; + var bandStatus=null; + var concertCount=null; + // TODO: Use a single variable for a mutually exclusive option: var step1, step2; var isSaving = false; @@ -58,7 +61,7 @@ } } - function renderCurrentPage() { + function renderCurrentPage() { $(".band-step").addClass("hidden") $("#band-setup-step-" + currentStep).removeClass("hidden") if(currentStep==0) { @@ -73,8 +76,8 @@ } } - function is_new_record() { - return bandId.length == 0; + function is_new_record() { + return bandId==null || typeof(bandId)=='undefined' || bandId.length == 0; } function removeErrors() { @@ -110,8 +113,7 @@ resetGenres(); - $("#band-setup-step-1").show(); - $("#band-setup-step-2").hide(); + //renderCurrentPage();$(".band-step").addClass("hidden") $(friendInput) .unbind('blur') @@ -164,6 +166,7 @@ function buildBand() { var band = {}; + band.id = (is_new_record()) ? null : bandId; band.name = $("#band-name").val(); band.website = $("#band-website").val(); band.biography = $("#band-biography").val(); @@ -171,6 +174,10 @@ band.state = $("#band-region").val(); band.country = $("#band-country").val(); + band.band_type = bandType.val(); + band.band_status= bandStatus.val(); + band.concert_count= concertCount.val(); + if (step2) { band.genres = getSelectedGenres(); band.validate_genres = true @@ -285,6 +292,10 @@ $("#band-website").val(band.website); $("#band-biography").val(band.biography); + bandType.val(band.band_type) + bandStatus.val(band.band_status) + concertCount.val(band.concert_count) + if (band.photo_url) { $("#band-avatar").attr('src', band.photo_url); } @@ -541,6 +552,10 @@ 'afterShow': afterShow }; + bandType=$("#band-type") + bandStatus=$("#band-status") + concertCount=$("#concert-count") + app.bindScreen('band/setup', screenBindings); } diff --git a/web/app/assets/stylesheets/client/band.css.scss b/web/app/assets/stylesheets/client/band.css.scss index b2228bf5b..f3c291133 100644 --- a/web/app/assets/stylesheets/client/band.css.scss +++ b/web/app/assets/stylesheets/client/band.css.scss @@ -1,13 +1,15 @@ @import "client/common.css.scss"; #band-setup, #band-profile { - input, select, textarea { - @include border_box_sizing; - width: 100%; - padding: 2px 4px 2px 2px; + .band-field { + input, select, textarea { + @include border_box_sizing; + width: 100%; + padding: 2px 4px 2px 2px; + } } - td.band-biography { + td.band-biography, td.tdBandGenres { height:100%; vertical-align: top; #band-biography { @@ -18,7 +20,7 @@ .band-setup-genres { width:100%; - height:90px; + height:200px; background-color:#c5c5c5; border:none; -webkit-box-shadow: inset 2px 2px 3px 0px #888; @@ -346,12 +348,14 @@ width: 100%; } + #band-setup-form { padding: 0.25em 0.5em 0.25em 0.25em; - #band-setup-table { - + table.band-form-table { + width: 100%; + margin: 1em; } - + .easydropdown { padding: 0 3px; width:100%; @@ -369,4 +373,15 @@ margin-bottom:2px; } } +} + +.band-setup-genre { + input { + display: inline; + width: auto !important; + } + label { + display: inline; + width: auto; + } } \ No newline at end of file diff --git a/web/app/views/clients/_band_setup.html.slim b/web/app/views/clients/_band_setup.html.slim index 8f9c12451..37c44d525 100644 --- a/web/app/views/clients/_band_setup.html.slim +++ b/web/app/views/clients/_band_setup.html.slim @@ -7,126 +7,157 @@ = render "screen_navigation" .content-body .content-body-scroller - form#band-setup-form - div style="display:block;" - #band-setup-step-0.band-step.content-wrapper style="padding:10px 35px10px 35px;" - h2 edit profile: basics - table width="100%" - tr - td colspan="2" - - tr#name_row - td colspan="2" - .band-photo.hidden - span.field - a.band-avatar-profile href="#" - = image_tag "shared/avatar_generic_band.png", {:id => "band-avatar", :align=>"absmiddle", :height => 88, :width => 88 } - span.field - a#band-change-photo.small.ml20 href="#" - | Upload band photo. - - .band-name - .field - label for="band-name" - | Band Name: - input#band-name type="text" maxlength="1024" value="" - / td#tdBandWebsite[] - / .field - / label for="band-website" - / | Web Site: - / input#band-website[type="text" maxlength="4000" value=""] - tr - td.band-country - .field - label for="band-country" - | Country: - select#band-country - td.band-biography rowspan="3" - .field - label for="band-biography" - | Description / Bio: - textarea#band-biography rows="8" - tr - td.band-region - .field - label for="band-region" - | State/Region: - select#band-region - tr - td.band-city - .field - label for="band-city" - | City: - select#band-city - - / td#tdBandGenres[valign="top"] - / .field - / label for="band-genres" - / | Genres: - / .band-setup-genres.w90 - / table#band-genres[width="100%" cellpadding="10" cellspacing="6"] - #band-setup-step-1.band-step.content-wrapper - h2 edit profile: musical experience - #band-setup-step-2.band-step.content-wrapper - h2 edit profile: current interests - #band-setup-step-3.band-step.content-wrapper - h2 edit profile: online presence & performance samples - #band-setup-step-4.band-step.content-wrapper - h2 invite members - br - #band-setup-invite-musicians - br - br - | If your bandmates are not on JamKazam yet, use any of the options below to invite them to join the service. - br - br - .left.mr20 - .left - a.btn-email-invitation - = image_tag("content/icon_gmail.png", :size => "24x24", :align => "absmiddle") - .right.mt5.ml5 - | E-mail - .left.mr20 - .left - a.btn-facebook-invitation - = image_tag("content/icon_facebook.png", :size => "24x24", :align => "absmiddle") - .right.mt5.ml5 - | Facebook - .left.left - .left - a.btn-gmail-invitation - = image_tag("content/icon_google.png", :size => "24x24", :align => "absmiddle") - .right.mt5.ml5 - | Google+ - / br clear="all" - / .right - / a#btn-band-setup-back.button-grey - / | BACK - / |    - / a#btn-band-setup-save.button-orange - / | CREATE BAND - / .clearall + form#band-setup-form + #band-setup-step-0.band-step.content-wrapper + h2 edit profile: basics + table.band-form-table + tr + td colspan="2" - br clear="all" - .right - a#btn-band-setup-cancel.nav-button.button-grey - | CANCEL    - a#btn-band-setup-back.nav-button.button-grey.hidden - | BACK - a#btn-band-setup-next.nav-button.button-orange - | SAVE & NEXT - .clearall + tr#name_row + td colspan="2" + .band-photo.hidden + span.field + a.band-avatar-profile href="#" + = image_tag "shared/avatar_generic_band.png", {:id => "band-avatar", :align=>"absmiddle", :height => 88, :width => 88 } + span.field + a#band-change-photo.small.ml20 href="#" + | Upload band photo. + + .band-name + .field.band-field + label for="band-name" + | Band Name: + input#band-name type="text" maxlength="1024" value="" + / td#tdBandWebsite[] + / .field + / label for="band-website" + / | Web Site: + / input#band-website[type="text" maxlength="4000" value=""] + tr + td.band-country + .field.band-field + label for="band-country" + | Country: + select#band-country + td.band-biography rowspan="3" + .field.band-field + label for="band-biography" + | Description / Bio: + textarea#band-biography rows="8" + tr + td.band-region + .field.band-field + label for="band-region" + | State/Region: + select#band-region + tr + td.band-city + .field.band-field + label for="band-city" + | City: + select#band-city + + + #band-setup-step-1.band-step.content-wrapper + h2 edit profile: musical experience + + table.band-form-table + tr + td#tdBandGenres rowspan="3" + label for="band-genres" What genres do you play? + .band-setup-genres + table#band-genres + + td + .field + label for="band-type" Type + select#band-type.easydropdown name="band_type" + option value="" Not Specified + option value="virtual" Virtual + option value="physical" Physical + + tr + td + .field + label for="band-status" Status + select#band-status.easydropdown name="band_status" + option value="" Not Specified + option value="amateur" Amateur + option value="professional" Professional + + tr + td + .field + label for="concert-count" Concert Gigs Played + select#concert-count.easydropdown name="concert_count" + option value="" Not Specified + option value="0" Zero + option value="1" Under 10 + option value="2" 10 to 50 + option value="3" 50 to 100 + option value="4" Over 100 + + #band-setup-step-2.band-step.content-wrapper + h2 edit profile: current interests + #band-setup-step-3.band-step.content-wrapper + h2 edit profile: online presence & performance samples + #band-setup-step-4.band-step.content-wrapper + h2 invite members + br + #band-setup-invite-musicians + br + br + | If your bandmates are not on JamKazam yet, use any of the options below to invite them to join the service. + br + br + .left.mr20 + .left + a.btn-email-invitation + = image_tag("content/icon_gmail.png", :size => "24x24", :align => "absmiddle") + .right.mt5.ml5 + | E-mail + .left.mr20 + .left + a.btn-facebook-invitation + = image_tag("content/icon_facebook.png", :size => "24x24", :align => "absmiddle") + .right.mt5.ml5 + | Facebook + .left.left + .left + a.btn-gmail-invitation + = image_tag("content/icon_google.png", :size => "24x24", :align => "absmiddle") + .right.mt5.ml5 + | Google+ + / br clear="all" + / .right + / a#btn-band-setup-back.button-grey + / | BACK + / |    + / a#btn-band-setup-save.button-orange + / | CREATE BAND + / .clearall + + br clear="all" + .right + a#btn-band-setup-cancel.nav-button.button-grey + | CANCEL    + a#btn-band-setup-back.nav-button.button-grey.hidden + | BACK + a#btn-band-setup-next.nav-button.button-orange + | SAVE & NEXT + .clearall script#template-band-setup-genres type="text/template" - tr + tr.band-setup-genre tr - td - input value="{id}" {checked} type="checkbox" - | {description} + td + {description} + script#template-band-invitation type="text/template" - .invitation user-id="{userId}" - | {userName} + .invitation user-id="{{userId}}" + | {{userName}} a img src="shared/icon_delete_sm.png" width="13" height="13"