mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
js: Automatically convert var to let and const in most files.
This commit was originally automatically generated using `tools/lint --only=eslint --fix`. It was then modified by tabbott to contain only changes to a set of files that are unlikely to result in significant merge conflicts with any open pull request, excluding about 20 files. His plan is to merge the remaining changes with more precise care, potentially involving merging parts of conflicting pull requests before running the `eslint --fix` operation. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
f7245e9ec6
commit
28f3dfa284
@@ -1,4 +1,4 @@
|
||||
var toggler;
|
||||
let toggler;
|
||||
|
||||
exports.highlight_toggle = function (tab_name) {
|
||||
if (toggler) {
|
||||
@@ -29,9 +29,9 @@ exports.initialize = function () {
|
||||
|
||||
// Handles the collapse/reveal of some tabs in the org settings for non-admins.
|
||||
exports.toggle_org_setting_collapse = function () {
|
||||
var is_collapsed = $(".collapse-org-settings").hasClass("hide-org-settings");
|
||||
var show_fewer_settings_text = i18n.t("Show fewer");
|
||||
var show_more_settings_text = i18n.t("Show more");
|
||||
const is_collapsed = $(".collapse-org-settings").hasClass("hide-org-settings");
|
||||
const show_fewer_settings_text = i18n.t("Show fewer");
|
||||
const show_more_settings_text = i18n.t("Show more");
|
||||
|
||||
if (is_collapsed) {
|
||||
_.each($(".collapse-org-settings"), function (elem) {
|
||||
@@ -55,7 +55,7 @@ exports.toggle_org_setting_collapse = function () {
|
||||
}
|
||||
|
||||
// If current tab is about to be collapsed, go to default tab.
|
||||
var current_tab = $(".org-settings-list .active");
|
||||
const current_tab = $(".org-settings-list .active");
|
||||
if (current_tab.hasClass("hide-org-settings")) {
|
||||
$(location).attr("href", "/#organization/organization-profile");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user