forked from extern/egroupware
Improved nextmatch row aoi and added AJAX-actions for createdir and symlink to filemanager_ui
This commit is contained in:
parent
374b65e0b8
commit
4b380ca119
@ -57,6 +57,11 @@ function nextmatchRowAOI(_node)
|
|||||||
aoi.updateState(EGW_AO_STATE_SELECTED, this.checked, EGW_AO_SHIFT_STATE_MULTI);
|
aoi.updateState(EGW_AO_STATE_SELECTED, this.checked, EGW_AO_SHIFT_STATE_MULTI);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Don't execute the default action when double clicking on an entry
|
||||||
|
$(aoi.checkBox).dblclick(function() {
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
aoi.doSetState = function(_state) {
|
aoi.doSetState = function(_state) {
|
||||||
var selected = egwBitIsSet(_state, EGW_AO_STATE_SELECTED);
|
var selected = egwBitIsSet(_state, EGW_AO_STATE_SELECTED);
|
||||||
|
|
||||||
|
@ -1171,6 +1171,36 @@ class filemanager_ui
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "createdir":
|
||||||
|
$curdir = $selected[0];
|
||||||
|
$newdir = $selected[1];
|
||||||
|
|
||||||
|
$dst = egw_vfs::concat($curdir, $newdir);
|
||||||
|
if (egw_vfs::mkdir($dst, null, STREAM_MKDIR_RECURSIVE))
|
||||||
|
{
|
||||||
|
$arr['msg'] = lang("Directory successfully created.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$arr['msg'] = lang("Error while creating directory.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "symlink":
|
||||||
|
$curdir = $selected[0];
|
||||||
|
$target = $selected[1];
|
||||||
|
|
||||||
|
$link = egw_vfs::concat($curdir, egw_vfs::basename($target));
|
||||||
|
$abs_target = $target[0] == '/' ? $target : egw_vfs::concat($target, $target);
|
||||||
|
if (!egw_vfs::stat($abs_target))
|
||||||
|
{
|
||||||
|
$arr['msg'] = lang('Link target %1 not found!', egw_vfs::decodePath($abs_target));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$arr['msg'] = egw_vfs::symlink($target,$link) ?
|
||||||
|
lang('Symlink to %1 created.',$target) : lang('Error creating symlink to target %1!',egw_vfs::decodePath($target));
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$arr['msg'] = self::action($action,$selected,null,$arr['errs'],$arr['dirs'],$arr['files']);
|
$arr['msg'] = self::action($action,$selected,null,$arr['errs'],$arr['dirs'],$arr['files']);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user