mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +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,12 +1,12 @@
 | 
			
		||||
var render_settings_tab = require('../templates/settings_tab.hbs');
 | 
			
		||||
const render_settings_tab = require('../templates/settings_tab.hbs');
 | 
			
		||||
 | 
			
		||||
$("body").ready(function () {
 | 
			
		||||
    var $sidebar = $(".form-sidebar");
 | 
			
		||||
    var $targets = $sidebar.find("[data-target]");
 | 
			
		||||
    var $title = $sidebar.find(".title h1");
 | 
			
		||||
    var is_open = false;
 | 
			
		||||
    const $sidebar = $(".form-sidebar");
 | 
			
		||||
    const $targets = $sidebar.find("[data-target]");
 | 
			
		||||
    const $title = $sidebar.find(".title h1");
 | 
			
		||||
    let is_open = false;
 | 
			
		||||
 | 
			
		||||
    var close_sidebar = function () {
 | 
			
		||||
    const close_sidebar = function () {
 | 
			
		||||
        $sidebar.removeClass("show");
 | 
			
		||||
        $sidebar.find("#edit_bot").empty();
 | 
			
		||||
        is_open = false;
 | 
			
		||||
@@ -14,7 +14,7 @@ $("body").ready(function () {
 | 
			
		||||
 | 
			
		||||
    exports.trigger_sidebar = function (target) {
 | 
			
		||||
        $targets.hide();
 | 
			
		||||
        var $target = $(".form-sidebar").find("[data-target='" + target + "']");
 | 
			
		||||
        const $target = $(".form-sidebar").find("[data-target='" + target + "']");
 | 
			
		||||
 | 
			
		||||
        $title.text($target.attr("data-title"));
 | 
			
		||||
        $target.show();
 | 
			
		||||
@@ -98,7 +98,7 @@ function setup_settings_label() {
 | 
			
		||||
exports.build_page = function () {
 | 
			
		||||
    setup_settings_label();
 | 
			
		||||
 | 
			
		||||
    var rendered_settings_tab = render_settings_tab({
 | 
			
		||||
    const rendered_settings_tab = render_settings_tab({
 | 
			
		||||
        full_name: people.my_full_name(),
 | 
			
		||||
        page_params: page_params,
 | 
			
		||||
        enable_sound_select: page_params.enable_sounds ||
 | 
			
		||||
@@ -132,7 +132,7 @@ exports.launch = function (section) {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports.set_settings_header = function (key) {
 | 
			
		||||
    var header_text = $(`#settings_page .sidebar-list [data-section='${key}'] .text`).text();
 | 
			
		||||
    const header_text = $(`#settings_page .sidebar-list [data-section='${key}'] .text`).text();
 | 
			
		||||
    if (header_text) {
 | 
			
		||||
        $(".settings-header h1 .section").text(" / " + header_text);
 | 
			
		||||
    } else {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user