mirror of https://github.com/zulip/zulip.git
user settings: Add link to user profile popover.
Add button to view current user's profile popover from user settings page.
This commit is contained in:
parent
4049a08b88
commit
9a09513b4d
|
@ -177,7 +177,7 @@ exports.hide_user_profile = function () {
|
|||
$("#user-profile-modal").modal("hide");
|
||||
};
|
||||
|
||||
function show_user_profile(element, user) {
|
||||
exports.show_user_profile = function (element, user) {
|
||||
popovers.hide_all();
|
||||
|
||||
var profile_data = [];
|
||||
|
@ -253,7 +253,7 @@ function show_user_profile(element, user) {
|
|||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function get_user_info_popover_items() {
|
||||
if (!current_message_info_popover_elem) {
|
||||
|
@ -707,7 +707,7 @@ exports.register_click_handlers = function () {
|
|||
$('body').on('click', '.info_popover_actions .view_user_profile', function (e) {
|
||||
var user_id = $(e.target).parents('ul').attr('data-user-id');
|
||||
var user = people.get_person_from_user_id(user_id);
|
||||
show_user_profile(e.target, user);
|
||||
exports.show_user_profile(e.target, user);
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
});
|
||||
|
|
|
@ -447,6 +447,14 @@ exports.set_up = function () {
|
|||
}, 5000);
|
||||
});
|
||||
|
||||
$("#show_my_user_profile_modal").on('click', function (e) {
|
||||
overlays.close_overlay("settings");
|
||||
var user = people.get_person_from_user_id(people.my_current_user_id());
|
||||
setTimeout(function () {
|
||||
popovers.show_user_profile(e.target, user);
|
||||
}, 100);
|
||||
});
|
||||
|
||||
|
||||
function upload_avatar(file_input) {
|
||||
var form_data = new FormData();
|
||||
|
|
|
@ -127,6 +127,9 @@
|
|||
<h3 class="inline-block" id="custom-field-header" {{#unless page_params.custom_profile_fields}}style="display: none"{{/unless}}>{{t "Profile" }}</h3>
|
||||
<div class="alert-notification" id="custom-field-status"></div>
|
||||
<form class="form-horizontal custom-profile-fields-form grid"></form>
|
||||
<button class="button rounded sea-green w-200 block" id="show_my_user_profile_modal">
|
||||
{{t 'View my profile' }}
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue