Sha256: 00baa66e26d4e63fa683f858f1f883aa2ea843c962f2a2b52efa9964ac800593

Contents?: true

Size: 1.21 KB

Versions: 56

Compression:

Stored size: 1.21 KB

Contents

<%= content_for :javascript do -%>
  <%= javascript_tag do %>
    $(function() {
      $('#project_name_input p.inline-hints').each(function(index) {
        $(this).html($(this).text().replace("keyword", "<span>keyword</span>"))
      });
      $('#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);
        $('#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 & 2 rubygems

Version Path
saucy-0.16.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.16.0 app/views/shared/_saucy_javascript.html.erb
saucy-0.15.2 app/views/shared/_saucy_javascript.html.erb
saucy-0.15.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.15.0 app/views/shared/_saucy_javascript.html.erb
saucy-0.14.5 app/views/shared/_saucy_javascript.html.erb
saucy-0.14.3 app/views/shared/_saucy_javascript.html.erb
saucy-0.10.10 app/views/shared/_saucy_javascript.html.erb
saucy-0.14.2 app/views/shared/_saucy_javascript.html.erb
saucy-0.14.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.14.0 app/views/shared/_saucy_javascript.html.erb
saucy-0.13.3 app/views/shared/_saucy_javascript.html.erb
saucy-0.13.2 app/views/shared/_saucy_javascript.html.erb
saucy-0.10.9 app/views/shared/_saucy_javascript.html.erb
saucy-0.10.8 app/views/shared/_saucy_javascript.html.erb
saucy-0.13.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.13.0 app/views/shared/_saucy_javascript.html.erb
saucy-0.12.5 app/views/shared/_saucy_javascript.html.erb
saucy-0.12.4 app/views/shared/_saucy_javascript.html.erb
saucy-0.12.3 app/views/shared/_saucy_javascript.html.erb