Sha256: 5393c67a47878b6cc88cf2a11134b872e1ee74a291cb4cde86cbce8afe927180
Contents?: true
Size: 1.33 KB
Versions: 4
Compression:
Stored size: 1.33 KB
Contents
{I" class:ETI"BundledAsset; FI"logical_path; TI"peoplefinder/org_tree.js; FI" pathname; TI"W/Users/jakub/code/moj/peoplefinder/app/assets/javascripts/peoplefinder/org_tree.js; FI"content_type; TI"application/javascript; TI" mtime; Tl+Ñ_WTI"length; Ti|I"digest; TI"%4d85c66a52e8b72e42aec0daea97e3ee; FI"source; TI"|function OrgTree(tree, currentNodeId) { this.tree = this.augmentTree(tree, currentNodeId, false); } OrgTree.prototype.augmentTree = function(node, currentNodeId, disabled) { var self = this; if (node.id === currentNodeId) { disabled = true; } return { id: node.id, name: node.name, url: node.url, disabled: disabled, children: node.children.map(function(child) { return self.augmentTree(child, currentNodeId, disabled); }) }; }; OrgTree.prototype.pathToNodeId = function(id, node, path) { var self = this; node = node || self.tree; path = path || [node]; if (!id) { return [self.tree]; } if (node.id === id) { return path; } for (var i = 0, ii = node.children.length; i < ii; i++) { var child = node.children[i]; var res = self.pathToNodeId(id, child, path.concat(child)); if (res) { return res; } } return null; }; ; TI"required_assets_digest; TI"%f5c2db942077c8769157b5fe87f4f30b; FI" _version; TI"%01511319732b44ed6445e68132ed559b; F
Version data entries
4 entries across 2 versions & 1 rubygems