diff --git a/src/popup/app/vault/vaultController.js b/src/popup/app/vault/vaultController.js index 57fde2e850..00b638395e 100644 --- a/src/popup/app/vault/vaultController.js +++ b/src/popup/app/vault/vaultController.js @@ -83,6 +83,26 @@ }); } + $scope.viewSite = function (site) { + $ionicModal.fromTemplateUrl('app/vault/views/vaultViewSite.html', { + scope: $scope, + animation: 'slide-in-up' + }).then(function (modal) { + $scope.viewSiteModal = modal; + modal.show(); + }); + }; + + $scope.editSite = function (site) { + $ionicModal.fromTemplateUrl('app/vault/views/vaultEditSite.html', { + scope: $scope, + animation: 'slide-in-up' + }).then(function (modal) { + $scope.editSiteModal = modal; + modal.show(); + }); + }; + $scope.addSite = function () { $ionicModal.fromTemplateUrl('app/vault/views/vaultAddSite.html', { scope: $scope, @@ -97,6 +117,14 @@ $scope.addSiteModal.hide(); }; + $scope.closeViewSite = function () { + $scope.viewSiteModal.hide(); + }; + + $scope.closeEditSite = function () { + $scope.editSiteModal.hide(); + }; + $scope.$on('modal.hidden', function () { console.log('modal hidden'); loadVault(); diff --git a/src/popup/app/vault/vaultEditSiteController.js b/src/popup/app/vault/vaultEditSiteController.js new file mode 100644 index 0000000000..e00031949a --- /dev/null +++ b/src/popup/app/vault/vaultEditSiteController.js @@ -0,0 +1,16 @@ +angular + .module('bit.vault') + + .controller('vaultEditSiteController', function ($scope, siteService, cryptoService) { + $scope.site = { + folderId: null + }; + + $scope.editSite = function (model) { + + }; + + $scope.close = function () { + $scope.parentScope.closeEditSite(); + }; + }); diff --git a/src/popup/app/vault/vaultViewSiteController.js b/src/popup/app/vault/vaultViewSiteController.js new file mode 100644 index 0000000000..4115e94fcc --- /dev/null +++ b/src/popup/app/vault/vaultViewSiteController.js @@ -0,0 +1,16 @@ +angular + .module('bit.vault') + + .controller('vaultViewSiteController', function ($scope, siteService, cryptoService) { + $scope.site = { + folderId: null + }; + + $scope.editSite = function () { + + }; + + $scope.close = function () { + $scope.parentScope.closeViewSite(); + }; + }); diff --git a/src/popup/app/vault/views/vault.html b/src/popup/app/vault/views/vault.html index 8f998db6c3..1602107ba3 100644 --- a/src/popup/app/vault/views/vault.html +++ b/src/popup/app/vault/views/vault.html @@ -8,11 +8,13 @@