mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-18 04:20:05 +02:00
- Fix missing new directory icon in context menu
- Fix drop/paste into empty directory
This commit is contained in:
@@ -146,6 +146,7 @@ class filemanager_ui
|
|||||||
),
|
),
|
||||||
'mkdir' => array(
|
'mkdir' => array(
|
||||||
'caption' => lang('Create directory'),
|
'caption' => lang('Create directory'),
|
||||||
|
'icon' => 'filemanager/button_createdir',
|
||||||
'group' => $group,
|
'group' => $group,
|
||||||
'allowOnMultiple' => false,
|
'allowOnMultiple' => false,
|
||||||
'onExecute' => 'javaScript:app.filemanager.createdir'
|
'onExecute' => 'javaScript:app.filemanager.createdir'
|
||||||
|
@@ -621,17 +621,22 @@ app.classes.filemanager = AppJS.extend(
|
|||||||
var dst = this.get_path();
|
var dst = this.get_path();
|
||||||
|
|
||||||
// File(s) were dropped on a row, they want them inside
|
// File(s) were dropped on a row, they want them inside
|
||||||
if(_target && _target.id)
|
if(_target)
|
||||||
{
|
{
|
||||||
dst = this.id2path(_target.id);
|
var dst = ''
|
||||||
|
var paths = this._elems2paths([_target]);
|
||||||
|
if(paths[0]) dst = paths[0];
|
||||||
|
|
||||||
// check if target is a file --> use it's directory instead
|
// check if target is a file --> use it's directory instead
|
||||||
|
if(_target.id)
|
||||||
|
{
|
||||||
var data = egw.dataGetUIDdata(_target.id);
|
var data = egw.dataGetUIDdata(_target.id);
|
||||||
if (!data || data.data.mime != 'httpd/unix-directory')
|
if (!data || data.data.mime != 'httpd/unix-directory')
|
||||||
{
|
{
|
||||||
dst = this.dirname(dst);
|
dst = this.dirname(dst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this._do_action(_action.id.replace("file_drop_",''), src, false, dst);
|
this._do_action(_action.id.replace("file_drop_",''), src, false, dst);
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user