allow to choose forward mode on rightclick action (forward inline OR forward as attachment)

This commit is contained in:
Klaus Leithoff 2012-03-12 09:50:57 +00:00
parent 2ed265a7fb
commit 22746362c9
2 changed files with 19 additions and 5 deletions

View File

@ -340,7 +340,21 @@ class uiwidgets
'caption' => 'Forward', 'caption' => 'Forward',
'icon' => 'mail_forward', 'icon' => 'mail_forward',
'group' => $group, 'group' => $group,
'children' => array(
'forwardinline' => array(
'caption' => 'forward inline',
'icon' => 'mail_forward',
'group' => $group,
'onExecute' => 'javaScript:mail_compose', 'onExecute' => 'javaScript:mail_compose',
'allowOnMultiple' => false,
),
'forwardasattach' => array(
'caption' => 'forward as attachment',
'icon' => 'mail_forward',
'group' => $group,
'onExecute' => 'javaScript:mail_compose',
),
),
), ),
'composeasnew' => array( 'composeasnew' => array(
'caption' => 'Compose as new', 'caption' => 'Compose as new',

View File

@ -184,12 +184,12 @@ function mail_compose(_action, _elems)
url += '&reply_id='+_elems[0].id; url += '&reply_id='+_elems[0].id;
egw_openWindowCentered(url,'replyAll_'+_elems[0].id,700,egw_getWindowOuterHeight()); egw_openWindowCentered(url,'replyAll_'+_elems[0].id,700,egw_getWindowOuterHeight());
} }
if (_action.id == 'forward') if (_action.id == 'forward'||_action.id == 'forwardinline'||_action.id == 'forwardasattach')
{ {
if (multipleIds) if (multipleIds||_action.id == 'forwardasattach')
{ {
url += 'menuaction=felamimail.uicompose.compose'; url += 'menuaction=felamimail.uicompose.compose';
mail_openComposeWindow(url) mail_openComposeWindow(url,_action.id == 'forwardasattach');
} }
else else
{ {
@ -900,7 +900,7 @@ function mail_openComposeWindow(_url,forwardByCompose) {
//sMessageList.concat(','); //sMessageList.concat(',');
} }
} }
if (prefAskForMultipleForward == 1 && Check == true && alreadyAsked == false && sMessageList.length >0) if (prefAskForMultipleForward == 1 && Check == true && alreadyAsked == false && sMessageList.length >0 && _messageList['msg'].length>1)
{ {
askme = egw_appWindow('felamimail').lang_multipleforward; askme = egw_appWindow('felamimail').lang_multipleforward;
//if (cbAllMessages == true || cbAllVisibleMessages == true) askme = egw_appWindow('felamimail').lang_confirm_all_messages; // not supported //if (cbAllMessages == true || cbAllVisibleMessages == true) askme = egw_appWindow('felamimail').lang_confirm_all_messages; // not supported