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:
Vinit Singh
2019-08-28 21:16:10 +05:30
committed by Tim Abbott
parent c6fb8c048a
commit d09a80260b
8 changed files with 28 additions and 26 deletions

View File

@@ -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();