mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
some more ajax actions for filemanager
This commit is contained in:
parent
9afe55bfae
commit
81a918c269
@ -119,7 +119,7 @@ class filemanager_ui
|
||||
'icon' => '',
|
||||
'group' => $group=1,
|
||||
'allowOnMultiple' => false,
|
||||
'onExecute' => 'javaScript:nm_activate_link',
|
||||
'onExecute' => 'javaScript:app.filemanager.open',
|
||||
'default' => true
|
||||
),
|
||||
'saveas' => array(
|
||||
@ -249,6 +249,8 @@ class filemanager_ui
|
||||
);
|
||||
$content['nm']['path'] = self::get_home_dir();
|
||||
}
|
||||
$content['nm']['home_dir'] = self::get_home_dir();
|
||||
|
||||
if (isset($_GET['msg'])) $msg = $_GET['msg'];
|
||||
|
||||
// switch to projectmanager folders
|
||||
|
@ -12,17 +12,75 @@
|
||||
app.filemanager = AppJS.extend(
|
||||
{
|
||||
appname: 'filemanager',
|
||||
/**
|
||||
* et2 widget container
|
||||
*/
|
||||
et2: null,
|
||||
/**
|
||||
* path widget
|
||||
*/
|
||||
path_widget: null,
|
||||
/**
|
||||
* Array of pathes from files in clipboard
|
||||
*/
|
||||
clipboard_files: [],
|
||||
/**
|
||||
* Are files cut into clipboard - need to be deleted at source on paste
|
||||
*/
|
||||
clipboard_is_cut: false,
|
||||
/**
|
||||
* Regexp to convert id to a path
|
||||
*/
|
||||
remove_prefix: /^filemanager::/,
|
||||
/**
|
||||
* Key for storing clipboard in browser localstorage
|
||||
*/
|
||||
clipboard_localstore_key: 'filemanager.clipboard',
|
||||
|
||||
/**
|
||||
* Initialize javascript for this application
|
||||
* Constructor
|
||||
*/
|
||||
init: function()
|
||||
{
|
||||
this._super.apply(this,arguments);
|
||||
// call parent
|
||||
this._super.apply(this, arguments);
|
||||
|
||||
//window.register_app_refresh("mail", this.app_refresh);
|
||||
},
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
destroy: function()
|
||||
{
|
||||
delete this.et2;
|
||||
// call parent
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* This function is called when the etemplate2 object is loaded
|
||||
* and ready. If you must store a reference to the et2 object,
|
||||
* make sure to clean it up in destroy().
|
||||
*
|
||||
* @param et2 etemplate2 Newly ready object
|
||||
*/
|
||||
et2_ready: function(et2)
|
||||
{
|
||||
// call parent
|
||||
this._super.apply(this, arguments);
|
||||
|
||||
this.et2 = et2.widgetContainer;
|
||||
this.path_widget = this.et2.getWidgetById('path');
|
||||
|
||||
// get clipboard from browser localstore and update button tooltips
|
||||
if (typeof window.localStorage != 'undefined' && typeof window.localStorage[this.clipboard_localstore_key] != 'undefined')
|
||||
{
|
||||
this.clipboard_files = JSON.parse(window.localStorage[this.clipboard_localstore_key]);
|
||||
}
|
||||
this.clipboard_tooltips();
|
||||
},
|
||||
|
||||
/**
|
||||
* Refresh given application _targetapp display of entry _app _id, incl. outputting _msg
|
||||
*
|
||||
@ -37,14 +95,17 @@ app.filemanager = AppJS.extend(
|
||||
{
|
||||
$j(document.getElementById('nm[msg]')).text(_msg);
|
||||
|
||||
if (_app == this.app)
|
||||
if (_app == this.appname)
|
||||
{
|
||||
var et2 = etemplate2.getByApplication(this.app)[0];
|
||||
et2.widgetContainer.getWidgetById('nm').applyFilters();
|
||||
this.et2.getWidgetById('nm').applyFilters();
|
||||
}
|
||||
},*/
|
||||
|
||||
remove_prefix: /^filemanager::/,
|
||||
/**
|
||||
* Open compose with already attached files
|
||||
*
|
||||
* @param attachments
|
||||
*/
|
||||
open_mail: function(attachments)
|
||||
{
|
||||
if (typeof attachments == 'undefined') attachments = clipboard_files;
|
||||
@ -57,6 +118,12 @@ app.filemanager = AppJS.extend(
|
||||
egw.open('', 'felamimail', 'add', params);
|
||||
},
|
||||
|
||||
/**
|
||||
* Mail files action: open compose with already attached files
|
||||
*
|
||||
* @param _action
|
||||
* @param _elems
|
||||
*/
|
||||
mail: function(_action, _elems)
|
||||
{
|
||||
var ids = [];
|
||||
@ -67,8 +134,12 @@ app.filemanager = AppJS.extend(
|
||||
this.open_mail(ids);
|
||||
},
|
||||
|
||||
clipboard_files: [],
|
||||
|
||||
/**
|
||||
* Check if file would overwrite a file on server
|
||||
*
|
||||
* @param upload
|
||||
* @param path_id
|
||||
*/
|
||||
check_files: function(upload, path_id)
|
||||
{
|
||||
var files = [];
|
||||
@ -88,31 +159,120 @@ app.filemanager = AppJS.extend(
|
||||
xajax_doXMLHTTP("filemanager_ui::ajax_check_upload_target",upload.id, files, path.value);
|
||||
},
|
||||
|
||||
clipboard_tooltip: function(link)
|
||||
/**
|
||||
* Update clickboard tooltips in
|
||||
*/
|
||||
clipboard_tooltips: function()
|
||||
{
|
||||
xajax_doXMLHTTP("filemanager_ui::ajax_clipboard_tooltip", link.id);
|
||||
|
||||
window.setTimeout(UnTip, 3000);
|
||||
var paste_buttons = ['button[paste]', 'button[linkpaste]', 'button[mailpaste]'];
|
||||
for(var i=0; i < paste_buttons.length; ++i)
|
||||
{
|
||||
var button = this.et2.getWidgetById(paste_buttons[i]);
|
||||
button.set_statustext(this.clipboard_files.join(",\n"));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Clip files into clipboard
|
||||
*
|
||||
* @param _action
|
||||
* @param _elems
|
||||
*/
|
||||
clipboard: function(_action, _elems)
|
||||
{
|
||||
if (_action.id != "cut") clipboard_files = [];
|
||||
this.clipboard_is_cut = _action.id == "cut";
|
||||
if (_action.id != "add") this.clipboard_files = [];
|
||||
|
||||
var ids = [];
|
||||
for (var i = 0; i < _elems.length; i++)
|
||||
{
|
||||
clipboard_files.push(_elems[i].id);
|
||||
ids.push(_elems[i].id);
|
||||
var id = _elems[i].id.replace(this.remove_prefix, '');
|
||||
this.clipboard_files.push(id);
|
||||
}
|
||||
this.clipboard_tooltips();
|
||||
|
||||
// update localstore with files
|
||||
if (typeof window.localStorage != 'undefined')
|
||||
{
|
||||
window.localStorage[this.clipboard_localstore_key] = JSON.stringify(this.clipboard_files);
|
||||
}
|
||||
xajax_doXMLHTTP("filemanager_ui::ajax_clipboard", _action.id, ids);
|
||||
},
|
||||
|
||||
/**
|
||||
* Paste files into current directory or mail them
|
||||
*
|
||||
* @param _type 'paste', 'linkpaste', 'mailpaste'
|
||||
*/
|
||||
paste: function(_type)
|
||||
{
|
||||
switch(_type)
|
||||
{
|
||||
case 'mailpaste':
|
||||
this.open_mail(this.clipboard_files);
|
||||
break;
|
||||
|
||||
case 'linkpaste':
|
||||
case 'paste':
|
||||
alert('Not yet implemented!');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Force download of a file by appending '?download' to it's download url
|
||||
*
|
||||
* @param _action
|
||||
* @param _senders
|
||||
*/
|
||||
force_download: function(_action, _senders)
|
||||
{
|
||||
var data = egw.dataGetUIDdata(_senders[0].id);
|
||||
var url = data ? data.data.download_url : '/webdav.php'+_senders[0].id.replace(this.remove_prefix,'');
|
||||
if (url[0] == '/') url = egw.link(url);
|
||||
window.location = url+"?download";
|
||||
},
|
||||
|
||||
/**
|
||||
* Change directory
|
||||
*
|
||||
* @param _dir directory to change to incl. '..' for one up
|
||||
*/
|
||||
change_dir: function(_dir)
|
||||
{
|
||||
switch (_dir)
|
||||
{
|
||||
case '..':
|
||||
_dir = this.path_widget.getValue();
|
||||
if (_dir != '/')
|
||||
{
|
||||
var parts = _dir.split('/');
|
||||
parts.pop();
|
||||
_dir = parts.length > 1 ? parts.join('/') : '/';
|
||||
}
|
||||
break;
|
||||
case '~':
|
||||
_dir = this.et2.getWidgetById('nm').options.settings.home_dir;
|
||||
break;
|
||||
}
|
||||
this.path_widget.set_value(_dir);
|
||||
this.path_widget.change();
|
||||
},
|
||||
|
||||
/**
|
||||
* Open/active an item
|
||||
*
|
||||
* @param _action
|
||||
* @param _senders
|
||||
*/
|
||||
open: function(_action, _senders)
|
||||
{
|
||||
var data = egw.dataGetUIDdata(_senders[0].id);
|
||||
var path = _senders[0].id.replace(this.remove_prefix, '');
|
||||
if (data.data.mime == 'httpd/unix-directory')
|
||||
{
|
||||
this.change_dir(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
egw.open(path, 'file');
|
||||
}
|
||||
}
|
||||
});
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* EGroupware - eTemplates for Application filemanager
|
||||
* http://www.egroupware.org
|
||||
* generated by soetemplate::dump4setup() 2013-04-10 06:11
|
||||
* generated by soetemplate::dump4setup() 2013-04-10 19:11
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package filemanager
|
||||
@ -33,11 +33,11 @@ $templ_data[] = array('name' => 'filemanager.file.perms','template' => '','lang'
|
||||
|
||||
$templ_data[] = array('name' => 'filemanager.file.preview','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:4:{i:0;a:5:{s:2:"c1";s:4:",top";s:2:"h1";s:16:",!@mime=/^image/";s:2:"h3";s:22:",@mime=/^(image|text)/";s:2:"h2";s:18:"280,!@text_content";s:2:"c2";s:4:",top";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:4:"name";s:4:"link";s:4:"span";s:13:",previewImage";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"textarea";s:4:"name";s:12:"text_content";s:4:"span";s:12:",previewText";s:8:"readonly";s:1:"1";}}i:3;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:20:"No preview available";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:4:"size";s:18:"450,300,,,10,,auto";s:7:"options";a:4:{i:0;s:3:"450";i:1;s:3:"300";i:6;s:4:"auto";i:4;s:2:"10";}}}','size' => '450,300,,,10,,auto','style' => '','modified' => '1204567479',);
|
||||
|
||||
$templ_data[] = array('name' => 'filemanager.index','template' => '','lang' => '','group' => '0','version' => '1.9.003','data' => 'a:4:{i:0;a:3:{s:4:"name";s:7:"nm[msg]";s:4:"type";s:5:"label";s:4:"span";s:10:",redItalic";}i:1;a:3:{s:4:"name";s:29:"filemanager.index.header_left";s:4:"type";s:8:"template";s:8:"disabled";s:1:"1";}i:2;a:3:{s:4:"name";s:2:"nm";s:4:"size";s:22:"filemanager.index.rows";s:4:"type";s:9:"nextmatch";}i:3;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:8:"onchange";s:18:"check_files(this);";s:4:"name";s:8:"upload[]";s:4:"type";s:4:"file";s:4:"help";s:42:"Select file to upload in current directory";}i:2;a:3:{s:5:"label";s:6:"Upload";s:4:"name";s:14:"button[upload]";s:4:"type";s:6:"button";}}}','size' => '','style' => 'input[type=\'file\'] {
|
||||
$templ_data[] = array('name' => 'filemanager.index','template' => '','lang' => '','group' => '0','version' => '1.9.003','data' => 'a:3:{i:0;a:3:{s:4:"name";s:7:"nm[msg]";s:4:"type";s:5:"label";s:4:"span";s:10:",redItalic";}i:1;a:3:{s:4:"name";s:2:"nm";s:4:"type";s:9:"nextmatch";s:4:"size";s:53:"filemanager.index.rows,,filemanager.index.header_left";}i:2;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:8:"onchange";s:18:"check_files(this);";s:4:"name";s:8:"upload[]";s:4:"type";s:4:"file";s:4:"help";s:42:"Select file to upload in current directory";}i:2;a:3:{s:5:"label";s:6:"Upload";s:4:"name";s:14:"button[upload]";s:4:"type";s:6:"button";}}}','size' => '','style' => 'input[type=\'file\'] {
|
||||
width: 50ex
|
||||
}','modified' => '1365584177',);
|
||||
}','modified' => '1365608331',);
|
||||
|
||||
$templ_data[] = array('name' => 'filemanager.index.header_left','template' => '','lang' => '','group' => '0','version' => '1.9.002','data' => 'a:1:{i:0;a:15:{s:4:"span";s:3:"all";s:4:"type";s:4:"hbox";s:4:"size";s:2:"12";i:1;a:4:{s:5:"label";s:2:"Up";s:4:"href";s:40:"filemanager.filemanager_ui.index&path=..";s:4:"type";s:5:"image";s:4:"name";s:4:"goup";}i:2;a:4:{s:5:"label";s:25:"Go to your home directory";s:4:"href";s:39:"filemanager.filemanager_ui.index&path=~";s:4:"type";s:5:"image";s:4:"name";s:6:"gohome";}i:3;a:6:{s:5:"label";s:4:"Path";s:4:"name";s:4:"path";s:4:"size";s:2:"80";s:4:"type";s:8:"vfs-name";s:4:"span";s:8:",address";s:8:"onchange";i:1;}i:4;a:4:{s:5:"label";s:5:"Go to";s:4:"name";s:10:"button[go]";s:4:"type";s:6:"button";s:4:"size";s:9:"key_enter";}i:5;a:2:{s:4:"type";s:5:"image";s:4:"name";s:15:"buttonseparator";}i:6;a:6:{s:5:"label";s:13:"Edit settings";s:7:"onclick";s:194:"window.open(egw::link(\'/index.php\',\'menuaction=filemanager.filemanager_ui.file&path={$cont[nm][path]}\'),\'fileprefs\',\'dependent=yes,width=495,height=425,scrollbars=yes,status=yes\'); return false;";s:4:"name";s:23:"edit[{$cont[nm][path]}]";s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:4:"help";s:39:"Rename, change permissions or ownership";}i:7;a:5:{s:5:"label";s:16:"Create directory";s:7:"onclick";s:128:"var dir = prompt(egw::lang(\'New directory\')); if (!dir) return false; document.getElementById(form::name(\'nm[path]\')).value=dir;";s:4:"name";s:17:"button[createdir]";s:4:"type";s:6:"button";s:4:"size";s:35:"button_createdir,createdir_disabled";}i:8;a:5:{s:5:"label";s:13:"Create a link";s:7:"onclick";s:129:"var link = prompt(egw::lang(\'Link target\')); if (!link) return false; document.getElementById(form::name(\'nm[path]\')).value=link;";s:4:"name";s:15:"button[symlink]";s:4:"type";s:6:"button";s:4:"size";s:18:"link,link_disabled";}i:9;a:5:{s:7:"onclick";s:34:"return clipboard_files.length > 0;";s:4:"name";s:13:"button[paste]";s:4:"type";s:6:"button";s:4:"size";s:28:"editpaste,editpaste_disabled";s:4:"help";s:29:"call:clipboard_tooltip(this);";}i:10;a:5:{s:7:"onclick";s:34:"return clipboard_files.length > 0;";s:4:"name";s:17:"button[linkpaste]";s:4:"type";s:6:"button";s:4:"size";s:28:"linkpaste,linkpaste_disabled";s:4:"help";s:29:"call:clipboard_tooltip(this);";}i:11;a:5:{s:7:"onclick";s:70:"if (clipboard_files.length) app.filemanager.open_mail(); return false;";s:4:"name";s:17:"button[mailpaste]";s:4:"type";s:6:"button";s:4:"size";s:28:"mailpaste,mailpaste_disabled";s:4:"help";s:29:"call:clipboard_tooltip(this);";}i:12;a:4:{s:5:"label";s:11:"File a file";s:7:"onclick";s:171:"window.open(egw::link(\'/index.php\',\'menuaction=stylite.stylite_filemanager.upload\'),\'_blank\',\'dependent=yes,width=550,height=350,scrollbars=yes,status=yes\'); return false;";s:4:"type";s:6:"button";s:4:"size";s:6:"upload";}}}','size' => '','style' => '','modified' => '1365586534',);
|
||||
$templ_data[] = array('name' => 'filemanager.index.header_left','template' => '','lang' => '','group' => '0','version' => '1.9.002','data' => 'a:1:{i:0;a:15:{s:4:"span";s:3:"all";s:4:"type";s:4:"hbox";s:4:"size";s:2:"12";i:1;a:4:{s:5:"label";s:2:"Up";s:7:"onclick";s:33:"app.filemanager.change_dir(\'..\');";s:4:"type";s:5:"image";s:4:"name";s:4:"goup";}i:2;a:4:{s:5:"label";s:25:"Go to your home directory";s:7:"onclick";s:32:"app.filemanager.change_dir(\'~\');";s:4:"type";s:5:"image";s:4:"name";s:6:"gohome";}i:3;a:6:{s:5:"label";s:4:"Path";s:8:"onchange";s:12:"return true;";s:4:"name";s:4:"path";s:4:"size";s:2:"80";s:4:"type";s:8:"vfs-name";s:4:"span";s:8:",address";}i:4;a:4:{s:5:"label";s:5:"Go to";s:4:"name";s:10:"button[go]";s:4:"type";s:6:"button";s:4:"size";s:9:"key_enter";}i:5;a:2:{s:4:"type";s:5:"image";s:4:"name";s:15:"buttonseparator";}i:6;a:6:{s:5:"label";s:13:"Edit settings";s:7:"onclick";s:194:"window.open(egw::link(\'/index.php\',\'menuaction=filemanager.filemanager_ui.file&path={$cont[nm][path]}\'),\'fileprefs\',\'dependent=yes,width=495,height=425,scrollbars=yes,status=yes\'); return false;";s:4:"name";s:23:"edit[{$cont[nm][path]}]";s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:4:"help";s:39:"Rename, change permissions or ownership";}i:7;a:5:{s:5:"label";s:16:"Create directory";s:7:"onclick";s:128:"var dir = prompt(egw::lang(\'New directory\')); if (!dir) return false; document.getElementById(form::name(\'nm[path]\')).value=dir;";s:4:"name";s:17:"button[createdir]";s:4:"type";s:6:"button";s:4:"size";s:35:"button_createdir,createdir_disabled";}i:8;a:5:{s:5:"label";s:13:"Create a link";s:7:"onclick";s:129:"var link = prompt(egw::lang(\'Link target\')); if (!link) return false; document.getElementById(form::name(\'nm[path]\')).value=link;";s:4:"name";s:15:"button[symlink]";s:4:"type";s:6:"button";s:4:"size";s:18:"link,link_disabled";}i:9;a:4:{s:7:"onclick";s:31:"app.filemanager.paste(\'paste\');";s:4:"name";s:13:"button[paste]";s:4:"size";s:28:"editpaste,editpaste_disabled";s:4:"type";s:10:"buttononly";}i:10;a:4:{s:7:"onclick";s:35:"app.filemanager.paste(\'linkpaste\');";s:4:"name";s:17:"button[linkpaste]";s:4:"size";s:28:"linkpaste,linkpaste_disabled";s:4:"type";s:10:"buttononly";}i:11;a:4:{s:7:"onclick";s:35:"app.filemanager.paste(\'mailpaste\');";s:4:"name";s:17:"button[mailpaste]";s:4:"size";s:28:"mailpaste,mailpaste_disabled";s:4:"type";s:10:"buttononly";}i:12;a:4:{s:5:"label";s:11:"File a file";s:7:"onclick";s:171:"window.open(egw::link(\'/index.php\',\'menuaction=stylite.stylite_filemanager.upload\'),\'_blank\',\'dependent=yes,width=550,height=350,scrollbars=yes,status=yes\'); return false;";s:4:"type";s:6:"button";s:4:"size";s:6:"upload";}}}','size' => '','style' => '','modified' => '1365608384',);
|
||||
|
||||
$templ_data[] = array('name' => 'filemanager.index.rows','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:3:{i:0;a:6:{s:2:"c1";s:2:"th";s:2:"c2";s:20:"row $row_cont[class]";s:1:"B";s:3:"30%";s:1:"D";s:3:"120";s:1:"E";s:3:"120";s:1:"K";s:2:"70";}i:1;a:11:{s:1:"A";a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Type";s:4:"name";s:4:"mime";s:5:"align";s:6:"center";}s:1:"B";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";}s:1:"C";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Size";s:4:"name";s:4:"size";}s:1:"D";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Modified";s:4:"name";s:5:"mtime";}s:1:"E";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Created";s:4:"name";s:5:"ctime";}s:1:"F";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:11:"Permissions";s:4:"name";s:4:"mode";}s:1:"G";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:3:"uid";s:5:"label";s:5:"Owner";}s:1:"H";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:3:"gid";s:5:"label";s:5:"Group";}s:1:"I";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:7:"Comment";s:4:"name";s:7:"comment";}s:1:"J";a:3:{s:4:"type";s:22:"nextmatch-customfields";s:8:"readonly";s:1:"1";s:4:"name";s:12:"customfields";}s:1:"K";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:7:"Actions";s:4:"name";s:14:"legacy_actions";}i:2;a:8:{s:4:"type";s:6:"button";s:4:"size";s:5:"check";s:5:"label";s:9:"Check all";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";s:7:"onclick";s:98:"egw_globalObjectManager.getObjectById(\'filemanager.index.rows\').toggleAllSelected(); return false;";s:6:"needed";s:1:"1";s:5:"align";s:5:"right";}}}i:2;a:11:{s:1:"A";a:3:{s:4:"type";s:8:"vfs-mime";s:4:"name";s:4:"$row";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:"no_lang";s:1:"1";}s:1:"C";a:3:{s:4:"type";s:8:"vfs-size";s:4:"name";s:12:"${row}[size]";s:5:"align";s:5:"right";}s:1:"D";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:13:"${row}[mtime]";s:8:"readonly";s:1:"1";}s:1:"E";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:13:"${row}[ctime]";s:8:"readonly";s:1:"1";}s:1:"F";a:2:{s:4:"type";s:8:"vfs-mode";s:4:"name";s:12:"${row}[mode]";}s:1:"G";a:3:{s:4:"type";s:7:"vfs-uid";s:4:"name";s:11:"${row}[uid]";s:7:"no_lang";s:1:"1";}s:1:"H";a:3:{s:4:"type";s:7:"vfs-gid";s:4:"name";s:11:"${row}[gid]";s:7:"no_lang";s:1:"1";}s:1:"I";a:2:{s:4:"type";s:5:"label";s:4:"name";s:15:"${row}[comment]";}s:1:"J";a:3:{s:4:"type";s:17:"customfields-list";s:4:"name";s:4:"$row";s:4:"span";s:13:",customfields";}s:1:"K";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:13:"Edit settings";s:4:"name";s:21:"edit[$row_cont[path]]";s:4:"help";s:39:"Rename, change permissions or ownership";s:7:"onclick";s:192:"window.open(egw::link(\'/index.php\',\'menuaction=filemanager.filemanager_ui.file&path=$row_cont[path]\'),\'fileprefs\',\'dependent=yes,width=495,height=425,scrollbars=yes,status=yes\'); return false;";}i:2;a:5:{s:4:"type";s:10:"buttononly";s:4:"size";s:12:"mail_post_to";s:4:"name";s:21:"mail[$row_cont[path]]";s:7:"onclick";s:43:"open_mail(\'$row_cont[path]\'); return false;";s:5:"align";s:6:"center";}i:3;a:7:{s:4:"type";s:6:"button";s:4:"name";s:23:"delete[$row_cont[path]]";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"help";s:29:"Delete this file or directory";s:7:"onclick";s:48:"return confirm(\'Delete this file or directory\');";s:5:"align";s:6:"center";}s:5:"align";s:5:"right";i:4;a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:9:"checked[]";s:5:"align";s:5:"right";s:4:"size";s:17:""$row_cont[path]"";}}}}s:4:"rows";i:2;s:4:"cols";i:11;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1259329664',);
|
||||
|
||||
|
@ -1,22 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="filemanager.index.header_left" template="" lang="" group="0" version="1.9.002">
|
||||
<hbox span="all">
|
||||
<image href="filemanager.filemanager_ui.index&path=.." label="Up" src="goup"/>
|
||||
<image href="filemanager.filemanager_ui.index&path=~" label="Go to your home directory" src="gohome"/>
|
||||
<vfs-name label="Path" id="path" onchange="1" options="80" class="address"/>
|
||||
<button label="Go to" id="button[go]" image="key_enter"/>
|
||||
<image src="buttonseparator"/>
|
||||
<button statustext="Rename, change permissions or ownership" label="Edit settings" id="edit[{$cont[nm][path]}]" onclick="window.open(egw::link('/index.php','menuaction=filemanager.filemanager_ui.file&path={$cont[nm][path]}'),'fileprefs','dependent=yes,width=495,height=425,scrollbars=yes,status=yes'); return false;" image="edit"/>
|
||||
<button label="Create directory" id="button[createdir]" onclick="var dir = prompt(egw::lang('New directory')); if (!dir) return false; document.getElementById(form::name('nm[path]')).value=dir;" image="button_createdir" ro_image="createdir_disabled"/>
|
||||
<button label="Create a link" id="button[symlink]" onclick="var link = prompt(egw::lang('Link target')); if (!link) return false; document.getElementById(form::name('nm[path]')).value=link;" image="link" ro_image="link_disabled"/>
|
||||
<button statustext="call:clipboard_tooltip(this);" id="button[paste]" onclick="return clipboard_files.length > 0;" image="editpaste" ro_image="editpaste_disabled"/>
|
||||
<button statustext="call:clipboard_tooltip(this);" id="button[linkpaste]" onclick="return clipboard_files.length > 0;" image="linkpaste" ro_image="linkpaste_disabled"/>
|
||||
<button statustext="call:clipboard_tooltip(this);" id="button[mailpaste]" onclick="if (clipboard_files.length) app.filemanager.open_mail(); return false;" image="mailpaste" ro_image="mailpaste_disabled"/>
|
||||
<button label="File a file" onclick="window.open(egw::link('/index.php','menuaction=stylite.stylite_filemanager.upload'),'_blank','dependent=yes,width=550,height=350,scrollbars=yes,status=yes'); return false;" image="upload"/>
|
||||
</hbox>
|
||||
</template>
|
||||
<template id="filemanager.index.rows" template="" lang="" group="0" version="1.7.002">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
@ -70,12 +54,27 @@
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="filemanager.index.header_left" template="" lang="" group="0" version="1.9.002">
|
||||
<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" onchange="return true;" options="80" class="address"/>
|
||||
<button label="Go to" id="button[go]" image="key_enter"/>
|
||||
<image src="buttonseparator"/>
|
||||
<button statustext="Rename, change permissions or ownership" label="Edit settings" id="edit[{$cont[nm][path]}]" onclick="window.open(egw::link('/index.php','menuaction=filemanager.filemanager_ui.file&path={$cont[nm][path]}'),'fileprefs','dependent=yes,width=495,height=425,scrollbars=yes,status=yes'); return false;" image="edit"/>
|
||||
<button label="Create directory" id="button[createdir]" onclick="var dir = prompt(egw::lang('New directory')); if (!dir) return false; document.getElementById(form::name('nm[path]')).value=dir;" image="button_createdir" ro_image="createdir_disabled"/>
|
||||
<button label="Create a link" id="button[symlink]" onclick="var link = prompt(egw::lang('Link target')); if (!link) return false; document.getElementById(form::name('nm[path]')).value=link;" image="link" ro_image="link_disabled"/>
|
||||
<buttononly id="button[paste]" onclick="app.filemanager.paste('paste');" options="editpaste,editpaste_disabled"/>
|
||||
<buttononly id="button[linkpaste]" onclick="app.filemanager.paste('linkpaste');" options="linkpaste,linkpaste_disabled"/>
|
||||
<buttononly id="button[mailpaste]" onclick="app.filemanager.paste('mailpaste');" options="mailpaste,mailpaste_disabled"/>
|
||||
<button label="File a file" onclick="window.open(egw::link('/index.php','menuaction=stylite.stylite_filemanager.upload'),'_blank','dependent=yes,width=550,height=350,scrollbars=yes,status=yes'); return false;" image="upload"/>
|
||||
</hbox>
|
||||
</template>
|
||||
<template id="filemanager.index" template="" lang="" group="0" version="1.9.003">
|
||||
<description id="nm[msg]" class="redItalic"/>
|
||||
<template disabled="true" id="filemanager.index.header_left"/>
|
||||
<nextmatch id="nm" options="filemanager.index.rows"/>
|
||||
<nextmatch id="nm" template="filemanager.index.rows" header_left="filemanager.index.header_left"/>
|
||||
<hbox>
|
||||
<file statustext="Select file to upload in current directory" id="upload[]" onchange="check_files(this);"/>
|
||||
<file statustext="Select file to upload in current directory" id="upload[]" onchange="app.filemanager.check_files(this);"/>
|
||||
<button label="Upload" id="button[upload]"/>
|
||||
</hbox>
|
||||
<styles>
|
||||
|
Loading…
Reference in New Issue
Block a user