1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

UI for add site

This commit is contained in:
Kyle Spearrin
2016-09-03 21:45:45 -04:00
parent 2871e04cc7
commit 32f4ab4987
7 changed files with 89 additions and 18 deletions

View File

@@ -2,15 +2,14 @@
.module('bit.vault')
.controller('vaultController', function ($scope, $ionicModal) {
$ionicModal.fromTemplateUrl('app/vault/views/vaultAddSite.html', {
scope: $scope,
animation: 'slide-in-up'
}).then(function (modal) {
$scope.addSiteModal = modal;
});
$scope.addSite = function () {
$scope.addSiteModal.show();
$ionicModal.fromTemplateUrl('app/vault/views/vaultAddSite.html', {
scope: $scope,
animation: 'slide-in-up'
}).then(function (modal) {
$scope.addSiteModal = modal;
modal.show();
});
};
$scope.closeAddSite = function () {
@@ -19,16 +18,19 @@
// Cleanup the modal when we're done with it!
$scope.$on('$destroy', function () {
console.log('modal destroyed');
$scope.addSiteModal.remove();
});
// Execute action on hide modal
$scope.$on('modal.hidden', function () {
console.log('modal hidden');
// Execute action
});
// Execute action on remove modal
$scope.$on('modal.removed', function () {
console.log('modal removed');
// Execute action
});
});