mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 08:38:54 +01:00
JSON callback to autoload folders of other profiles (not yet working, as getFolderTree returns too much, should only be children (item) of selected node)
This commit is contained in:
parent
5c6f6471f3
commit
f052fc4fe4
@ -342,6 +342,24 @@ class mail_ui
|
||||
common::egw_footer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax callback to fetch folders for given profile
|
||||
*
|
||||
* We currently load all folders of a given profile, tree can also load parts of a tree.
|
||||
*
|
||||
* @param string $_GET[selected] if of node whos children are requested
|
||||
*/
|
||||
public function ajax_foldertree()
|
||||
{
|
||||
list($profileId) = explode(':', $_GET['selected']);
|
||||
|
||||
$data = $this->getFolderTree(false, $profileId);
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
echo json_encode($data);
|
||||
common::egw_exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* getFolderTree, get folders from server and prepare the folder tree
|
||||
* @param bool $_fetchCounters, wether to fetch extended information on folders
|
||||
|
@ -38,7 +38,7 @@
|
||||
</grid>
|
||||
</template>
|
||||
<template id="mail.index" template="" lang="" group="0" version="1.9.001">
|
||||
<tree id="nm[foldertree]" onclick="mail_changeFolder(widget.event_args[0],widget);" parent_node="tree_target"/>
|
||||
<tree id="nm[foldertree]" onclick="mail_changeFolder(widget.event_args[0],widget);" parent_node="tree_target" autoloading="mail.mail_ui.ajax_foldertree"/>
|
||||
<html id="msg"/>
|
||||
<nextmatch id="nm" options="mail.index.rows"/>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user