diff --git a/filemanager/inc/class.filemanager_select.inc.php b/filemanager/inc/class.filemanager_select.inc.php index efd478822c..b447ea70fc 100644 --- a/filemanager/inc/class.filemanager_select.inc.php +++ b/filemanager/inc/class.filemanager_select.inc.php @@ -239,14 +239,16 @@ class filemanager_select $name = egw_vfs::basename($path); $is_dir = egw_vfs::is_dir($path); - if ($content['mime'] && !$is_dir && egw_vfs::mime_content_type($path) != $content['mime']) + $mime = egw_vfs::mime_content_type($path); + if ($content['mime'] && !$is_dir && $mime != $content['mime']) { continue; // does not match mime-filter --> ignore } $content['dir'][$n] = array( 'name' => $name, 'path' => $path, - 'onclick' => $is_dir ? "return select_goto('".addslashes($path)."');" : + 'mime' => $mime, + 'onclick' => $is_dir ? "return select_goto('".addslashes($path)."',widget);" : ($content['mode'] != 'open-multiple' ? "return select_show('".addslashes($name)."');" : "return select_toggle('".addslashes($name)."');"), ); @@ -260,11 +262,28 @@ class filemanager_select } $content['js'] = ' '; // scroll to end of path - $GLOBALS['egw']->js->set_onload("document.getElementById('exec[path][c". (count(explode('/',$content['path']))-1) ."]').scrollIntoView();"); + $GLOBALS['egw']->js->set_onload("var p = document.getElementById('exec[path][c". (count(explode('/',$content['path']))-1) ."]'); if (p) scrollIntoView();"); //_debug_array($readonlys); egw_session::appsession('select_path','filemanger',$content['path']); diff --git a/filemanager/setup/etemplates.inc.php b/filemanager/setup/etemplates.inc.php index 644a491d71..81cce0deff 100644 --- a/filemanager/setup/etemplates.inc.php +++ b/filemanager/setup/etemplates.inc.php @@ -2,7 +2,7 @@ /** * EGroupware - eTemplates for Application filemanager * http://www.egroupware.org - * generated by soetemplate::dump4setup() 2012-01-05 15:17 + * generated by soetemplate::dump4setup() 2012-07-02 16:54 * * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @package filemanager @@ -13,11 +13,11 @@ $templ_version=1; $templ_data[] = array('name' => 'filemanager.file','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:3:"tab";s:5:"label";s:54:"General|Permissions|Extended ACL|Preview|Custom fields";s:4:"name";s:38:"tabs=general|perms|eacl|preview|custom";s:4:"span";s:3:"all";}}i:3;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";}i:2;a:3:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[apply]";s:5:"label";s:5:"Apply";}i:3;a:4:{s:4:"type";s:10:"buttononly";s:5:"label";s:6:"Cancel";s:4:"name";s:14:"button[cancel]";s:7:"onclick";s:15:"window.close();";}}i:2;a:6:{s:4:"type";s:10:"buttononly";s:5:"label";s:9:"Superuser";s:5:"align";s:5:"right";s:4:"help";s:48:"Enter setup user and password to get root rights";s:7:"onclick";s:121:"set_style_by_class(\'fieldset\',\'superuser\',\'display\',\'inline\'); document.getElementById(form::name(\'sudo[user]\')).focus();";s:4:"name";s:4:"sudo";}}}i:4;a:1:{s:1:"A";a:5:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:29:"Enter setup user and password";i:1;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"User";s:4:"size";s:13:",,,sudo[user]";}s:1:"B";a:2:{s:4:"type";s:4:"text";s:4:"name";s:10:"sudo[user]";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:8:"Password";s:4:"size";s:15:",,,sudo[passwd]";}s:1:"B";a:2:{s:4:"type";s:6:"passwd";s:4:"name";s:12:"sudo[passwd]";}}i:3;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Submit";s:4:"name";s:13:"button[setup]";}}}s:7:"options";a:0:{}s:4:"rows";i:3;s:4:"cols";i:2;}s:4:"span";s:10:",superuser";}}}s:4:"rows";i:4;s:4:"cols";i:1;}}','size' => '','style' => '.eaclAccount select,.eaclRights select { width: 160px; } -.superuser { - position: absolute; - top: 130px; - left: 120px; - width: 200px; +.superuser { + position: absolute; + top: 130px; + left: 120px; + width: 200px; background-color: white; z-index: 1; display: none; @@ -43,5 +43,5 @@ $templ_data[] = array('name' => 'filemanager.search','template' => '','lang' => $templ_data[] = array('name' => 'filemanager.search.rows','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";s:1:"A";s:2:"20";}i:1;a:12:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Type";s:4:"name";s:13:"vfs_mime_type";}s:1:"B";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:2:"Id";s:4:"name";s:11:"vfs_file_id";}s:1:"C";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"File";s:4:"name";s:7:"fulldir";}s:1:"D";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:9:"Directory";s:4:"name";s:13:"vfs_directory";}s:1:"E";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"name";s:4:"name";s:8:"vfs_name";}s:1:"F";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:9:"mime type";s:4:"name";s:9:"mime_type";}s:1:"G";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Size";s:4:"name";s:8:"vfs_size";}s:1:"H";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"comment";s:4:"name";s:11:"vfs_comment";}s:1:"I";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"created";s:4:"name";s:11:"vfs_created";}s:1:"J";a:3:{s:4:"type";s:23:"nextmatch-accountfilter";s:4:"size";s:10:"Created by";s:4:"name";s:16:"vfs_createdby_id";}s:1:"K";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"modified";s:4:"name";s:12:"vfs_modified";}s:1:"L";a:3:{s:4:"type";s:23:"nextmatch-accountfilter";s:4:"size";s:11:"Modified by";s:4:"name";s:17:"vfs_modifiedby_id";}}i:2;a:12:{s:1:"A";a:4:{s:4:"type";s:5:"image";s:5:"label";s:24:"$row_cont[vfs_mime_type]";s:4:"name";s:12:"${row}[icon]";s:5:"align";s:6:"center";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[vfs_file_id]";s:7:"no_lang";s:1:"1";}s:1:"C";a:4:{s:4:"type";s:5:"label";s:4:"name";s:12:"${row}[file]";s:7:"no_lang";s:1:"1";s:4:"size";s:21:",$row_cont[file_link]";}s:1:"D";a:4:{s:4:"type";s:5:"label";s:4:"name";s:21:"${row}[vfs_directory]";s:7:"no_lang";s:1:"1";s:4:"size";s:20:",$row_cont[dir_link]";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[vfs_name]";s:7:"no_lang";s:1:"1";s:4:"size";s:21:",$row_cont[file_link]";}s:1:"F";a:2:{s:4:"type";s:5:"label";s:4:"name";s:21:"${row}[vfs_mime_type]";}s:1:"G";a:3:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[vfs_size]";s:5:"align";s:5:"right";}s:1:"H";a:3:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[vfs_comment]";s:7:"no_lang";s:1:"1";}s:1:"I";a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:19:"${row}[vfs_created]";s:4:"size";s:11:"Y-m-d H:i:s";s:8:"readonly";s:1:"1";}s:1:"J";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:24:"${row}[vfs_createdby_id]";s:8:"readonly";s:1:"1";}s:1:"K";a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:20:"${row}[vfs_modified]";s:4:"size";s:11:"Y-m-d H:i:s";s:8:"readonly";s:1:"1";}s:1:"L";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:25:"${row}[vfs_modifiedby_id]";s:8:"readonly";s:1:"1";}}}s:4:"rows";i:2;s:4:"cols";i:12;s:4:"size";s:9:"100%,auto";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:4:"auto";}}}','size' => '100%,auto','style' => '','modified' => '1173104345',); -$templ_data[] = array('name' => 'filemanager.select','template' => '','lang' => '','group' => '0','version' => '1.7.004','data' => 'a:2:{i:0;a:4:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";s:4:"span";s:6:",error";s:5:"align";s:6:"center";}i:1;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:2:{s:2:"c1";s:4:",top";s:1:"A";s:2:"32";}i:1;a:2:{s:1:"A";a:7:{s:4:"type";s:4:"grid";s:5:"align";s:6:"center";s:4:"data";a:3:{i:0;a:2:{s:2:"h2";s:2:"40";s:2:"h1";s:4:",!@0";}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:4:"size";s:9:"favorites";s:5:"label";s:9:"Favorites";s:5:"align";s:6:"center";s:4:"name";s:9:"favorites";}}i:2;a:1:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:4:"size";s:16:"$row_cont/navbar";s:5:"label";s:9:"$row_cont";s:5:"align";s:6:"center";s:4:"name";s:6:"${row}";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"name";s:4:"apps";s:7:"options";a:0:{}}s:1:"B";a:6:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:4:{s:2:"c2";s:11:"selectFiles";s:2:"h3";s:35:",@mode=/(open-multiple|select-dir)/";s:2:"h4";s:15:",!@options-mime";s:2:"h5";s:11:",@no_upload";}i:1;a:1:{s:1:"A";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"5";i:1;a:2:{s:4:"type";s:4:"html";s:4:"name";s:2:"js";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:10:"button[up]";s:4:"size";s:4:"goup";s:5:"label";s:2:"Up";}i:3;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[home]";s:4:"size";s:6:"gohome";s:5:"label";s:25:"Go to your home directory";}i:4;a:4:{s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:4:{s:4:"type";s:3:"vfs";s:4:"name";s:4:"path";s:7:"onclick";s:87:"path=document.getElementById(form::name(\'path\')); path.value=$path; path.form.submit();";s:4:"span";s:11:",selectPath";}s:4:"span";s:20:",selectPathContainer";}i:5;a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"path";s:4:"span";s:12:",displayNone";}}}i:2;a:1:{s:1:"A";a:7:{s:4:"type";s:4:"grid";s:4:"size";s:17:"100%,400,,,,,auto";s:4:"name";s:3:"dir";s:4:"data";a:2:{i:0;a:3:{s:2:"c1";s:3:"row";s:1:"A";s:2:"20";s:1:"C";s:23:"1%,!@mode=open-multiple";}i:1;a:3:{s:1:"A";a:5:{s:4:"type";s:8:"vfs-mime";s:4:"name";s:12:"${row}[path]";s:4:"span";s:11:",selectIcon";s:5:"align";s:6:"center";s:4:"size";s:2:"16";}s:1:"B";a:3:{s:4:"type";s:3:"vfs";s:4:"name";s:4:"$row";s:7:"onclick";s:18:"$row_cont[onclick]";}s:1:"C";a:4:{s:4:"type";s:8:"checkbox";s:4:"size";s:17:""$row_cont[name]"";s:4:"name";s:10:"selected[]";s:5:"align";s:5:"right";}}}s:4:"rows";i:1;s:4:"cols";i:3;s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"400";i:6;s:4:"auto";}}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:4:"span";s:11:",selectName";}}i:4;a:1:{s:1:"A";a:5:{s:4:"type";s:6:"select";s:4:"size";s:9:"All files";s:4:"name";s:4:"mime";s:4:"span";s:11:",selectMime";s:8:"onchange";i:1;}}i:5;a:1:{s:1:"A";a:6:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"2";s:5:"label";s:11:"File upload";s:4:"name";s:15:"upload_groupbox";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:27:"Choose a file for uploading";}i:2;a:2:{s:4:"type";s:4:"file";s:4:"name";s:11:"file_upload";}}}i:6;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"@label";s:4:"name";s:10:"button[ok]";}i:2;a:4:{s:4:"type";s:10:"buttononly";s:4:"name";s:14:"button[cancel]";s:5:"label";s:6:"Cancel";s:7:"onclick";s:15:"window.close();";}s:5:"align";s:5:"right";}}}s:4:"rows";i:6;s:4:"cols";i:1;s:7:"options";a:1:{i:0;s:4:"100%";}s:4:"size";s:4:"100%";}}}s:4:"rows";i:1;s:4:"cols";i:2;s:4:"size";s:3:"600";s:7:"options";a:1:{i:0;s:3:"600";}}}','size' => '600','style' => '.error{color:red; font-style:italic;}','modified' => '1293805622',); +$templ_data[] = array('name' => 'filemanager.select','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:2:{i:0;a:4:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";s:4:"span";s:6:",error";s:5:"align";s:6:"center";}i:1;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:2:{s:2:"c1";s:4:",top";s:1:"A";s:2:"32";}i:1;a:2:{s:1:"A";a:7:{s:4:"type";s:4:"grid";s:5:"align";s:6:"center";s:4:"data";a:3:{i:0;a:2:{s:2:"h2";s:2:"40";s:2:"h1";s:4:",!@0";}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:4:"size";s:9:"favorites";s:5:"label";s:9:"Favorites";s:5:"align";s:6:"center";s:4:"name";s:9:"favorites";}}i:2;a:1:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:4:"size";s:16:"$row_cont/navbar";s:5:"label";s:9:"$row_cont";s:5:"align";s:6:"center";s:4:"name";s:6:"${row}";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"name";s:4:"apps";s:7:"options";a:0:{}}s:1:"B";a:6:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:4:{s:2:"c2";s:11:"selectFiles";s:2:"h3";s:35:",@mode=/(open-multiple|select-dir)/";s:2:"h4";s:15:",!@options-mime";s:2:"h5";s:11:",@no_upload";}i:1;a:1:{s:1:"A";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"5";i:1;a:2:{s:4:"type";s:4:"html";s:4:"name";s:2:"js";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:10:"button[up]";s:4:"size";s:4:"goup";s:5:"label";s:2:"Up";}i:3;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[home]";s:4:"size";s:6:"gohome";s:5:"label";s:25:"Go to your home directory";}i:4;a:4:{s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:4:{s:4:"type";s:3:"vfs";s:4:"name";s:4:"path";s:7:"onclick";s:87:"path=document.getElementById(form::name(\'path\')); path.value=$path; path.form.submit();";s:4:"span";s:11:",selectPath";}s:4:"span";s:20:",selectPathContainer";}i:5;a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"path";s:4:"span";s:12:",displayNone";}}}i:2;a:1:{s:1:"A";a:7:{s:4:"type";s:4:"grid";s:4:"size";s:14:"100%,,,,,,auto";s:4:"name";s:3:"dir";s:4:"data";a:2:{i:0;a:3:{s:2:"c1";s:3:"row";s:1:"A";s:2:"20";s:1:"C";s:23:"1%,!@mode=open-multiple";}i:1;a:3:{s:1:"A";a:5:{s:4:"type";s:8:"vfs-mime";s:4:"name";s:4:"$row";s:4:"span";s:11:",selectIcon";s:5:"align";s:6:"center";s:4:"size";s:2:"16";}s:1:"B";a:3:{s:4:"type";s:3:"vfs";s:4:"name";s:4:"$row";s:7:"onclick";s:18:"$row_cont[onclick]";}s:1:"C";a:4:{s:4:"type";s:8:"checkbox";s:4:"size";s:17:""$row_cont[name]"";s:4:"name";s:10:"selected[]";s:5:"align";s:5:"right";}}}s:4:"rows";i:1;s:4:"cols";i:3;s:7:"options";a:2:{i:0;s:4:"100%";i:6;s:4:"auto";}}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:4:"span";s:11:",selectName";}}i:4;a:1:{s:1:"A";a:5:{s:4:"type";s:6:"select";s:4:"size";s:9:"All files";s:4:"name";s:4:"mime";s:4:"span";s:11:",selectMime";s:8:"onchange";i:1;}}i:5;a:1:{s:1:"A";a:6:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"2";s:5:"label";s:11:"File upload";s:4:"name";s:15:"upload_groupbox";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:27:"Choose a file for uploading";}i:2;a:2:{s:4:"type";s:4:"file";s:4:"name";s:11:"file_upload";}}}i:6;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"@label";s:4:"name";s:10:"button[ok]";}i:2;a:4:{s:4:"type";s:10:"buttononly";s:4:"name";s:14:"button[cancel]";s:5:"label";s:6:"Cancel";s:7:"onclick";s:15:"window.close();";}s:5:"align";s:5:"right";}}}s:4:"rows";i:6;s:4:"cols";i:1;s:7:"options";a:1:{i:0;s:4:"100%";}s:4:"size";s:4:"100%";}}}s:4:"rows";i:1;s:4:"cols";i:2;s:4:"size";s:3:"600";s:7:"options";a:1:{i:0;s:3:"600";}}}','size' => '600','style' => '.error{color:red; font-style:italic;}','modified' => '1341261799',); diff --git a/filemanager/templates/default/app.css b/filemanager/templates/default/app.css index 1680d61f75..8b317eb654 100644 --- a/filemanager/templates/default/app.css +++ b/filemanager/templates/default/app.css @@ -20,5 +20,6 @@ .selectName input { width: 100%; } .selectMime select { width: 100%; } /*.selectIcon img { height: 16px; }*/ -.displayNone input { display: none; } +.displayNone input, input.displayNone { display: none; } .selectFiles td div { border-style: groove; } +.selectFiles div { max-height: 400px; overflow:auto;} diff --git a/filemanager/templates/default/select.xet b/filemanager/templates/default/select.xet index dafd9bb472..18a7f93cbe 100644 --- a/filemanager/templates/default/select.xet +++ b/filemanager/templates/default/select.xet @@ -1,8 +1,8 @@ -