diff --git a/src/app/pages/mail/MailCtrl.js b/src/app/pages/mail/MailCtrl.js index d19c908..8190b73 100644 --- a/src/app/pages/mail/MailCtrl.js +++ b/src/app/pages/mail/MailCtrl.js @@ -9,7 +9,7 @@ .controller('MailCtrl', MailCtrl); /** @ngInject */ - function MailCtrl($scope, $location, $sce) { + function MailCtrl($scope, $location, $sce, composeModal) { $scope.showMail = false; @@ -315,6 +315,13 @@ $scope.tab = findTabByLabel(0); $scope.currentMessages = $scope.tabs[$scope.tab].filter($scope.messages); $scope.mail = $scope.currentMessages[findMessageById(0)]; + + $scope.showCompose = function(){ + composeModal.open({ + subject : "hello world" + }) + } + } })(); diff --git a/src/app/pages/mail/blurEmail.html b/src/app/pages/mail/blurEmail.html index 5621967..e136904 100644 --- a/src/app/pages/mail/blurEmail.html +++ b/src/app/pages/mail/blurEmail.html @@ -2,7 +2,7 @@
-
diff --git a/src/app/theme/components/composeBox/compose.html b/src/app/theme/components/composeBox/compose.html new file mode 100644 index 0000000..cd061f9 --- /dev/null +++ b/src/app/theme/components/composeBox/compose.html @@ -0,0 +1 @@ +

Subject:{{subject}}

\ No newline at end of file diff --git a/src/app/theme/components/composeBox/composeBoxCtrl.js b/src/app/theme/components/composeBox/composeBoxCtrl.js new file mode 100644 index 0000000..cf81e27 --- /dev/null +++ b/src/app/theme/components/composeBox/composeBoxCtrl.js @@ -0,0 +1,21 @@ +/** + * @author a.demeshko + * created on 24/12/15 + */ +(function () { + 'use strict'; + + angular.module('BlurAdmin.theme.components') + .controller('composeBoxCtrl', composeBoxCtrl); + + /** @ngInject */ + function composeBoxCtrl($scope, $uibModalInstance) { + $scope.ok = function () { + $uibModalInstance.close($scope.selected.item); + }; + + $scope.cancel = function () { + $uibModalInstance.dismiss('cancel'); + }; + } +})(); \ No newline at end of file diff --git a/src/app/theme/services/composeModal.js b/src/app/theme/services/composeModal.js new file mode 100644 index 0000000..6e8981c --- /dev/null +++ b/src/app/theme/services/composeModal.js @@ -0,0 +1,28 @@ +/** + * @author a.demeshko + * created on 12/24/15 + */ +(function () { + 'use strict'; + + angular.module('BlurAdmin.theme') + .service('composeModal', composeModal); + + /** @ngInject */ + function composeModal($uibModal) { + return { + open : function(options){ + return $uibModal.open({ + animation: false, + templateUrl: 'app/theme/components/composeBox/compose.html', + controller: 'composeBoxCtrl', + size: size, + resolve: { + subject : options.subject + } + }); + } + } + } + +})(); \ No newline at end of file