0013096: Dropping folder into FM causes a crash
authorMichael Spahn <m.spahn@metaways.de>
Thu, 18 May 2017 13:20:32 +0000 (15:20 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 30 May 2017 09:18:32 +0000 (11:18 +0200)
https://forge.tine20.org/view.php?id=13096

Change-Id: I3be5cf638e961185e1d2fce35bbc29d3fd144b41
Reviewed-on: http://gerrit.tine20.com/customers/4707
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Filemanager/js/NodeGridPanel.js
tine20/Filemanager/js/NodeTreePanel.js
tine20/Tinebase/js/widgets/grid/FilterPlugin.js

index 9d9de9e..82ac557 100644 (file)
@@ -738,13 +738,13 @@ Tine.Filemanager.NodeGridPanel = Ext.extend(Tine.widgets.grid.GridPanel, {
 
         var files = fileSelector.getFileList();
 
-        if(files.length > 0) {
-            grid.pagingToolbar.refresh.disable();
-        }
-
         var filePathsArray = [], uploadKeyArray = [];
 
         Ext.each(files, function (file) {
+            if ("" === file.type) {
+                return true;
+            }
+
             var fileRecord = Tine.Filemanager.Model.Node.createFromFile(file),
                 filePath = targetFolderPath + '/' + fileRecord.get('name');
 
@@ -768,6 +768,10 @@ Tine.Filemanager.NodeGridPanel = Ext.extend(Tine.widgets.grid.GridPanel, {
 
         }, this);
 
+        if (0 === uploadKeyArray.length) {
+            return;
+        }
+
         var params = {
                 filenames: filePathsArray,
                 type: "file",
index f6ee25b..90acc16 100644 (file)
@@ -521,6 +521,9 @@ Tine.Filemanager.NodeTreePanel = Ext.extend(Tine.widgets.container.TreePanel, {
             addToGridStore = false;
 
         Ext.each(files, function (file) {
+            if ("" === file.type) {
+                return true;
+            }
 
             var fileName = file.name || file.fileName,
                 filePath = targetNodePath + '/' + fileName;
@@ -541,6 +544,10 @@ Tine.Filemanager.NodeTreePanel = Ext.extend(Tine.widgets.container.TreePanel, {
 
         }, this);
 
+        if (0 === uploadKeyArray.length) {
+            return;
+        }
+
         var params = {
                 filenames: filePathsArray,
                 type: "file",
index 5031697..4a19506 100644 (file)
@@ -100,8 +100,6 @@ Ext.extend(Tine.widgets.grid.FilterPlugin, Ext.util.Observable, {
         if (this.store) {
             this.store.load({});
         }
-        
-        this.fireEvent('change', this);
     },
     
     /**