From 41e99372f717862ddc60cd64dd7fbd9813158db9 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Wed, 1 Aug 2012 20:16:30 +0100 Subject: [PATCH] Adding / for root location and on span --- lib/coder.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/coder.js b/lib/coder.js index 7253ea3..d833cd4 100644 --- a/lib/coder.js +++ b/lib/coder.js @@ -1157,6 +1157,7 @@ var ICEcoder = { perms = actionElemType=="file" ? 664 : 705; // Identify our target element & the first child element in it's location + if (!location) {location="/"} targetElem = document.getElementById('filesFrame').contentWindow.document.getElementById(location.replace(/\//g,"|")); locNest = targetElem.parentNode.parentNode.nextSibling; if (locNest.nextSibling) {locNest = locNest.nextSibling} @@ -1172,7 +1173,7 @@ var ICEcoder = { // Finally we can add the first list item for this file/folder we're adding newLI = document.createElement("li"); newLI.className = cssStyle; - newLI.innerHTML = '        '+file+' '+perms+''; + newLI.innerHTML = '        '+file+' '+perms+''; locNest.nextSibling.appendChild(newLI); locNest.nextSibling.appendChild(newText);