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:
@@ -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
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user