{I" class:ETI"ProcessedAsset;FI"logical_path;TI"admin/treetable.js;FI" pathname;TI"€/Users/brittanymartin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/trusty-cms-2.0.26/app/assets/javascripts/admin/treetable.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+áµXI" length;TiI" digest;TI"%cf331f176ee0b97ed2dadb316f47a839;FI" source;TI" $(function() { var persistStore = new Persist.Store("Trusty CMS"); var needToExpand = []; $("#pages").treetable({ expandable: true, initialState: "collapsed", onNodeCollapse: function() { var node = this; persistStore.remove(node.id); $("#pages").treetable("unloadBranch", this); }, onInitialized: function() { var length = needToExpand.length; for (var i = 0; i < length; i++) $("#pages").treetable("expandNode", needToExpand[i]); }, onNodeInitialized: function() { var node = this; var state = persistStore.get(node.id); if (state) { needToExpand.push(node.id); } }, onNodeExpand: function() { var node = this; var spinner = $($(node.row[0]).find(".busy")[0]); spinner.show(); persistStore.set(node.id, 'expanded'); // Render loader/spinner while loading $.ajax({ async: true, // Must be false, otherwise loadBranch happens after showChildren? url: "/admin/pages/" + node.row.data('ttPageId') + "/children?index=" + node.id }).done(function(html) { var rows = $(html).filter("tr"); $("#pages").treetable("loadBranch", node, rows); $.each(node.children, function() { var state = persistStore.get(this.id); if (state) { $("#pages").treetable("expandNode", this.id); } }); $('a.dropdown').each(function(){ Dropdown.setup(this); }); spinner.hide(); }); } }); }); ;TI"dependency_digest;TI"%64334b2bdf4d02bf1b1b941fb90e09de;FI"required_paths;T[I"€/Users/brittanymartin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/trusty-cms-2.0.26/app/assets/javascripts/admin/treetable.js;FI"dependency_paths;T[{I" path;TI"€/Users/brittanymartin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/trusty-cms-2.0.26/app/assets/javascripts/admin/treetable.js;F@I"2017-02-28T15:43:45-05:00;T@I"%cf331f176ee0b97ed2dadb316f47a839;FI" _version;TI"%5dbb392182285b4042e11c847d2199ba;F