1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-23 09:22:23 -05:00

correct scope is now used in writer

This commit is contained in:
Tankred Hase 2013-10-21 15:02:54 +02:00
parent 2976e128ed
commit dbe99195db
4 changed files with 10 additions and 16 deletions

View File

@ -30,12 +30,10 @@ define(function(require) {
function resetFields() { function resetFields() {
$scope.writerTitle = 'New email'; $scope.writerTitle = 'New email';
$scope.to = undefined; $scope.to = '';
$scope.subject = undefined; $scope.subject = '';
if ($scope.$$childTail) { $scope.body = '';
$scope.$$childTail.body = ''; $scope.ciphertextPreview = '';
}
$scope.ciphertextPreview = undefined;
} }
function fillFields(re) { function fillFields(re) {
@ -58,7 +56,7 @@ define(function(require) {
bodyRows.forEach(function(row) { bodyRows.forEach(function(row) {
body += (!re.html) ? '<br>' + row : ''; body += (!re.html) ? '<br>' + row : '';
}); });
$scope.$$childTail.body = body; $scope.body = body;
} }
// //
@ -70,7 +68,7 @@ define(function(require) {
iv = util.random(128); iv = util.random(128);
$scope.updatePreview = function() { $scope.updatePreview = function() {
var body = $scope.$$childTail.body; var body = $scope.body;
// remove generated html from body // remove generated html from body
body = parseBody(body); body = parseBody(body);
@ -114,11 +112,7 @@ define(function(require) {
return; return;
} }
if (window.chrome && chrome.app.window) { $scope.$parent.$parent.closeWriter();
// close the chrome window
chrome.app.window.current().close();
return;
}
}); });
}; };
}; };

View File

@ -20,5 +20,5 @@
<!-- lightbox --> <!-- lightbox -->
<div class="lightbox-overlay" ng-class="{'show': writerOpen}"> <div class="lightbox-overlay" ng-class="{'show': writerOpen}">
<div class="lightbox lightbox-effect" ng-include="'tpl/write.html'" ng-controller="WriteCtrl"></div> <div class="lightbox lightbox-effect" ng-include="'tpl/write.html'"></div>
</div><!--/.lightbox-overlay--> </div><!--/.lightbox-overlay-->

View File

@ -5,7 +5,7 @@
<div class="content"> <div class="content">
<div class="passphrase"> <div class="passphrase">
<p><span>Please enter your passphrase: </span><input type="password" ng-model="passphrase" class="passphrase" placeholder="Passphrase" tabindex="1"></p> <p><span>Please enter your passphrase: </span><input type="password" ng-model="passphrase" class="passphrase" placeholder="Passphrase" tabindex="1" focus-me="true"></p>
</div> </div>
<div class="confirm-control"> <div class="confirm-control">

View File

@ -1,4 +1,4 @@
<div class="lightbox-body"> <div class="lightbox-body" ng-controller="WriteCtrl">
<header> <header>
<h2>{{writerTitle}}</h2> <h2>{{writerTitle}}</h2>
<button class="close" ng-click="closeWriter()" data-action="lightbox-close">&#xe007;</button> <button class="close" ng-click="closeWriter()" data-action="lightbox-close">&#xe007;</button>