Sha256: a1e7feeb93648a87343d6ca4c14622bb50e8ac49cb169a9fd4163047c6be0cb6

Contents?: true

Size: 760 Bytes

Versions: 49

Compression:

Stored size: 760 Bytes

Contents

$(document).ready(function() {
  $('.tree > ul').attr('role', 'tree').find('ul').attr('role', 'group');
  $('.tree').find('li:has(ul)').addClass('parent_li').attr('role', 'treeitem').find(' > .label-node-holder > span.node').attr('title', 'Collapse this branch').on('click', function (e) {
    var children = $(this).parent().parent('li.parent_li').find(' > ul > li');
    if (children.is(':visible')) {
      children.slideUp();
      $(this).attr('title', 'Expand this branch').find(' > i').addClass('fa-plus-circle').removeClass('fa-minus-circle');
    }
    else {
      children.slideDown();
      $(this).attr('title', 'Collapse this branch').find(' > i').addClass('fa-minus-circle').removeClass('fa-plus-circle');
    }
  e.stopPropagation();
  });
});

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
tawork-0.0.50 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.49 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.48 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.47 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.46 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.45 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.44 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.43 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.42 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.41 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.40 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.39 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.38 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.37 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.36 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.35 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.34 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.33 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.31 vendor/assets/javascripts/bootstrap-tree.js
tawork-0.0.30 vendor/assets/javascripts/bootstrap-tree.js