1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-10 06:08:34 +02:00
bitwarden-browser/src/app/vault/vaultMoveLoginsController.js

29 lines
932 B
JavaScript
Raw Normal View History

2017-06-09 15:46:25 +02:00
angular
.module('bit.vault')
.controller('vaultMoveLoginsController', function ($scope, apiService, $uibModalInstance, ids, $analytics,
$rootScope) {
$analytics.eventTrack('vaultMoveLoginsController', { 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 Logins');
$uibModalInstance.close($scope.folderId || null);
}).$promise;
};
$scope.folderSort = function (item) {
if (!item.id) {
return '!';
}
return item.name.toLowerCase();
};
$scope.close = function () {
$uibModalInstance.dismiss('cancel');
};
});