Adding a scrollbar to path in file select dialog, if it gets too long.

This commit is contained in:
Ralf Becker 2009-05-03 20:45:34 +00:00
parent aef4125146
commit 24bbec6df1
4 changed files with 10 additions and 3 deletions

View File

@ -197,6 +197,8 @@ function select_toggle(file)
}
</script>
';
// scroll to end of path
$GLOBALS['egw']->js->set_onload("document.getElementById('exec[path][c". (count(explode('/',$content['path']))-1) ."]').scrollIntoView();");
//_debug_array($content);
//_debug_array($readonlys);
egw_session::appsession('select_path','filemanger',$content['path']);

View File

@ -2,7 +2,7 @@
/**
* eGroupWare - eTemplates for Application filemanager
* http://www.egroupware.org
* generated by soetemplate::dump4setup() 2009-04-30 10:08
* generated by soetemplate::dump4setup() 2009-05-03 22:43
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package filemanager
@ -56,3 +56,5 @@ $templ_data[] = array('name' => 'filemanager.index.rows','template' => '','lang'
$templ_data[] = array('name' => 'filemanager.select','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:1:{i:0;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:"h1";s:2:"40";s:2:"h2";s:2:"40";}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:4:"size";s:4:"home";s:4:"name";s:4:"home";s:5:"align";s:6:"center";s:5:"label";s:4:"Home";}}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:6:{i:0;a:3:{s:2:"c2";s:11:"selectFiles";s:2:"h3";s:35:",@mode=/(open-multiple|select-dir)/";s:2:"h4";s:15:",!@options-mime";}i:1;a:1:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:2:{s:4:"type";s:4:"html";s:4:"name";s:2:"js";}i:2;a:3:{s:4:"type";s:6:"button";s:4:"name";s:10:"button[up]";s:4:"size";s:4:"goup";}i:3;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";}i:4;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:4:{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: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:4:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:4:"span";s:11:",selectName";s:6:"needed";s:1:"1";}}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: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:5;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' => '','modified' => '1239794780',);
$templ_data[] = array('name' => 'filemanager.select','template' => '','lang' => '','group' => '0','version' => '1.7.002','data' => 'a:1:{i:0;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:"h1";s:2:"40";s:2:"h2";s:2:"40";}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:4:"size";s:4:"home";s:4:"name";s:4:"home";s:5:"align";s:6:"center";s:5:"label";s:4:"Home";}}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:6:{i:0;a:3:{s:2:"c2";s:11:"selectFiles";s:2:"h3";s:35:",@mode=/(open-multiple|select-dir)/";s:2:"h4";s:15:",!@options-mime";}i:1;a:1:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:2:{s:4:"type";s:4:"html";s:4:"name";s:2:"js";}i:2;a:3:{s:4:"type";s:6:"button";s:4:"name";s:10:"button[up]";s:4:"size";s:4:"goup";}i:3;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:4;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:4:{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: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:4:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:4:"span";s:11:",selectName";s:6:"needed";s:1:"1";}}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: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:5;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' => '','modified' => '1239794780',);

View File

@ -13,6 +13,7 @@
* Select file dialog
*/
.selectPath { font-weight: bold; }
.selectPathContainer { width: 480px; overflow: auto; }
.selectName input { width: 100%; }
.selectMime select { width: 100%; }
.selectIcon img { height: 16px; }

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- $Id$ -->
<overlay>
<template id="filemanager.select" template="" lang="" group="0" version="1.7.001">
<template id="filemanager.select" template="" lang="" group="0" version="1.7.002">
<grid width="600">
<columns>
<column width="32"/>
@ -31,7 +31,9 @@
<hbox>
<html id="js"/>
<button id="button[up]" image="goup"/>
<vfs id="path" onclick="path=document.getElementById(form::name('path')); path.value=$path; path.form.submit();" class="selectPath"/>
<box class="selectPathContainer">
<vfs id="path" onclick="path=document.getElementById(form::name('path')); path.value=$path; path.form.submit();" class="selectPath"/>
</box>
<textbox id="path" class="displayNone"/>
</hbox>
</row>