user profile popover: Hide popover when user clicks on edit-profile-btn.

This commit is contained in:
Yashashvi Dave 2018-08-15 23:04:38 +05:30 committed by Tim Abbott
parent 583fde4311
commit 1e27cb18eb
2 changed files with 10 additions and 0 deletions

View File

@ -11,6 +11,7 @@ var noop = function () {};
$.fn.popover = noop; // this will get wrapped by our code
zrequire('popovers');
popovers.hide_user_profile = noop;
set_global('current_msg_list', {});
set_global('page_params', {

View File

@ -173,6 +173,10 @@ function show_user_info_popover(element, user, message) {
}
}
exports.hide_user_profile = function () {
$("#user-profile-modal").modal("hide");
};
function show_user_profile(element, user) {
popovers.hide_all();
@ -676,6 +680,10 @@ exports.register_click_handlers = function () {
e.preventDefault();
});
$('body').on('click', '#user-profile-modal-body .user-profile-modal-edit-button', function () {
exports.hide_user_profile();
});
$('#user_presences').on('click', 'span.arrow', function (e) {
e.stopPropagation();
@ -944,6 +952,7 @@ exports.hide_all = function () {
popovers.hide_user_sidebar_popover();
popovers.hide_userlist_sidebar();
stream_popover.restore_stream_list_size();
popovers.hide_user_profile();
// look through all the popovers that have been added and removed.
list_of_popovers.forEach(function ($o) {