From 9ffab47f8392075a4cc70d43a424773d1f8d4546 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Wed, 20 Feb 2013 18:09:00 +0000 Subject: [PATCH] fileManager() gone, new openCloseDir() function The fileManager function was only being called once onLoad of files.php This was really only adding onClick events and setting classNames and style.displays, no need to do this really with JS, merged into files.php as it's creating the tree openCloseDir function now available to deal with open & close of dirs This is less code, less JS to run on boot and paves the way towards multiple treeTypes --- lib/ice-coder.js | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 34936ff..8cdf7c0 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -377,37 +377,14 @@ var ICEcoder = { // FILES // ============== - // Setup the file manager - fileManager: function() { - ICEcoder.filesFrame = top.document.getElementById('filesFrame'); - if (!ICEcoder.filesFrame.contentWindow.document.getElementsByTagName) {return;}; - - var aMenus = ICEcoder.filesFrame.contentWindow.document.getElementsByTagName("LI"); - for (var i=0; i-1) { - var submenu=aMenus[i].childNodes; - for (var j=0; j