mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
lint: Replace local variables named 'msgid' with 'message_id'.
Follow up of commit 2a1305d. Replace all local variables named 'msgid'
with 'message_id' in all JS and HTML files, and adds a linter rule for
it as well.
Resolves #12952.
This commit is contained in:
@@ -704,24 +704,24 @@ exports.reify_message_id = function (opts) {
|
||||
// update that link as well
|
||||
_.each($('#out-of-view-notification a'), function (e) {
|
||||
var elem = $(e);
|
||||
var msgid = elem.data('msgid');
|
||||
var message_id = elem.data('message-id');
|
||||
|
||||
if (msgid === old_id) {
|
||||
elem.data('msgid', new_id);
|
||||
if (message_id === old_id) {
|
||||
elem.data('message-id', new_id);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
exports.register_click_handlers = function () {
|
||||
$('#out-of-view-notification').on('click', '.compose_notification_narrow_by_topic', function (e) {
|
||||
var msgid = $(e.currentTarget).data('msgid');
|
||||
narrow.by_topic(msgid, {trigger: 'compose_notification'});
|
||||
var message_id = $(e.currentTarget).data('message-id');
|
||||
narrow.by_topic(message_id, {trigger: 'compose_notification'});
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
});
|
||||
$('#out-of-view-notification').on('click', '.compose_notification_scroll_to_message', function (e) {
|
||||
var msgid = $(e.currentTarget).data('msgid');
|
||||
current_msg_list.select_id(msgid);
|
||||
var message_id = $(e.currentTarget).data('message-id');
|
||||
current_msg_list.select_id(message_id);
|
||||
navigate.scroll_to_selected();
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user