1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 01:33:33 +00:00

subvault => collections file renames

This commit is contained in:
Kyle Spearrin
2017-04-27 09:35:21 -04:00
parent 1ebae5c284
commit 4eee908f2f
16 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
angular
.module('bit.organization')
.controller('organizationCollectionsEditController', function ($scope, $state, $uibModalInstance, apiService, cipherService,
$analytics, id) {
$analytics.eventTrack('organizationCollectionsEditController', { category: 'Modal' });
$scope.collection = {};
$uibModalInstance.opened.then(function () {
apiService.collections.get({ orgId: $state.params.orgId, id: id }, function (collection) {
$scope.collection = cipherService.decryptCollection(collection);
});
});
$scope.submit = function (model) {
var collection = cipherService.encryptCollection(model, $state.params.orgId);
$scope.submitPromise = apiService.collections.put({ orgId: $state.params.orgId }, collection, function (response) {
$analytics.eventTrack('Edited Collection');
var decCollection = cipherService.decryptCollection(response, $state.params.orgId, true);
$uibModalInstance.close(decCollection);
}).$promise;
};
$scope.close = function () {
$uibModalInstance.dismiss('cancel');
};
});