mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-23 00:37:14 +01:00
Add draggable, ondrag and ondragend to new LI's
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user