1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

IE fixes and crypto shims

This commit is contained in:
Kyle Spearrin
2017-07-08 00:12:57 -04:00
parent ab12c990bc
commit b62950fa2b
14 changed files with 698 additions and 35 deletions

View File

@@ -2,7 +2,7 @@
.module('bit.vault')
.controller('vaultAttachmentsController', function ($scope, apiService, $uibModalInstance, cryptoService, cipherService,
loginId, $analytics, validationService, toastr) {
loginId, $analytics, validationService, toastr, $timeout) {
$analytics.eventTrack('vaultAttachmentsController', { category: 'Modal' });
$scope.login = {};
$scope.readOnly = true;
@@ -33,8 +33,9 @@
var reader = new FileReader();
reader.readAsArrayBuffer(file);
reader.onload = function (evt) {
form.$loading = true;
$scope.$apply();
$timeout(function () {
form.$loading = true;
});
var key = getKeyForLogin();
@@ -65,8 +66,9 @@
req.responseType = 'arraybuffer';
req.onload = function (evt) {
if (!req.response) {
attachment.loading = false;
$scope.$apply();
$timeout(function () {
attachment.loading = false;
});
// error
return;
@@ -87,9 +89,10 @@
a.click();
document.body.removeChild(a);
}
attachment.loading = false;
$scope.$apply();
$timeout(function () {
attachment.loading = false;
});
});
};
req.send(null);