forked from extern/egroupware
Add stub drop actions to folder tree
This commit is contained in:
parent
099252e327
commit
45d6f73dba
@ -136,6 +136,36 @@ class mail_ui
|
|||||||
if (!isset($content['nm']['cat_id'])) $content['nm']['cat_id'] = 'All';
|
if (!isset($content['nm']['cat_id'])) $content['nm']['cat_id'] = 'All';
|
||||||
|
|
||||||
$etpl = new etemplate('mail.index');
|
$etpl = new etemplate('mail.index');
|
||||||
|
|
||||||
|
// Set tree actions
|
||||||
|
$etpl->set_cell_attribute('nm[foldertree]','actions', array(
|
||||||
|
|
||||||
|
'drop_move_mail' => array(
|
||||||
|
'type' => 'drop',
|
||||||
|
'acceptedTypes' => 'mail',
|
||||||
|
'icon' => 'move',
|
||||||
|
'caption' => 'Move to',
|
||||||
|
'onExecute' => 'javaScript:mail_move'
|
||||||
|
),
|
||||||
|
'drop_copy_mail' => array(
|
||||||
|
'type' => 'drop',
|
||||||
|
'acceptedTypes' => 'mail',
|
||||||
|
'icon' => 'copy',
|
||||||
|
'caption' => 'Copy to',
|
||||||
|
'onExecute' => 'javaScript:mail_copy'
|
||||||
|
),
|
||||||
|
'drop_cancel' => array(
|
||||||
|
'caption' => 'Cancel',
|
||||||
|
'acceptedTypes' => 'mail',
|
||||||
|
'type' => 'drop',
|
||||||
|
),
|
||||||
|
// Tree doesn't support this one - yet
|
||||||
|
'rename' => array(
|
||||||
|
'caption' => 'Rename',
|
||||||
|
'type' => 'popup'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
return $etpl->exec('mail.mail_ui.index',$content,$sel_options,$readonlys,$preserv);
|
return $etpl->exec('mail.mail_ui.index',$content,$sel_options,$readonlys,$preserv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -708,32 +738,11 @@ class mail_ui
|
|||||||
'group' => ++$group,
|
'group' => ++$group,
|
||||||
'onExecute' => 'javaScript:mail_delete',
|
'onExecute' => 'javaScript:mail_delete',
|
||||||
),
|
),
|
||||||
/*
|
|
||||||
'drag_mail' => array(
|
'drag_mail' => array(
|
||||||
'dragType' => 'mail',
|
'dragType' => 'mail',
|
||||||
'type' => 'drag',
|
'type' => 'drag',
|
||||||
'onExecute' => 'javaScript:mail_dragStart',
|
'onExecute' => 'javaScript:mail_dragStart',
|
||||||
),
|
),
|
||||||
'drop_move_mail' => array(
|
|
||||||
'type' => 'drop',
|
|
||||||
'acceptedTypes' => 'mail',
|
|
||||||
'icon' => 'move',
|
|
||||||
'caption' => 'Move to',
|
|
||||||
'onExecute' => 'javaScript:mail_move'
|
|
||||||
),
|
|
||||||
'drop_copy_mail' => array(
|
|
||||||
'type' => 'drop',
|
|
||||||
'acceptedTypes' => 'mail',
|
|
||||||
'icon' => 'copy',
|
|
||||||
'caption' => 'Copy to',
|
|
||||||
'onExecute' => 'javaScript:mail_copy'
|
|
||||||
),
|
|
||||||
'drop_cancel' => array(
|
|
||||||
'caption' => 'Cancel',
|
|
||||||
'acceptedTypes' => 'mail',
|
|
||||||
'type' => 'drop',
|
|
||||||
),
|
|
||||||
*/
|
|
||||||
);
|
);
|
||||||
// save as tracker, save as infolog, as this are actions that are either available for all, or not, we do that for all and not via css-class disabling
|
// save as tracker, save as infolog, as this are actions that are either available for all, or not, we do that for all and not via css-class disabling
|
||||||
if (!isset($GLOBALS['egw_info']['user']['apps']['infolog']))
|
if (!isset($GLOBALS['egw_info']['user']['apps']['infolog']))
|
||||||
|
@ -158,3 +158,13 @@ function mail_changeFolder(folder,_widget) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tree widget stubs
|
||||||
|
mail_dragStart = function(action,sender) {
|
||||||
|
console.log(action,sender);
|
||||||
|
}
|
||||||
|
mail_move = function(action,sender) {
|
||||||
|
console.log(action,sender);
|
||||||
|
}
|
||||||
|
mail_copy = function(action,sender) {
|
||||||
|
console.log(action,sender);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user