Sha256: be287785611f3c5485c2445b0aabb37a34de8aa2d3b57b36e59caf4755a630d7
Contents?: true
Size: 1.67 KB
Versions: 2
Compression:
Stored size: 1.67 KB
Contents
{I" class:EFI"BundledAsset; FI"logical_path; FI"jstree.util.js; FI" pathname; FI"0$root/app/assets/javascripts/jstree.util.js; FI"content_type; FI"application/javascript; FI" mtime; Fl+9ÉSI"length; FiI"digest; F"%077fd167ede54228f0260ea3057fd3f5I"source; FI"function initTree(containerID, jsonData) { $("#" + containerID).jstree({ "plugins" : [ //"themes", "json_data","ui","crrm","cookies","dnd","search","types","hotkeys","contextmenu" ], "json_data" : { "data" : prepareTreeNode(jsonData) } }) } function prepareTreeNode(node, newParent, depth) { if(!depth) depth = 0; if(!newParent) { var root = new Object(); root["children"] = new Array(); root["data"] = "root"; root["state"] = "open"; return prepareTreeNode(node, root, depth); } var numChildren = 0; for(i in node) { numChildren ++; var newNode = new Object(); newNode["metadata"] = new Object(); newNode["metadata"]["propName"] = i; if (typeof node[i] == 'object'){ newNode["data"] = i; newNode["children"] = new Array(); prepareTreeNode(node[i], newNode, depth+1); } else { var value = node[i]; value = value.length > 50 ? (value.substring(0,50) + " [...]") : value; newNode["data"] = i + " = " + value; newNode["metadata"]["propValue"] = node[i]; } if(depth < 2) { newNode["state"] = "open"; } if(newParent) { if(!newParent["children"]) { newParent["children"] = new Array(); } newParent["children"].push(newNode); } } if(numChildren <= 0) { newParent["children"] = null; } return newParent; } ; ; TI"required_assets_digest; F"%c96720ea0a5063142a860c771da0a02cI" _version; F"%a56df69ef97ba4d9f1a23bf9b0add58a
Version data entries
2 entries across 1 versions & 1 rubygems