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:
parent
2976e128ed
commit
dbe99195db
@ -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();
|
||||
});
|
||||
};
|
||||
};
|
||||
|
@ -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-->
|
@ -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">
|
||||
|
@ -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"></button>
|
||||
|
Loading…
Reference in New Issue
Block a user