Changeset 680

Show
Ignore:
Timestamp:
10/15/09 12:53:51 (1 month ago)
Author:
jdecq
Message:

adding some debug code for drag n drop

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/drag.js

    r508 r680  
    3535                                } 
    3636                        }; 
    37                         data.dataList.forEach(function(d) { 
    38                                 if (d.first.data.isDirectory()) { 
    39                                         process_dir(d.first.data.directoryEntries); 
    40                                 } else { 
    41                                         paths.push(d.first.data.QueryInterface( 
    42                                                 Ci.nsILocalFile).path); 
    43                                 } 
    44                         }); 
     37                        if(data.dataList.length > 0) { 
     38                                data.dataList.forEach(function(d) { 
     39                                        if (d.first.data.isDirectory()) { 
     40                                                process_dir(d.first.data.directoryEntries); 
     41                                        } else { 
     42                                                paths.push(d.first.data.QueryInterface( 
     43                                                        Ci.nsILocalFile).path); 
     44                                        } 
     45                                }); 
     46                        } 
     47                        else { 
     48//                              var types = e.dataTransfer.types; 
     49//                              var i = 1; 
     50//                              logStringMessage("type: " + types.item(i)); 
     51//                              logStringMessage(e.dataTransfer.getData(types.item(i))); 
     52//                              paths.push(e.dataTransfer.getData(types.item(i))); 
     53                        } 
     54                         
    4555                        photos.add(paths); 
    4656                },