From a90532e074408bd67cd4b7a7a4c266703a386934 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 21 Dec 2016 13:36:27 -0800 Subject: [PATCH] admin: Clean up Zulip labs changing reloading browser. --- static/js/settings.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/settings.js b/static/js/settings.js index f0ebfd0e55..3c31117af0 100644 --- a/static/js/settings.js +++ b/static/js/settings.js @@ -761,7 +761,8 @@ function _setup_page() { }); }); - $("#ui-settings").on("click", "input[name='change_settings']", function () { + $("#ui-settings").on("click", "input[name='change_settings']", function (e) { + e.preventDefault(); var labs_updates = {}; _.each(["autoscroll_forever", "default_desktop_notifications"], function (setting) { @@ -772,7 +773,7 @@ function _setup_page() { url: '/json/ui_settings/change', data: labs_updates, success: function (resp, statusText, xhr) { - var message = i18n.t("Updated __product_name__ Labs settings!", page_params); + var message = i18n.t("Updated __product_name__ Labs settings! You will need to reload for these changes to take effect.", page_params); var result = JSON.parse(xhr.responseText); var ui_settings_status = $('#ui-settings-status').expectOne();