Commit 7aa857f30d0be976c07060b8b357ccead7208b02
1 parent
b926918c
Exists in
master
and in
27 other branches
enhancements: visualization of suggested usernames
Also removed whitespace (ActionItem3009)
Showing
3 changed files
with
15 additions
and
9 deletions
Show diff stats
app/views/account/_identifier_status.rhtml
1 | 1 | <div class='status-identifier'> |
2 | + | |
3 | + <span class='<%= @status_class %>'><%= @status %></span> | |
2 | 4 | <% if @suggested_usernames %> |
3 | - <% @status += '<br/>' + _('Available: ') %> | |
4 | - <% @suggested_usernames.each do |username| %> | |
5 | - <% @status += "<a href='#' class='suggested_usernames'>" + username + '</a> ' %> | |
6 | - <% end %> | |
5 | + <div class='suggested_usernames'> | |
6 | + <%= _('Available: ') %> | |
7 | + <% @suggested_usernames.each do |username| %> | |
8 | + <a href='#'><%= username %></a> | |
9 | + <% end %> | |
10 | + </div> | |
7 | 11 | <% end %> |
8 | - | |
9 | - | |
10 | - <p><span class='<%= @status_class %>'><%= @status %></span></p> | |
11 | 12 | <script type="text/javascript"> |
12 | 13 | jQuery('#user_login').removeClass('<%= validation_classes %>'); |
13 | 14 | jQuery('#user_login').addClass('<%= @status_class %>'); |
14 | - jQuery('.suggested_usernames').click(function(e) { | |
15 | + jQuery('.suggested_usernames a').click(function(e) { | |
15 | 16 | e.preventDefault(); |
16 | 17 | |
17 | 18 | fill_username(this.innerHTML); | ... | ... |
public/stylesheets/application.css
... | ... | @@ -6040,6 +6040,11 @@ li.profile-activity-item.upload_image .activity-gallery-images-count-1 img { |
6040 | 6040 | text-align: right; |
6041 | 6041 | } |
6042 | 6042 | |
6043 | +#url-check .suggested_usernames, | |
6044 | +#url-check .suggested_usernames a { | |
6045 | + color: #005000; | |
6046 | +} | |
6047 | + | |
6043 | 6048 | #email-check, |
6044 | 6049 | #fake-check, |
6045 | 6050 | #password-rate, | ... | ... |
test/functional/account_controller_test.rb
... | ... | @@ -34,7 +34,7 @@ class AccountControllerTest < ActionController::TestCase |
34 | 34 | assert session[:user] |
35 | 35 | assert_response :redirect |
36 | 36 | end |
37 | - | |
37 | + | |
38 | 38 | should 'display notice message if the login fail' do |
39 | 39 | @controller.stubs(:logged_in?).returns(false) |
40 | 40 | post :login, :user => {:login => 'quire', :password => 'quire'} | ... | ... |