mirror of
https://github.com/nextcloud/passman.git
synced 2025-02-27 00:43:02 +08:00
Replace all scope.apply with digest
This commit is contained in:
parent
4a074958f5
commit
089b0e13d7
5 changed files with 10 additions and 8 deletions
|
@ -81,11 +81,13 @@ jQuery(document).ready(function () {
|
|||
jQuery(document).on('click', '.undoDelete', function () {
|
||||
var credential = findItemByID($(this).attr('data-item-id'));
|
||||
angular.element('#app-content-wrapper').scope().recoverCredential(credential);
|
||||
//Outside anglular we need $apply
|
||||
angular.element('#app-content-wrapper').scope().$apply();
|
||||
});
|
||||
jQuery(document).on('click', '.undoRestore', function () {
|
||||
var credential = findItemByID($(this).attr('data-item-id'));
|
||||
angular.element('#app-content-wrapper').scope().deleteCredential(credential);
|
||||
//Outside anglular we need $apply
|
||||
angular.element('#app-content-wrapper').scope().$apply();
|
||||
});
|
||||
var adjustControlsWidth = function(r) {
|
||||
|
|
|
@ -169,7 +169,7 @@ angular.module('passmanApp')
|
|||
});
|
||||
|
||||
|
||||
$scope.$apply()
|
||||
$scope.$digest()
|
||||
};
|
||||
|
||||
$scope.fileLoadError = function (error, file) {
|
||||
|
@ -181,7 +181,7 @@ angular.module('passmanApp')
|
|||
$scope.fileSelectProgress = function (progress) {
|
||||
if (progress) {
|
||||
$scope.fileprogress = progress;
|
||||
$scope.$apply()
|
||||
$scope.$digest()
|
||||
|
||||
}
|
||||
};
|
||||
|
@ -208,7 +208,7 @@ angular.module('passmanApp')
|
|||
qrInfo[parsedQR[3]] = parsedQR[4];
|
||||
qrInfo[parsedQR[5]] = parsedQR[6];
|
||||
$scope.storedCredential.otp = qrInfo;
|
||||
$scope.$apply()
|
||||
$scope.$digest()
|
||||
};
|
||||
|
||||
$scope.saveCredential = function () {
|
||||
|
|
|
@ -40,7 +40,7 @@ angular.module('passmanApp')
|
|||
file_data = file.data.split(',');
|
||||
file_data = decodeURIComponent(escape(window.atob( file_data[1] ))); //window.atob();
|
||||
_log('File read successfully!')
|
||||
$scope.$apply();
|
||||
$scope.$digest();
|
||||
};
|
||||
|
||||
$scope.fileLoadError = function (file) {
|
||||
|
@ -121,7 +121,7 @@ angular.module('passmanApp')
|
|||
}
|
||||
}).progress(function(progress){
|
||||
$scope.file_read_progress = progress;
|
||||
$scope.$apply();
|
||||
$scope.$digest();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ angular.module('passmanApp')
|
|||
|
||||
ShareService.generateRSAKeys(length).progress(function(progress){
|
||||
$scope.progress = progress > 0 ? 2:1;
|
||||
$scope.$apply();
|
||||
$scope.$digest();
|
||||
}).then(function(kp){
|
||||
console.log('stuff done');
|
||||
$scope.generating = false;
|
||||
|
|
|
@ -75,13 +75,13 @@ angular.module('passmanApp')
|
|||
ShareService.generateRSAKeys(key_size).progress(function (progress) {
|
||||
var p = progress > 0 ? 2 : 1;
|
||||
$scope.creating_keys = 'Generating sharing keys (' + p + ' / 2)';
|
||||
$scope.$apply();
|
||||
$scope.$digest();
|
||||
}).then(function (kp) {
|
||||
var pem = ShareService.rsaKeyPairToPEM(kp);
|
||||
$scope.creating_keys = false;
|
||||
$scope.sharing_keys.private_sharing_key = pem.privateKey;
|
||||
$scope.sharing_keys.public_sharing_key = pem.publicKey;
|
||||
$scope.$apply();
|
||||
$scope.$digest();
|
||||
});
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue