1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-29 14:43:31 +00:00
Files
browser/src/app/vault/vaultMoveCiphersController.js
2017-10-11 09:45:52 -04:00

29 lines
935 B
JavaScript

angular
.module('bit.vault')
.controller('vaultMoveCiphersController', function ($scope, apiService, $uibModalInstance, ids, $analytics,
$rootScope) {
$analytics.eventTrack('vaultMoveCiphersController', { category: 'Modal' });
$scope.folders = $rootScope.vaultFolders;
$scope.count = ids.length;
$scope.save = function () {
$scope.savePromise = apiService.ciphers.moveMany({ ids: ids, folderId: $scope.folderId }, function () {
$analytics.eventTrack('Bulk Moved Ciphers');
$uibModalInstance.close($scope.folderId || null);
}).$promise;
};
$scope.folderSort = function (item) {
if (!item.id) {
return '!';
}
return item.name.toLowerCase();
};
$scope.close = function () {
$uibModalInstance.dismiss('cancel');
};
});