mirror of
https://github.com/moparisthebest/mail
synced 2024-11-26 19:02:20 -05:00
minor cleanup
This commit is contained in:
parent
4e186d2881
commit
558ffb4599
@ -29,11 +29,7 @@ define(function(require) {
|
||||
};
|
||||
|
||||
$scope.openWriter = function(replyTo) {
|
||||
if (replyTo) {
|
||||
$scope.writerTitle = 'Reply';
|
||||
} else {
|
||||
$scope.writerTitle = 'New email';
|
||||
}
|
||||
$scope.writerReply = !! (replyTo);
|
||||
$scope.writerOpen = true;
|
||||
};
|
||||
|
||||
|
@ -12,14 +12,27 @@ define(function(require) {
|
||||
// Controller
|
||||
//
|
||||
|
||||
var WriteCtrl = function($scope, $routeParams, $filter) {
|
||||
var WriteCtrl = function($scope, $filter) {
|
||||
$scope.signature = str.signature;
|
||||
emailDao = appController._emailDao;
|
||||
|
||||
//
|
||||
// Init
|
||||
//
|
||||
|
||||
emailDao = appController._emailDao;
|
||||
$scope.$watch('writerOpen', function() {
|
||||
resetFields();
|
||||
if ($scope.writerReply) {
|
||||
fillFields($scope.selected);
|
||||
}
|
||||
});
|
||||
|
||||
function resetFields() {
|
||||
$scope.writerTitle = 'New email';
|
||||
$scope.to = undefined;
|
||||
$scope.subject = undefined;
|
||||
$scope.body = undefined;
|
||||
}
|
||||
|
||||
function fillFields(re) {
|
||||
var from, body, bodyRows;
|
||||
@ -28,8 +41,7 @@ define(function(require) {
|
||||
return;
|
||||
}
|
||||
|
||||
// fille title
|
||||
$scope.title = 'Reply';
|
||||
$scope.writerTitle = 'Reply';
|
||||
// fill recipient field
|
||||
$scope.to = re.from[0].address;
|
||||
// fill subject
|
||||
|
@ -48,7 +48,7 @@ $lightbox-padding: 15px;
|
||||
$lightbox-max-width: 662px;
|
||||
$lightbox-width: 90%;
|
||||
$lightbox-min-height: 644px;
|
||||
$lightbox-top: 10%;
|
||||
$lightbox-top: 7.5%;
|
||||
|
||||
$btn-back-color: $color-blue;
|
||||
$btn-color: #fff;
|
||||
|
Loading…
Reference in New Issue
Block a user