From 7fd377df5699949049308cfca2d7de72d23f6052 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 18 Nov 2014 00:25:37 +0000 Subject: [PATCH] Add drop actions as placeholders so you can drop into an empty folder. --- filemanager/inc/class.filemanager_ui.inc.php | 3 ++- filemanager/js/app.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/filemanager/inc/class.filemanager_ui.inc.php b/filemanager/inc/class.filemanager_ui.inc.php index 8c2d0b5363..dd9f0623c8 100644 --- a/filemanager/inc/class.filemanager_ui.inc.php +++ b/filemanager/inc/class.filemanager_ui.inc.php @@ -281,7 +281,8 @@ class filemanager_ui 'is_parent' => 'mime', 'is_parent_value'=> egw_vfs::DIR_MIME_TYPE, 'header_left' => 'filemanager.index.header_left', - 'favorites' => true + 'favorites' => true, + 'placeholder_actions' => array('file_drop_mail','file_drop_move','file_drop_copy','file_drop_symlink') ); $content['nm']['path'] = self::get_home_dir(); } diff --git a/filemanager/js/app.js b/filemanager/js/app.js index d1eb36a8ca..2837e63cde 100644 --- a/filemanager/js/app.js +++ b/filemanager/js/app.js @@ -609,7 +609,7 @@ app.classes.filemanager = AppJS.extend( // check if target is a file --> use it's directory instead var data = egw.dataGetUIDdata(_target.id); - if (data.data.mime != 'httpd/unix-directory') + if (!data || data.data.mime != 'httpd/unix-directory') { dst = this.dirname(dst); }