diff --git a/src/js/controller/write.js b/src/js/controller/write.js index a47f37c..8f7d961 100644 --- a/src/js/controller/write.js +++ b/src/js/controller/write.js @@ -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) ? '
' + 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(); }); }; }; diff --git a/src/tpl/desktop.html b/src/tpl/desktop.html index c27e0e4..02e4a2a 100644 --- a/src/tpl/desktop.html +++ b/src/tpl/desktop.html @@ -20,5 +20,5 @@ \ No newline at end of file diff --git a/src/tpl/login-existing.html b/src/tpl/login-existing.html index 7d19487..666c361 100644 --- a/src/tpl/login-existing.html +++ b/src/tpl/login-existing.html @@ -5,7 +5,7 @@
-

Please enter your passphrase:

+

Please enter your passphrase:

diff --git a/src/tpl/write.html b/src/tpl/write.html index 333be95..2fdfe65 100644 --- a/src/tpl/write.html +++ b/src/tpl/write.html @@ -1,4 +1,4 @@ -