mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
File select dialog
- Fix create folder - Fix can't change directory by editing path
This commit is contained in:
parent
9455efae32
commit
fca003d78d
@ -122,20 +122,9 @@ class filemanager_select
|
||||
unset($content['button']);
|
||||
switch($button)
|
||||
{
|
||||
case 'up':
|
||||
if ($content['path'] != '/') $content['path'] = egw_vfs::dirname($content['path']);
|
||||
break;
|
||||
case 'home':
|
||||
$content['path'] = filemanager_ui::get_home_dir();
|
||||
break;
|
||||
case 'createdir':
|
||||
if (!@egw_vfs::mkdir($content['path'],null,STREAM_MKDIR_RECURSIVE))
|
||||
{
|
||||
$content['msg'] = !egw_vfs::is_writable(dirname($content['path'])) ?
|
||||
lang('Permission denied!') : lang('Failed to create directory!');
|
||||
$content['path'] = $content['old_path'];
|
||||
}
|
||||
break;
|
||||
case 'ok':
|
||||
$copy_result = null;
|
||||
if (isset($content['file_upload']['name']) && file_exists($content['file_upload']['tmp_name']))
|
||||
|
@ -30,12 +30,12 @@
|
||||
<row class="dialogHeader">
|
||||
<hbox>
|
||||
<html id="js"/>
|
||||
<button label="Up" id="button[up]" image="goup"/>
|
||||
<button label="Up" id="button[up]" onclick="app.filemanager.change_dir('..');" image="goup"/>
|
||||
<button label="Go to your home directory" id="button[home]" image="gohome"/>
|
||||
<box class="selectPathContainer">
|
||||
<vfs-name id="path" class="selectPath"/>
|
||||
<vfs-name id="path" class="selectPath" onchange="1"/>
|
||||
</box>
|
||||
<button label="Create directory" id="button[createdir]" onclick="var dir = prompt(egw::lang('New directory')); if (!dir) return false; document.getElementById(form::name('path')).value+='/'+dir;" image="button_createdir" ro_image="createdir_disabled" class="createDir"/>
|
||||
<button label="Create directory" id="button[createdir]" onclick="app.filemanager.createdir" image="button_createdir" ro_image="createdir_disabled" class="createDir"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row class="selectFiles">
|
||||
|
Loading…
Reference in New Issue
Block a user