1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-23 01:12:19 -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() {
$scope.writerTitle = 'New email';
$scope.to = undefined;
$scope.subject = undefined;
if ($scope.$$childTail) {
$scope.$$childTail.body = '';
}
$scope.ciphertextPreview = undefined;
$scope.to = '';
$scope.subject = '';
$scope.body = '';
$scope.ciphertextPreview = '';
}
function fillFields(re) {
@ -58,7 +56,7 @@ define(function(require) {
bodyRows.forEach(function(row) {
body += (!re.html) ? '<br>' + row : '';
});
$scope.$$childTail.body = body;
$scope.body = body;
}
//
@ -70,7 +68,7 @@ define(function(require) {
iv = util.random(128);
$scope.updatePreview = function() {
var body = $scope.$$childTail.body;
var body = $scope.body;
// remove generated html from body
body = parseBody(body);
@ -114,11 +112,7 @@ define(function(require) {
return;
}
if (window.chrome && chrome.app.window) {
// close the chrome window
chrome.app.window.current().close();
return;
}
$scope.$parent.$parent.closeWriter();
});
};
};

View File

@ -20,5 +20,5 @@
<!-- lightbox -->
<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-->

View File

@ -5,7 +5,7 @@
<div class="content">
<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 class="confirm-control">

View File

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