mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
popovers: Rename data-owner-id and data-bot-owner-id to data-user-id.
We rename data-bot-owner-id and data-owner-id, used to open user profile of bot owners, to data-user-id such that we can make a global click handler for all of them by making a separate class in next commit.
This commit is contained in:
@@ -853,7 +853,7 @@ exports.register_click_handlers = function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("body").on("click", ".bot-owner-name", (e) => {
|
$("body").on("click", ".bot-owner-name", (e) => {
|
||||||
const user_id = parseInt($(e.target).attr("data-bot-owner-id"), 10);
|
const user_id = parseInt($(e.target).attr("data-user-id"), 10);
|
||||||
const user = people.get_by_user_id(user_id);
|
const user = people.get_by_user_id(user_id);
|
||||||
exports.show_user_profile(user);
|
exports.show_user_profile(user);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -585,7 +585,7 @@ function handle_reactivation(tbody, status_field) {
|
|||||||
|
|
||||||
function handle_bot_owner_profile(tbody) {
|
function handle_bot_owner_profile(tbody) {
|
||||||
tbody.on("click", ".user_row .view_user_profile", (e) => {
|
tbody.on("click", ".user_row .view_user_profile", (e) => {
|
||||||
const owner_id = parseInt($(e.target).attr("data-owner-id"), 10);
|
const owner_id = parseInt($(e.target).attr("data-user-id"), 10);
|
||||||
const owner = people.get_by_user_id(owner_id);
|
const owner = people.get_by_user_id(owner_id);
|
||||||
popovers.show_user_profile(owner);
|
popovers.show_user_profile(owner);
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
{{#if no_owner }}
|
{{#if no_owner }}
|
||||||
{{bot_owner_full_name}}
|
{{bot_owner_full_name}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<a data-owner-id="{{bot_owner_id}}" href="#" class="view_user_profile">{{bot_owner_full_name}}</a>
|
<a data-user-id="{{bot_owner_id}}" href="#" class="view_user_profile">{{bot_owner_full_name}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
{{#if is_bot}}
|
{{#if is_bot}}
|
||||||
{{#if bot_owner}}
|
{{#if bot_owner}}
|
||||||
<li>{{#tr this}}Owner{{/tr}}:
|
<li>{{#tr this}}Owner{{/tr}}:
|
||||||
<span class="bot-owner-name" data-bot-owner-id='{{ bot_owner.user_id }}'>
|
<span class="bot-owner-name" data-user-id='{{ bot_owner.user_id }}'>
|
||||||
{{bot_owner.full_name}}
|
{{bot_owner.full_name}}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user