Sha256: ac4905083da26da489c7412e0dd2fb35fea5dce2864469cc411e2da363b11e2e

Contents?: true

Size: 595 Bytes

Versions: 19

Compression:

Stored size: 595 Bytes

Contents

(function($){
  var SEL = {
    list : "neo-rails-scenarios-list",
    open : "neo-rails-scenarios-list-open"
  };

  var url_param = function(name){
    var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
    return results !== null && results[1];
  };

  $(function(){
    $("."+SEL.list).each(function(){
      var ui = $(this);
      ui.on("click", "h2", function(evt){
        ui.toggleClass(SEL.open);
      });

      var active_scenario = url_param("scenario");
      if (active_scenario){
        ui.addClass(SEL.open);
      };
    });
  })
})(jQuery);

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
neo-rails-0.4.1 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.4.0 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.3.2 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.3.1 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.3 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.2.3.1 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.2.3 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.2.2 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.2.1 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.2.0 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.1.3 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.1.2 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.1.1 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.1.0 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.0.8 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.0.7 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.0.6 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.0.5 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js
neo-rails-0.0.4 lib/assets/javascripts/neo/rails/scenarios/render_scenarios_list.js