Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop
This commit is contained in:
commit
1322f72e64
|
|
@ -102,6 +102,7 @@ module JamRuby
|
|||
|
||||
validates :first_name, presence: true, length: {maximum: 50}, no_profanity: true
|
||||
validates :last_name, presence: true, length: {maximum: 50}, no_profanity: true
|
||||
validates :biography, length: {maximum: 4000}, no_profanity: true
|
||||
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
|
||||
validates :email, presence: true, format: {with: VALID_EMAIL_REGEX}
|
||||
validates :update_email, presence: true, format: {with: VALID_EMAIL_REGEX}, :if => :updating_email
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@
|
|||
}
|
||||
}
|
||||
else {
|
||||
logger.error("Unexpected ajax error: " + textStatus + ", msg:" + errorMessage);
|
||||
|
||||
app.notify({title: textStatus, text: errorMessage, detail: jqXHR.responseText});
|
||||
}
|
||||
}
|
||||
|
|
@ -293,6 +293,7 @@
|
|||
if (jqXHR.status == 422) {
|
||||
var errors = JSON.parse(jqXHR.responseText);
|
||||
var $errors = context.JK.format_all_errors(errors);
|
||||
console.log("$errors", $errors)
|
||||
this.notify({title: title, text: $errors, icon_url: "/assets/content/icon_alert_big.png"})
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -239,11 +239,14 @@
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
// Uber-simple templating
|
||||
// var template = "Hey {name}";
|
||||
// var vals = { name: "Jon" };
|
||||
// _fillTemplate(template, vals);
|
||||
// --> "Hey Jon"
|
||||
//
|
||||
// use context._.template for something more powerful
|
||||
context.JK.fillTemplate = function(template, vals) {
|
||||
for(var val in vals)
|
||||
template=template.replace(new RegExp('{'+val+'}','g'), vals[val]);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,23 @@
|
|||
@import "client/common.css.scss";
|
||||
|
||||
#user-profile {
|
||||
#profile-biography {
|
||||
a.enter-bio {
|
||||
|
||||
}
|
||||
|
||||
textarea {
|
||||
width:100%;
|
||||
height:150px;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.update-biography {
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.profile-head {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class ApiUsersController < ApiController
|
|||
@user.update_instruments(params[:instruments].nil? ? [] : params[:instruments]) if params.has_key?(:instruments)
|
||||
@user.show_whats_next = params[:show_whats_next] if params.has_key?(:show_whats_next)
|
||||
@user.subscribe_email = params[:subscribe_email] if params.has_key?(:subscribe_email)
|
||||
|
||||
@user.biography = params[:biography] if params.has_key?(:biography)
|
||||
@user.save
|
||||
|
||||
if @user.errors.any?
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ if @search.musicians_text_search?
|
|||
attributes :instrument_id, :description, :proficiency_level, :priority
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
if @search.musicians_filter_search?
|
||||
node :city do |user|
|
||||
current_user.try(:location)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Profile -->
|
||||
<div layout="screen" layout-id="profile" layout-arg="id" class="screen secondary">
|
||||
<div layout="screen" layout-id="profile" layout-arg="id" class="screen secondary" id="user-profile">
|
||||
<div class="content-head">
|
||||
<div class="content-icon">
|
||||
<%= image_tag "content/icon_profile.png", :size => "19x19" %>
|
||||
|
|
@ -192,3 +192,24 @@
|
|||
<div class="profile-block-city">{location}</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/template" id="template-add-user-profile">
|
||||
<div>
|
||||
<span>You have no bio to describe yourself as a musician. <a href="#" class="enter-bio">Enter one now!</a></span>
|
||||
<div class="update-biography">
|
||||
<div class="field">
|
||||
<textarea name="biography" class="user-biography"/>
|
||||
</div>
|
||||
<br clear="left" /><br />
|
||||
<div class="right">
|
||||
<a id="btn-update-user-biography" layout-action="close" class="button-orange">OK</a>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a id="btn-cancel-user-biography" layout-action="close" class="button-grey">CANCEL</a>
|
||||
</div>
|
||||
<br clear="all" />
|
||||
</div>
|
||||
<div>
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -135,6 +135,11 @@ def make_bands
|
|||
state: state,
|
||||
country: country,
|
||||
)
|
||||
|
||||
Genre.order('RANDOM()').limit(rand(3)+1).each do |gg|
|
||||
bb.genres << gg
|
||||
end
|
||||
|
||||
begin
|
||||
bb.save!
|
||||
rescue
|
||||
|
|
|
|||
|
|
@ -46,8 +46,7 @@ describe "Account", :js => true, :type => :feature, :capybara_feature => true do
|
|||
end
|
||||
|
||||
it {
|
||||
find('h1', text: 'my account')
|
||||
should have_selector('#notification h2', text: 'Confirmation Email Sent')
|
||||
find('#notification h2', text: 'Confirmation Email Sent')
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ describe "Session Recordings", :js => true, :type => :feature, :capybara_feature
|
|||
start_recording_with(creator, [joiner1])
|
||||
in_client(creator) do
|
||||
find('#session-leave').trigger(:click)
|
||||
find('#btn-accept-leave-session').trigger(:click)
|
||||
expect(page).to have_selector('h2', text: 'feed')
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue