1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 10:43:35 +00:00

folders management pages implemented

This commit is contained in:
Kyle Spearrin
2016-09-21 19:10:48 -04:00
parent db80727e1e
commit 438fbc1888
8 changed files with 59 additions and 17 deletions

View File

@@ -1,6 +1,18 @@
angular
angular
.module('bit.settings')
.controller('settingsAddFolderController', function ($scope) {
.controller('settingsAddFolderController', function ($scope, $q, folderService, $state, toastr) {
popupUtils.initListSectionItemListeners();
$('#name').focus();
$scope.savePromise = null;
$scope.save = function (model) {
$scope.savePromise = $q.when(folderService.encrypt(model)).then(function (folderModel) {
var folder = new Folder(folderModel, true);
return $q.when(folderService.saveWithServer(folder)).then(function (folder) {
toastr.success('Added folder');
$state.go('folders', { animation: 'out-slide-down' });
});
});
};
});