From 5a2f004c20fe3e51eecb87fec40c96b3a2a5b648 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Thu, 5 Jul 2012 23:06:26 +0100 Subject: [PATCH] CSS structure display changes & find in files QS No longer using open & closed classes (italic text on open dirs) This is because we have new icon to show open dirs Reworked code to handle new UL & LI structure Target querystring passed through if we're finding in files or filenames --- lib/coder.js | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/lib/coder.js b/lib/coder.js index 4ec1d2f..efaf0fd 100644 --- a/lib/coder.js +++ b/lib/coder.js @@ -602,37 +602,29 @@ var ICEcoder = { var aMenus = ICEcoder.filesFrame.contentWindow.document.getElementsByTagName("LI"); for (var i=0; i -1) { + if (mclass.indexOf("pft-directory")>-1) { var submenu=aMenus[i].childNodes; for (var j=0; j -1) ? "open" : "closed"; - } - if (submenu[j].tagName == "UL") { - submenu[j].style.display = (mclass.indexOf("open") > -1) ? "block" : "none"; } } } } - aMenus[0].childNodes[0].className = "open"; - aMenus[0].childNodes[1].style.display = "block"; + var ulElems = ICEcoder.filesFrame.contentWindow.document.getElementsByTagName("UL"); + for (var i=2; i'; + if (document.findAndReplace.target.value.indexOf("file")>=0) { + targetQS = "&target="+document.findAndReplace.target.value.replace(/ /g,"-"); + } + top.document.getElementById('mediaContainer').innerHTML = ''; } } }, @@ -1184,7 +1180,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+''; + newLI.innerHTML = '        '+file+''; locNest.appendChild(newLI,locNest.childNodes[0]); // There are items in that location, so add our new item in the right position @@ -1202,7 +1198,7 @@ var ICEcoder = { if ((elemType==actionElemType && nameLI > file) || (actionElemType=="folder" && elemType=="file") || i==locNest.childNodes.length-1) { newLI = document.createElement("li"); newLI.className = cssStyle; - newLI.innerHTML = '        '+file+''; + newLI.innerHTML = '        '+file+''; // Append or insert depending on which of the above if statements is true i==locNest.childNodes.length-1 ? locNest.appendChild(newLI,locNest.childNodes[i]) : locNest.insertBefore(newLI,locNest.childNodes[i]);