diff --git a/src/app/directives/stopPropDirective.js b/src/app/directives/stopPropDirective.js new file mode 100644 index 00000000..5b0f6060 --- /dev/null +++ b/src/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(); + }); + }; + }); diff --git a/src/app/vault/vaultController.js b/src/app/vault/vaultController.js index f1bbe875..6e479dd9 100644 --- a/src/app/vault/vaultController.js +++ b/src/app/vault/vaultController.js @@ -312,6 +312,11 @@ return $scope.folderIdFilter === undefined || folder.id === $scope.folderIdFilter; }; + $scope.select = function ($event) { + var checkbox = $($event.currentTarget).parent().find('input[name="loginSelection"]'); + checkbox.prop('checked', !checkbox.prop('checked')); + }; + function distinct(value, index, self) { return self.indexOf(value) === index; } @@ -323,7 +328,7 @@ } function clearLoginSelections() { - $('input[name="loginSelection"]').attr('checked', false); + $('input[name="loginSelection"]').prop('checked', false); } $scope.bulkMove = function () { diff --git a/src/app/vault/views/vault.html b/src/app/vault/views/vault.html index 85fc259b..1e53dde4 100644 --- a/src/app/vault/views/vault.html +++ b/src/app/vault/views/vault.html @@ -107,10 +107,11 @@