diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 9df4a10..9de46ee 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -963,6 +963,9 @@ var ICEcoder = { // Now we can add the first LI for this file/folder we're adding newLI = document.createElement("li"); newLI.className = cssStyle; + newLI.draggable = true; + newLI.ondrag = function(event) {top.ICEcoder.draggingWithKeyTest(event);top.ICEcoder.getcMInstance().focus()}; + newLI.ondragend = function() {top.ICEcoder.dropFile(this)}; newLI.innerHTML = innerLI locNest.nextSibling.appendChild(newLI); locNest.nextSibling.appendChild(newText); @@ -981,6 +984,9 @@ var ICEcoder = { if ((elemType==actionElemType && nameLI > file) || (actionElemType=="folder" && elemType=="file") || i==locNest.childNodes.length-1) { newLI = document.createElement("li"); newLI.className = cssStyle; + newLI.draggable = true; + newLI.ondrag = function(event) {top.ICEcoder.draggingWithKeyTest(event);top.ICEcoder.getcMInstance().focus()}; + newLI.ondragend = function() {top.ICEcoder.dropFile(this)}; newLI.innerHTML = innerLI; // Append or insert depending on which of the above if statements is true if (i==locNest.childNodes.length-1) {