From 12c3b7e85b1b27afd1ddc0d85ac4d7da070160eb Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 12 Jun 2017 09:49:31 -0400 Subject: [PATCH] stop prop and clicks from vault list --- src/popup/app/current/currentController.js | 4 +--- src/popup/app/current/views/current.html | 6 +++--- src/popup/app/directives/stopPropDirective.js | 10 ++++++++++ src/popup/app/vault/views/vault.html | 4 ++-- src/popup/app/vault/views/vaultViewFolder.html | 4 ++-- src/popup/index.html | 1 + 6 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 src/popup/app/directives/stopPropDirective.js diff --git a/src/popup/app/current/currentController.js b/src/popup/app/current/currentController.js index 7d1e7300af..eee9672362 100644 --- a/src/popup/app/current/currentController.js +++ b/src/popup/app/current/currentController.js @@ -96,9 +96,7 @@ angular } }; - $scope.viewLogin = function (login, e) { - e.stopPropagation(); - + $scope.viewLogin = function (login) { $state.go('viewLogin', { loginId: login.id, animation: 'in-slide-up', diff --git a/src/popup/app/current/views/current.html b/src/popup/app/current/views/current.html index c1c57c18b5..94485e9964 100644 --- a/src/popup/app/current/views/current.html +++ b/src/popup/app/current/views/current.html @@ -11,19 +11,19 @@ - - - diff --git a/src/popup/app/directives/stopPropDirective.js b/src/popup/app/directives/stopPropDirective.js new file mode 100644 index 0000000000..9dc5eb0233 --- /dev/null +++ b/src/popup/app/directives/stopPropDirective.js @@ -0,0 +1,10 @@ +angular + .module('bit.directives') + + .directive('stopProp', function () { + return function (scope, element, attrs) { + $(element).click(function (event) { + event.stopPropagation(); + }); + }; + }); \ No newline at end of file diff --git a/src/popup/app/vault/views/vault.html b/src/popup/app/vault/views/vault.html index 4ffd115203..516f19e9ff 100644 --- a/src/popup/app/vault/views/vault.html +++ b/src/popup/app/vault/views/vault.html @@ -39,12 +39,12 @@ class="list-grouped-item condensed" title="{{i18n.edit}} {{login.name}}" ng-repeat="login in vaultFolderLogins = (vaultLogins | filter: { folderId: folder.id } | filter: searchLogins() | orderBy: ['name', 'username']) track by $index"> - - diff --git a/src/popup/app/vault/views/vaultViewFolder.html b/src/popup/app/vault/views/vaultViewFolder.html index 04320f8940..1e989d56a4 100644 --- a/src/popup/app/vault/views/vaultViewFolder.html +++ b/src/popup/app/vault/views/vaultViewFolder.html @@ -22,12 +22,12 @@ - - diff --git a/src/popup/index.html b/src/popup/index.html index d3d0d753b1..dc6ecc0bab 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -41,6 +41,7 @@ +