[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] filemanager/inc class.uifilemanager.inc.php, 1.14 hoo
From: |
ceb |
Subject: |
[Phpgroupware-cvs] filemanager/inc class.uifilemanager.inc.php, 1.14 hook_preferences.inc.php, 1.14 |
Date: |
Thu, 24 Feb 2005 15:08:47 -0000 |
Update of filemanager/inc
Modified Files:
Branch: MAIN
class.uifilemanager.inc.php lines: +166 -141
hook_preferences.inc.php lines: +3 -3
Log Message:
update
====================================================
Index: filemanager/inc/class.uifilemanager.inc.php
diff -u filemanager/inc/class.uifilemanager.inc.php:1.13
filemanager/inc/class.uifilemanager.inc.php:1.14
--- filemanager/inc/class.uifilemanager.inc.php:1.13 Sun Jan 23 21:33:14 2005
+++ filemanager/inc/class.uifilemanager.inc.php Mon Jan 24 00:26:34 2005
@@ -304,7 +304,7 @@
if(is_array($params))
{
- foreach($params as $action => $true)
+ foreach($params as $true => $action)
{
if(in_array($action,$bo_functions))
{
@@ -412,168 +412,184 @@
);
$var[] = array('align' =>
'right','height' => '50','valign' => 'bottom','widget' => $button);
break;
- default:
- $button['type'] = 'submit';
- $button['name'] = 'uiaction_edit';
- $button['value'] = lang('edit');
- $button['caption'] = $this->build_help('edit');
-
- $var[] = array('widget' => $button);
- $button['name'] = "rename";
- $button['value'] =lang('rename');
- $button['caption'] = $this->build_help('rename');
-
- $var[] = array('widget' => $button);
- $button['name'] = "delete";
- $button['value'] =lang('delete');
- $button['caption'] = $this->build_help('delete');
- $var[] = array('widget' => $button);
-
- $button['name'] = "edit_comments";
- $button['value'] =lang('edit comments');
- $button['caption'] = $this->build_help('edit_comments');
- $var[] = array('widget' => $button);
-
- $var[] = array('widget' => array( 'type' => 'seperator'
));
-
- $button['name'] = "go";
- $button['value'] = lang('go to');
- $button['caption'] = $this->build_help('go_to');
- $var[] = array('widget' => $button);
-
- $button['name'] = "copy";
- $button['value'] = lang('copy to');
- $button['caption'] = $this->build_help('copy_to');
- $var[] = array('widget' => $button);
-
- $button['name'] = "move";
- $button['value'] = lang('move to');
- $button['caption'] =$this->build_help('move_to');
- $var[] = array('widget' => $button);
+ case 'menu':
+ $var['option'][] = array
+ (
+ 'selected' => True,
+ 'caption' => lang('Menu -->')
+ );
+ $var['option'][] = array
+ (
+ 'value' => 'edit',
+ 'caption' => lang('Edit')
+ );
+ $var['option'][] = array
+ (
+ 'value' => 'rename',
+ 'caption' => lang('Rename')
+ );
+ $var['option'][] = array
+ (
+ 'value' => 'delete',
+ 'caption' => lang('Delete')
+ );
+ $var['option'][] = array
+ (
+ 'value' => 'edit_comments',
+ 'caption' => lang('Edit
comments')
+ );
+ $var['option'][] = array
+ (
+ 'disabled' => True,
+ 'caption' => '---------------'
+ );
+ $var['option'][] = array
+ (
+ 'value' => 'move',
+ 'caption' => lang('Move To:')
+ );
+ $var['option'][] = array
+ (
+ 'value' => 'copy',
+ 'caption' => lang('Copy To:')
+ );
+ $var['option'][] = array
+ (
+ 'disabled' => True,
+ 'caption' => '---------------'
+ );
+ $var['option'][] = array
+ (
+ 'value' => 'go',
+ 'caption' => lang('Go To:')
+ );
+ break;
+ case 'dir_menu':
+ $var['option'][] = array
+ (
+ //'selected' => True,
+ 'caption' => lang('Choose
Directory -->')
+ );
- ###
- # First we get the directories in their home directory
- ###
-
- $dirs[] = Array(
- 'directory' => $this->bofilemanager->fakebase,
- 'name' =>
$this->bofilemanager->userinfo['account_lid']
- );
- $ls_array = $this->bofilemanager->vfs->ls(array(
- 'string' => $this->bofilemanager->homedir,
- 'relatives' => Array(RELATIVE_NONE),
- 'nofiles' => True,
- 'mime_type' => 'Directory'));
- while(list($num,$dir) = each($ls_array))
- {
- $dirs[] = $dir;
- }
+ ###
+ # First we get the directories in their
home directory
+ ###
- ###
- # Then we get the directories in their membership's
home directories
- ###
+ $dirs[] = Array
+ (
+ 'directory' =>
$this->bofilemanager->fakebase,
+ 'name' =>
$this->bofilemanager->userinfo['account_lid']
+ );
- reset($this->bofilemanager->memberships);
- while(list($num,$group_array) =
each($this->bofilemanager->memberships))
- {
- ###
- # Don't list directories for groups that don't
have access
- ###
+ $ls_array =
$this->bofilemanager->vfs->ls(array(
+ 'string' =>
$this->bofilemanager->homedir,
+ 'relatives' => Array(RELATIVE_NONE),
+ 'nofiles' => True,
+ 'mime_type' => 'Directory'));
+ while(list($num,$dir) = each($ls_array))
+ {
+ $dirs[] = $dir;
+ }
-
if(!$this->bofilemanager->membership_applications[$group_array['account_name']][$this->bofilemanager->appname]['enabled'])
- {
- continue;
- }
+ ###
+ # Then we get the directories in their
membership's home directories
+ ###
- $dirs[] = Array(
- 'directory' =>
$this->bofilemanager->fakebase,
- 'name' => $group_array['account_name']
- );
+
reset($this->bofilemanager->memberships);
+ while(list($num,$group_array) =
each($this->bofilemanager->memberships))
+ {
+ ###
+ # Don't list directories for
groups that don't have access
+ ###
- $ls_array = $this->bofilemanager->vfs->ls(array(
- 'string' =>
$this->bofilemanager->fakebase.SEP.$group_array['account_name'],
- 'relatives' => Array(RELATIVE_NONE),
- 'nofiles' => True,
- 'mime_type' => 'Directory'
- ));
- while(list($num,$dir) = each($ls_array))
- {
- $dirs[] = $dir;
- }
- }
+
if(!$this->bofilemanager->membership_applications[$group_array['account_name']][$this->bofilemanager->appname]['enabled'])
+ {
+ continue;
+ }
- $dir_list = array();
- reset($dirs);
- while(list($num, $dir) = each($dirs))
- {
- if(!$dir['directory'])
- {
- continue;
- }
+ $dirs[] = Array(
+ 'directory' =>
$this->bofilemanager->fakebase,
+ 'name' =>
$group_array['account_name']
+ );
+
+ $ls_array =
$this->bofilemanager->vfs->ls(array(
+ 'string' =>
$this->bofilemanager->fakebase.SEP.$group_array['account_name'],
+ 'relatives' =>
Array(RELATIVE_NONE),
+ 'nofiles' => True,
+ 'mime_type' => 'Directory'
+ ));
+ while(list($num,$dir) =
each($ls_array))
+ {
+ $dirs[] = $dir;
+ }
+ }
+
+ $dir_list = array();
+ reset($dirs);
+ while(list($num, $dir) = each($dirs))
+ {
+ if(!$dir['directory'])
+ {
+ continue;
+ }
- ###
- # So we don't display //
- ###
+ ###
+ # So we don't display //
+ ###
- if($dir['directory'] != '/')
- {
- $dir['directory'] .= SEP;
- }
+ if($dir['directory'] != '/')
+ {
+ $dir['directory'] .=
SEP;
+ }
- $selected = '';
- if($num == 0)
- {
- $selected = ' selected';
- }
+ $selected = '';
+ if($num == 0)
+ {
+ $selected = True;
+ }
- ###
- # No point in displaying the current directory,
or a directory that doesn't exist
- ###
+ ###
+ # No point in displaying the
current directory, or a directory that doesn't exist
+ ###
- if((($dir['directory'].$dir['name']) !=
$this->bofilemanager->path) && $this->bofilemanager->vfs->file_exists(array(
- 'string' =>
$dir['directory'].$dir['name'],
- 'relatives' => Array(RELATIVE_NONE)
- )))
- {
- $dir_list[] =array('option'=>
array('value'=> urlencode($dir['directory'].$dir['name']),
+
if((($dir['directory'].$dir['name']) != $this->bofilemanager->path) &&
$this->bofilemanager->vfs->file_exists(array(
+ 'string' =>
$dir['directory'].$dir['name'],
+ 'relatives' =>
Array(RELATIVE_NONE)
+ )))
+ {
+ $var['option'][] =
array('value'=> urlencode($dir['directory'].$dir['name']),
'selected' => $selected,
'caption' =>
$dir['directory'].$dir['name']
- ));
- }
- }
-
- $var[] = array('widget' => array( 'type' => 'select',
-
'name'=> 'todir',
-
'options' => $dir_list,
-
'caption' => $this->build_help('directory_list')
- ));
-
- if($this->bofilemanager->path != '/' &&
$this->bofilemanager->path != $this->bofilemanager->fakebase)
- {
- $var[] = array('widget' =>
array('type'=>'submit',
+ );
+ }
+ }
+ break;
+ default:
+ if($this->bofilemanager->path != '/' &&
$this->bofilemanager->path != $this->bofilemanager->fakebase)
+ {
+ $var[] = array('widget' =>
array('type'=>'submit',
'name'=> 'download',
'value' => lang('download'),
'caption' => $this->build_help('download')
));
- }
+ }
- if($this->bofilemanager->settings['show_command_line'])
- {
-
- $var[] = array('widget' => array( 'type' =>
'text' ,
+
if($this->bofilemanager->settings['show_command_line'])
+ {
+ $var[] = array('widget' =>
array( 'type' => 'text' ,
'name'=> 'command_line',
'size' => '50',
'caption' => $this->build_help('command_line')
));
- $var[] = array('widget' => array( 'type' =>
'submit',
+ $var[] = array('widget' =>
array( 'type' => 'submit',
'name' => 'execute',
'value' => lang('execute'),
'caption' => $this->build_help('execute')
));
- $var[] = array('widget' => array( 'type' =>
'seperator' ));
- }
- break;
+ $var[] = array('widget' =>
array( 'type' => 'seperator' ));
+ }
+ break;
}
return $var;
}
@@ -810,11 +826,14 @@
'file_attributes' =>
$file_attributes,
'file'
=> $file_output
),
- 'form_action' =>
$GLOBALS['phpgw']->link('/index.php',array
-
(
-
'menuaction' =>
$this->bofilemanager->appname.'.ui'.$this->bofilemanager->appname.'.action',
-
'path' => urlencode($this->bofilemanager->path)
-
)),
+ 'form' => array('action' =>
$GLOBALS['phpgw']->link('/index.php',array(
+
'menuaction' =>
$this->bofilemanager->appname.'.ui'.$this->bofilemanager->appname.'.action',
+
'path' =>
urlencode($this->bofilemanager->path))),
+
'id' => 'form_files',
+
'name' => 'files',
+
'method' => 'POST',
+
'enctype' => 'multipart/form-data'
+ ),
'error' =>
(isset($this->bofilemanager->errors) &&
is_array(unserialize(base64_decode($this->bofilemanager->errors)))?$GLOBALS['phpgw']->common->error_list(unserialize(base64_decode($this->bofilemanager->errors)),'Results'):''),
'img_up' => array('widget' =>
array('type' => 'image',
'src' =>
$GLOBALS['phpgw']->common->image($this->bofilemanager->appname,'up'),
@@ -881,6 +900,7 @@
'src' =>
$GLOBALS['phpgw']->common->image($this->bofilemanager->appname,'folder_new'),
'title' => lang('create
folder'),
'name' =>
'params[newdir]',
+
'value' => 'newdir',
'caption' =>
$this->build_help('create_folder')
));
$data['lang_create_folder'] =
lang('create folder');
@@ -893,6 +913,7 @@
'src' =>
$GLOBALS['phpgw']->common->image($this->bofilemanager->appname,'filenew'),
'title' => lang('create
file'),
'name' =>
'params[newfile]',
+
'value' => 'newfile',
'caption' =>
$this->build_help('create_file')
));
$data['lang_create_file'] =
lang('create file');
@@ -940,9 +961,13 @@
//$data['settings'] =
$this->bofilemanager->settings;
//$data['display_settings'] =
$GLOBALS['phpgw_info']['theme'];
+ $js =
"document.getElementById('file_menu').selectedIndex>5?(document.getElementById('menu_todir').disabled=false):document.getElementById('form_files').submit()";
+ $js_dir =
"document.getElementById('form_files').submit()";
+
if(!count($edit))
{
- $data['buttons'] = array('button' =>
$this->display_buttons('bla'));
+ $data['menu'] = array('widget' =>
array('type' => 'select','name' => 'params[menu]', 'id' =>
'file_menu','onChange' => $js,'options' => $this->display_buttons('menu')));
+ $data['dir_menu'] = array('widget' =>
array('type' => 'select','name' => 'todir', 'id' => 'menu_todir','onChange' =>
$js_dir,'disabled' => True,'options' => $this->display_buttons('dir_menu')));
$data['uploads'] =
$this->display_uploads();
}
====================================================
Index: filemanager/inc/hook_preferences.inc.php
diff -u filemanager/inc/hook_preferences.inc.php:1.13
filemanager/inc/hook_preferences.inc.php:1.14
--- filemanager/inc/hook_preferences.inc.php:1.13 Sat Jan 22 23:48:25 2005
+++ filemanager/inc/hook_preferences.inc.php Mon Jan 24 00:26:34 2005
@@ -8,8 +8,8 @@
/* $Id$ */
{
- $file = array('Preferences' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=filemanager.uifilemanager.preferences'));
-
+ $file = array('Preferences' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=filemanager.uifilemanager.preferences'),
+ 'Grant Access' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname))
//Do not modify below this line
display_section($appname,$file);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] filemanager/inc class.uifilemanager.inc.php, 1.14 hook_preferences.inc.php, 1.14,
ceb <=
- Prev by Date:
[Phpgroupware-cvs] stocks/setup setup.inc.php,1.13
- Next by Date:
[Phpgroupware-cvs] filemanager/templates/default widgets.xsl, 1.2 preference_colspan.tpl, 1.5 preference_acl.tpl, 1.4 pref.tpl, 1.5 preference_acl_row.tpl, 1.4 index.xsl, 1.3 edit.xsl, 1.2
- Previous by thread:
[Phpgroupware-cvs] stocks/setup setup.inc.php,1.13
- Next by thread:
[Phpgroupware-cvs] filemanager/templates/default widgets.xsl, 1.2 preference_colspan.tpl, 1.5 preference_acl.tpl, 1.4 pref.tpl, 1.5 preference_acl_row.tpl, 1.4 index.xsl, 1.3 edit.xsl, 1.2
- Index(es):