Sha256: 8040098dccb2bb7ed13a2cdc2157451bc0a1ea311f09fd6b2415f5afe4dc714b

Contents?: true

Size: 1.29 KB

Versions: 56

Compression:

Stored size: 1.29 KB

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);
      });

      $.fn.updateSelectedPlan = function() {
        $(".plans-edit input:radio:not(checked)").each(function() {
          $("label[for=" + $(this).attr("id") + "]").removeClass('selected');
        });
        $("label[for=" + $(this).attr("id") + "]").addClass('selected');
        if($(this).attr("data-free") == "true") {
          $(".billing_information").hide();
        } else {
          $(".billing_information").show();
        }
      };

      $(".plans-edit input:radio").click(function() {
        $(this).updateSelectedPlan();
      });
      $(".plans-edit input:radio:checked").updateSelectedPlan();
    });
  <% end %>
<% end -%>

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
saucy-0.5.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.5.0 app/views/shared/_saucy_javascript.html.erb
saucy-0.4.10 app/views/shared/_saucy_javascript.html.erb
saucy-0.4.9 app/views/shared/_saucy_javascript.html.erb
saucy-0.2.28.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.4.8 app/views/shared/_saucy_javascript.html.erb
saucy-0.4.7 app/views/shared/_saucy_javascript.html.erb
saucy-0.4.6 app/views/shared/_saucy_javascript.html.erb
saucy-0.4.5 app/views/shared/_saucy_javascript.html.erb
saucy-0.4.4 app/views/shared/_saucy_javascript.html.erb
saucy-0.4.3 app/views/shared/_saucy_javascript.html.erb
saucy-0.4.2 app/views/shared/_saucy_javascript.html.erb
saucy-0.4.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.3.4.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.4.0 app/views/shared/_saucy_javascript.html.erb
saucy-0.3.4 app/views/shared/_saucy_javascript.html.erb
saucy-0.3.3 app/views/shared/_saucy_javascript.html.erb
saucy-0.3.2 app/views/shared/_saucy_javascript.html.erb
saucy-0.3.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.3.0 app/views/shared/_saucy_javascript.html.erb