소스 검색

Add files via upload

Daniele Bonini (皮夕): WebDev and DevOps by lots of Sim.pli.city bits 3 년 전
부모
커밋
932f47ec24
1개의 변경된 파일11개의 추가작업 그리고 8개의 파일을 삭제
  1. 11 8
      Public/js/dragndrop-code.js

+ 11 - 8
Public/js/dragndrop-code.js

@@ -83,16 +83,19 @@ function onDrop(tthis, e) {
 
   //alert(newcube.cats);
   //alert(newcube.cats.indexOf(curcat));
-  bcatfound = false;
-  mycats = " " + newcube.cats + " ";
-  if ((mycats.indexOf(curcat) === -1)) {
-    newcube.cats += " " + curcat;      
-    newcube.xml = updCubeXML(newcube.xml, "cats", newcube.cats);
+  if (curcat!=="*") {
+    bcatfound = false;
+    mycats = " " + newcube.cats + " ";
+    if ((mycats.indexOf(curcat) === -1)) {
+      newcube.cats += " " + curcat;      
+      newcube.xml = updCubeXML(newcube.xml, "cats", newcube.cats);
+    } else {
+      bcatfound = curcat;
+    }  
+    //alert(newcube.cats);
   } else {
-    bcatfound = curcat;
+    bcatfound = true;
   }  
-  //alert(newcube.cats);
-  
   //alert("bfound=" + bfound);
   //alert("bcatfound=" + bcatfound);