diff --git a/mail/inc/class.mail_integration.inc.php b/mail/inc/class.mail_integration.inc.php index 0c82de3251..aef5c2fbda 100644 --- a/mail/inc/class.mail_integration.inc.php +++ b/mail/inc/class.mail_integration.inc.php @@ -88,6 +88,7 @@ class mail_integration { } $data = static::get_integrate_data($_GET['rowid'], $_to_emailAddress, $_subject, $_body, $_attachments, $_date, $_rawMail, $_icServerID); + $data['entry_id'] = $app_entry_id; // Check if the hook is registered if (Api\Hooks::exists('mail_import',$app) == 0) @@ -122,8 +123,7 @@ class mail_integration { * 'tmp_name' => string), // tmp dir path * 'message' => string, * 'date' => string, - * 'subject' => string, - * 'entry_id => string // Id of the app entry which mail content will append to + * 'subject' => string * ) * * @param string $_rowid diff --git a/mail/js/app.js b/mail/js/app.js index 1c49cb3455..17d464e83a 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -170,7 +170,7 @@ app.classes.mail = AppJS.extend( // Set preview pane state this.mail_disablePreviewArea(!this.getPreviewPaneState()); - + //Get initial folder status this.mail_refreshFolderStatus(undefined,undefined,false); @@ -3054,8 +3054,9 @@ app.classes.mail = AppJS.extend( if (mail_import_hook && typeof mail_import_hook.app_entry_method != 'undefined') { var data = egw.dataGetUIDdata(_elems[0].id); + var title = egw.lang('Select') + ' ' + egw.lang(app) + ' ' + (egw.link_get_registry(app, 'entry') ? egw.link_get_registry(app, 'entry') : egw.lang('entry')); var subject = (data && typeof data.data != 'undefined')? data.data.subject : ''; - this.integrate_checkAppEntry('Select '+ app + ' entry', app, subject, url, mail_import_hook.app_entry_method, function (args){ + this.integrate_checkAppEntry(title, app, subject, url, mail_import_hook.app_entry_method, function (args){ egw_openWindowCentered(args.url+ (args.entryid ?'&entry_id=' + args.entryid: ''),'import_mail_'+_elems[0].id,w_h[0],w_h[1]); }); } @@ -3089,9 +3090,9 @@ app.classes.mail = AppJS.extend( if (!_entryId) { var buttons = [ - {text: 'Append', id: 'append', image: 'check', default:true}, - {text: 'Add as new', id: 'new', image: 'check'}, - {text: 'Cancel', id: 'cancel', image: 'check'} + {text: app.mail.egw.lang('Append'), id: 'append', image: 'check', default:true}, + {text: app.mail.egw.lang('Add as new'), id: 'new', image: 'check'}, + {text: app.mail.egw.lang('Cancel'), id: 'cancel', image: 'check'} ]; et2_createWidget("dialog", { @@ -5275,7 +5276,8 @@ app.classes.mail = AppJS.extend( var mail_import_hook = toolbar.options.actions[integApps[index]]['mail_import']['app_entry_method']; if (integWidget.get_value() == 'on') { - this.integrate_checkAppEntry(egw.lang('Select %1 entry',integApps[index]), integApps[index].substr(3), subject.get_value(), '', mail_import_hook , function (args){ + var title = egw.lang('Select') + ' ' + egw.lang(integApps[index]) + ' ' + (egw.link_get_registry(integApps[index], 'entry') ? egw.link_get_registry(integApps[index], 'entry') : egw.lang('entry')); + this.integrate_checkAppEntry(title, integApps[index].substr(3), subject.get_value(), '', mail_import_hook , function (args){ var value = {}; value[integApps[index]] = args.entryid; var oldValue = to_integrate_ids.get_value()[0]; diff --git a/mail/lang/egw_en.lang b/mail/lang/egw_en.lang index 37ead9bd12..15a46b7988 100644 --- a/mail/lang/egw_en.lang +++ b/mail/lang/egw_en.lang @@ -24,6 +24,7 @@ add "%1" into whiltelisted domains mail en Add "%1" into whiltelisted domains add "%1" into whitelisted emails mail en Add "%1" into whitelisted emails add a new folder to %1: mail en Add a new Folder to %1: add all my aliases mail en Add all my aliases +add as new mail en Add as new add folder mail en Add Folder add to addressbook mail en add to addressbook add your domain as "%1" in options to list of email providers and enable api. mail en Add your domain as "%1" in options to list of email providers and enable API.