Sha256: aff5eaccb0e977c2a4cd46614d4213a23bc2321dcfcbe18b04a232b7a16fe30a

Contents?: true

Size: 698 Bytes

Versions: 12

Compression:

Stored size: 698 Bytes

Contents

<%= content_for :javascript do -%>
  <%= javascript_tag do %>
    $(function() {
      $('#signup_account_name_input p.inline-hints, #project_name_input p.inline-hints').each(function(index) {
        $(this).html($(this).text().replace("keyword", "<span>keyword</span>"))
      });
      $('#signup_account_name, #project_name').keyup(function(){
        var mainPart = /^([\w\s]*)(\W*)/.exec($(this).val())[1];
        mainPart = mainPart.replace(/ /g, "").toLowerCase();
        if(mainPart == "") mainPart = "keyword";
        $(this).siblings('p.inline-hints').find('span').text(mainPart);
        $('#signup_keyword, #project_keyword').val(mainPart);
      });
    });
  <% end %>
<% end -%>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
saucy-0.2.6.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.2.6 app/views/shared/_saucy_javascript.html.erb
saucy-0.2.5 app/views/shared/_saucy_javascript.html.erb
saucy-0.2.4.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.2.4 app/views/shared/_saucy_javascript.html.erb
saucy-0.2.3 app/views/shared/_saucy_javascript.html.erb
saucy-0.2.2 app/views/shared/_saucy_javascript.html.erb
saucy-0.2.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.2.0 app/views/shared/_saucy_javascript.html.erb
saucy-0.1.18 app/views/shared/_saucy_javascript.html.erb
saucy-0.1.17 app/views/shared/_saucy_javascript.html.erb
saucy-0.1.16 app/views/shared/_saucy_javascript.html.erb