1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-30 04:42:15 -05:00

minor cleanup

This commit is contained in:
Tankred Hase 2013-10-19 03:32:00 +02:00
parent 4e186d2881
commit 558ffb4599
3 changed files with 18 additions and 10 deletions

View File

@ -29,11 +29,7 @@ define(function(require) {
}; };
$scope.openWriter = function(replyTo) { $scope.openWriter = function(replyTo) {
if (replyTo) { $scope.writerReply = !! (replyTo);
$scope.writerTitle = 'Reply';
} else {
$scope.writerTitle = 'New email';
}
$scope.writerOpen = true; $scope.writerOpen = true;
}; };

View File

@ -12,14 +12,27 @@ define(function(require) {
// Controller // Controller
// //
var WriteCtrl = function($scope, $routeParams, $filter) { var WriteCtrl = function($scope, $filter) {
$scope.signature = str.signature; $scope.signature = str.signature;
emailDao = appController._emailDao;
// //
// Init // 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) { function fillFields(re) {
var from, body, bodyRows; var from, body, bodyRows;
@ -28,8 +41,7 @@ define(function(require) {
return; return;
} }
// fille title $scope.writerTitle = 'Reply';
$scope.title = 'Reply';
// fill recipient field // fill recipient field
$scope.to = re.from[0].address; $scope.to = re.from[0].address;
// fill subject // fill subject

View File

@ -48,7 +48,7 @@ $lightbox-padding: 15px;
$lightbox-max-width: 662px; $lightbox-max-width: 662px;
$lightbox-width: 90%; $lightbox-width: 90%;
$lightbox-min-height: 644px; $lightbox-min-height: 644px;
$lightbox-top: 10%; $lightbox-top: 7.5%;
$btn-back-color: $color-blue; $btn-back-color: $color-blue;
$btn-color: #fff; $btn-color: #fff;