- Fix missing new directory icon in context menu

- Fix drop/paste into empty directory
This commit is contained in:
Nathan Gray 2014-11-24 16:25:05 +00:00
parent 0bcc81e44b
commit a538706de5
2 changed files with 11 additions and 5 deletions

View File

@ -146,6 +146,7 @@ class filemanager_ui
),
'mkdir' => array(
'caption' => lang('Create directory'),
'icon' => 'filemanager/button_createdir',
'group' => $group,
'allowOnMultiple' => false,
'onExecute' => 'javaScript:app.filemanager.createdir'

View File

@ -621,15 +621,20 @@ app.classes.filemanager = AppJS.extend(
var dst = this.get_path();
// 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
var data = egw.dataGetUIDdata(_target.id);
if (!data || data.data.mime != 'httpd/unix-directory')
if(_target.id)
{
dst = this.dirname(dst);
var data = egw.dataGetUIDdata(_target.id);
if (!data || data.data.mime != 'httpd/unix-directory')
{
dst = this.dirname(dst);
}
}
}