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.12.2 app/views/shared/_saucy_javascript.html.erb
saucy-0.12.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.12.0 app/views/shared/_saucy_javascript.html.erb
saucy-0.11.5 app/views/shared/_saucy_javascript.html.erb
saucy-0.11.3 app/views/shared/_saucy_javascript.html.erb
saucy-0.11.2 app/views/shared/_saucy_javascript.html.erb
saucy-0.10.7 app/views/shared/_saucy_javascript.html.erb
saucy-0.10.6 app/views/shared/_saucy_javascript.html.erb
saasy-0.0.2.alpha3 app/views/shared/_saucy_javascript.html.erb
saasy-0.0.2.alpha2 app/views/shared/_saucy_javascript.html.erb
saasy-0.0.2.alpha1 app/views/shared/_saucy_javascript.html.erb
saucy-0.10.5 app/views/shared/_saucy_javascript.html.erb
saucy-0.10.4 app/views/shared/_saucy_javascript.html.erb
saucy-0.10.3 app/views/shared/_saucy_javascript.html.erb
saucy-0.10.2 app/views/shared/_saucy_javascript.html.erb
saucy-0.10.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.10.0 app/views/shared/_saucy_javascript.html.erb
saucy-0.9.1 app/views/shared/_saucy_javascript.html.erb
saucy-0.9.0 app/views/shared/_saucy_javascript.html.erb
saucy-0.8.5 app/views/shared/_saucy_javascript.html.erb