mirror of https://github.com/nextcloud/contacts
Fix call & add remove avatar preview removal
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
90fd40a263
commit
a7abddec09
|
@ -7,6 +7,7 @@ angular.module('contactsApp')
|
|||
ctrl.removePhoto = function() {
|
||||
ctrl.contact.removeProperty('photo', ctrl.contact.getProperty('photo'));
|
||||
ContactService.update(ctrl.contact);
|
||||
$('avatar').removeClass('maximized');
|
||||
};
|
||||
|
||||
ctrl.downloadPhoto = function() {
|
||||
|
@ -40,17 +41,19 @@ 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');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Quit avatar preview
|
||||
$('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');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue