Sha256: 34ed23923b32127b2dea631f90733a4c9a1d2653edda996b5db61cc148debe79

Contents?: true

Size: 684 Bytes

Versions: 14

Compression:

Stored size: 684 Bytes

Contents

$(function() {
  $('.tree .toggle').live('click', function(e) { 
    e.preventDefault(); 
    var $li   = $(this).parents('li:first');
    var $icon = $li.find('.icon.toggle');
    var $nested = $li.find('.nested');

    if ($icon.hasClass('expanded')) {
      $icon.removeClass('expanded');
      $nested.slideUp(); 
    }
    else {
      var contentUrl = $nested.attr('data-ajax-content');
      $li.addClass('loading');
      
      $nested.load(contentUrl, function() {
        $nested.find('li:last').addClass('branch_end');
        $icon.addClass('expanded');
        init_tooltips();
        $nested.slideDown(); 
        $li.removeClass('loading');
      });
    }
  });
});

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
refinerycms-sidebar-2.0.0.dev spec/dummy/tmp/dragonfly/cache/body/b3/f434d2e0622653cd592d251e6fbf14410ecc5c
refinerycms-menus-2.0.7 spec/dummy/tmp/dragonfly/cache/body/b3/f434d2e0622653cd592d251e6fbf14410ecc5c
refinerycms-menus-2.0.6 spec/dummy/tmp/dragonfly/cache/body/b3/f434d2e0622653cd592d251e6fbf14410ecc5c
refinerycms-core-2.0.10 app/assets/javascripts/refinery/tree.js
refinerycms-core-2.0.9 app/assets/javascripts/refinery/tree.js
refinerycms-core-2.0.8 app/assets/javascripts/refinery/tree.js
refinerycms-core-2.0.7 app/assets/javascripts/refinery/tree.js
refinerycms-core-2.0.6 app/assets/javascripts/refinery/tree.js
refinerycms-core-2.0.5 app/assets/javascripts/refinery/tree.js
refinerycms-core-2.0.4 app/assets/javascripts/refinery/tree.js
refinerycms-core-2.0.3 app/assets/javascripts/refinery/tree.js
refinerycms-core-2.0.2 app/assets/javascripts/refinery/tree.js
refinerycms-core-2.0.1 app/assets/javascripts/refinery/tree.js
refinerycms-core-2.0.0 app/assets/javascripts/refinery/tree.js