diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2016-12-11 16:07:36 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2016-12-11 16:08:06 +0100 |
commit | 17656dcadad58cc4e2778d0d8e0500da3de10fe7 (patch) | |
tree | cf49c3a0577fd82d14e83234bb421267126061fa /js | |
parent | 09ac3b5a19ae1f6c93e6ed8732262b3b0500f45f (diff) |
Image viewer
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'js')
-rw-r--r-- | js/components/avatar/avatar_controller.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/js/components/avatar/avatar_controller.js b/js/components/avatar/avatar_controller.js index e60bc0fc..94e65921 100644 --- a/js/components/avatar/avatar_controller.js +++ b/js/components/avatar/avatar_controller.js @@ -39,7 +39,18 @@ angular.module('contactsApp') }; ctrl.openPhoto = function() { - + $('avatar').toggleClass('maximized'); + $('avatar').click(function() { + $('avatar').removeClass('maximized'); + }); + $('avatar img, avatar .avatar-options').click(function(e) { + e.stopPropagation(); + }); + $(document).keyup(function(e) { + if (e.keyCode == 27) { + $('avatar').removeClass('maximized'); + } + }); }; }); |