- Add etemplate nextmatch favorites to filemanager

- If user tries to enter '' as path, go home rather than throw an exception
This commit is contained in:
Nathan Gray 2013-12-02 20:13:17 +00:00
parent 7f176d54f1
commit 03cc1af52f
3 changed files with 11 additions and 1 deletions

View File

@ -33,6 +33,15 @@ class filemanager_hooks
*/
static function sidebox_menu($args)
{
// Magic etemplate2 favorites menu (from nextmatch widget)
display_sidebox(self::$appname,lang('Favorites'),array(
array(
'no_lang' => true,
'text'=> etemplate_widget_nextmatch::favorite_list(self::$appname,'filemanager.filemanager_ui.get_rows'),
'link'=>false,
'icon' => false
)
));
$location = is_array($args) ? $args['location'] : $args;
$rootpath = '/';
$basepath = '/home';

View File

@ -271,6 +271,7 @@ class filemanager_ui
'is_parent' => 'mime',
'is_parent_value'=> egw_vfs::DIR_MIME_TYPE,
'header_left' => 'filemanager.index.header_left',
'favorites' => true
);
$content['nm']['path'] = self::get_home_dir();
}

View File

@ -58,7 +58,7 @@
<hbox span="all">
<image label="Up" src="goup" onclick="app.filemanager.change_dir('..');"/>
<image label="Go to your home directory" src="gohome" onclick="app.filemanager.change_dir('~');"/>
<vfs-name label="Path" id="path" options="80" class="address"/>
<vfs-name label="Path" id="path" onchange="if(widget.getValue() == '') { app.filemanager.change_dir('~');} return false;" options="80" class="address"/>
<button label="Go to" id="button[go]" image="key_enter"/>
<image id="tarp" src="buttonseparator"/>
<buttononly statustext="Rename, change permissions or ownership" label="Edit settings" id="button[edit]" onclick="app.filemanager.editprefs();" options="edit"/>