diff --git a/UI/MailerUI/UIxMailSourceView.h b/UI/MailerUI/UIxMailSourceView.h index cda460d9b..1ec6d50cd 100644 --- a/UI/MailerUI/UIxMailSourceView.h +++ b/UI/MailerUI/UIxMailSourceView.h @@ -1,8 +1,6 @@ /* UIxMailSourceView.h - this file is part of SOGo * - * Copyright (C) 2007 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2007-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/UI/MailerUI/UIxMailSourceView.m b/UI/MailerUI/UIxMailSourceView.m index a3b54267e..0a8ba86c0 100644 --- a/UI/MailerUI/UIxMailSourceView.m +++ b/UI/MailerUI/UIxMailSourceView.m @@ -1,8 +1,6 @@ /* UIxMailSourceView.m - this file is part of SOGo * - * Copyright (C) 2007 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2007-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/UI/Templates/MailerUI/UIxMailViewTemplate.wox b/UI/Templates/MailerUI/UIxMailViewTemplate.wox index b2a218e63..9976a3f4c 100644 --- a/UI/Templates/MailerUI/UIxMailViewTemplate.wox +++ b/UI/Templates/MailerUI/UIxMailViewTemplate.wox @@ -68,12 +68,6 @@ reply - - - reply_all - @@ -90,12 +84,33 @@ delete - - - image - + + + + more_vert + + + + + + + + + + + + + + + + + + + + diff --git a/UI/WebServerResources/js/Mailer/MessageController.js b/UI/WebServerResources/js/Mailer/MessageController.js index 08c1bfec9..cf21b1016 100644 --- a/UI/WebServerResources/js/Mailer/MessageController.js +++ b/UI/WebServerResources/js/Mailer/MessageController.js @@ -21,6 +21,7 @@ vm.replyAll = replyAll; vm.forward = forward; vm.edit = edit; + vm.viewRawSource = viewRawSource; // Watch the message model "flags" attribute to remove on-the-fly a tag from the IMAP message // when removed from the message viewer. @@ -81,6 +82,40 @@ showMailEditor($event, vm.message); }); } + + function viewRawSource($event) { + Message.$$resource.post(vm.message.id, "viewsource").then(function(data) { + $mdDialog.show({ + parent: angular.element(document.body), + targetEvent: $event, + clickOutsideToClose: true, + escapeToClose: true, + template: [ + '', + ' ', + '
',
+            data,
+            '    
', + '
', + '
', + ' ' + l('Close') + '', + '
', + '
' + ].join(''), + controller: MessageRawSourceDialogController + }); + + /** + * @ngInject + */ + MessageRawSourceDialogController.$inject = ['scope', '$mdDialog']; + function MessageRawSourceDialogController(scope, $mdDialog) { + scope.close = function() { + $mdDialog.hide(); + }; + } + }); + } } angular