* eMail: patch of Andreas Stöckel with bugfix for not working actions in felamimail treeview (when Stylite Template is active)

This commit is contained in:
Klaus Leithoff 2011-02-11 12:50:07 +00:00
parent 3b7a53b20b
commit b6203cad52
2 changed files with 12 additions and 4 deletions

View File

@ -95,7 +95,16 @@ class uiwidgets
// careful! "d = new..." MUST be on a new line!!!
$folder_tree_new = '<link rel="STYLESHEET" type="text/css" href="'.$GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/js/dhtmlxtree/css/dhtmlXTree.css">';
$folder_tree_new .= "<script type='text/javascript'>";
$folder_tree_new .= "tree=new dhtmlXTreeObject('$_divName','100%','100%',0);";
$folder_tree_new .= "function nodeHandler()
{
var wnd = egw_appWindow('felamimail');
if (wnd && (typeof wnd.onNodeSelect == 'function'))
{
egw_appWindow('felamimail').onNodeSelect.apply(this, arguments);
}
}";
$folder_tree_new .= "var tree=new dhtmlXTreeObject('$_divName','100%','100%',0);";
$folder_tree_new .= "tree.parentObject.style.overflow=\"auto\";";
$folder_tree_new .= "tree.setImagePath('$folderImageDir/dhtmlxtree/');";
if($_displayCheckBox) {
$folder_tree_new .= "tree.enableCheckBoxes(1);";
@ -111,7 +120,7 @@ class uiwidgets
*/
#$topFolderBase64 = base64_encode('--topfolder--');
$topFolderBase64 = '--topfolder--';
$folder_tree_new .= "tree.insertNewItem(0,'$topFolderBase64','$_topFolderName',egw_appWindow('felamimail').onNodeSelect,'thunderbird.png','thunderbird.png','thunderbird.png','CHILD,TOP');\n";
$folder_tree_new .= "tree.insertNewItem(0,'$topFolderBase64','$_topFolderName',nodeHandler,'thunderbird.png','thunderbird.png','thunderbird.png','CHILD,TOP');\n";
#foreach($_folders as $key => $obj)
#_debug_array($allFolders);
@ -178,7 +187,7 @@ class uiwidgets
$parentName = str_replace($search, $replace, $parentName);
$folderName = str_replace($search, $replace, $folderName);
$folder_tree_new .= "tree.insertNewItem('$parentName','$folderName','$displayName',egw_appWindow('felamimail').onNodeSelect,$image1,$image2,$image3,'$entryOptions');";
$folder_tree_new .= "tree.insertNewItem('$parentName','$folderName','$displayName',nodeHandler,$image1,$image2,$image3,'$entryOptions');";
$folder_tree_new .= "tree.setUserData('$folderName','folderName', '$userData');";
if($_displayCheckBox) {
$folder_tree_new .= "tree.setCheck('$folderName','".(int)$obj->subscribed."');";

View File

@ -197,7 +197,6 @@ function callNodeSelect(_nodeIDfc, mode) {
}
function onNodeSelect(_nodeID) {
//alert(_nodeID)
if (typeof CopyOrMove == 'undefined') CopyOrMove = egw_appWindow('felamimail').CopyOrMove;
if (typeof prefAskForMove == 'undefined') prefAskForMove = egw_appWindow('felamimail').prefAskForMove;
var Check = CopyOrMove;