mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-12 00:48:26 +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']);
|
unset($content['button']);
|
||||||
switch($button)
|
switch($button)
|
||||||
{
|
{
|
||||||
case 'up':
|
|
||||||
if ($content['path'] != '/') $content['path'] = egw_vfs::dirname($content['path']);
|
|
||||||
break;
|
|
||||||
case 'home':
|
case 'home':
|
||||||
$content['path'] = filemanager_ui::get_home_dir();
|
$content['path'] = filemanager_ui::get_home_dir();
|
||||||
break;
|
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':
|
case 'ok':
|
||||||
$copy_result = null;
|
$copy_result = null;
|
||||||
if (isset($content['file_upload']['name']) && file_exists($content['file_upload']['tmp_name']))
|
if (isset($content['file_upload']['name']) && file_exists($content['file_upload']['tmp_name']))
|
||||||
|
@ -30,12 +30,12 @@
|
|||||||
<row class="dialogHeader">
|
<row class="dialogHeader">
|
||||||
<hbox>
|
<hbox>
|
||||||
<html id="js"/>
|
<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"/>
|
<button label="Go to your home directory" id="button[home]" image="gohome"/>
|
||||||
<box class="selectPathContainer">
|
<box class="selectPathContainer">
|
||||||
<vfs-name id="path" class="selectPath"/>
|
<vfs-name id="path" class="selectPath" onchange="1"/>
|
||||||
</box>
|
</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>
|
</hbox>
|
||||||
</row>
|
</row>
|
||||||
<row class="selectFiles">
|
<row class="selectFiles">
|
||||||
|
Loading…
Reference in New Issue
Block a user