admin: Clean up Zulip labs changing reloading browser.

This commit is contained in:
Tim Abbott 2016-12-21 13:36:27 -08:00
parent 425a55e568
commit a90532e074
1 changed files with 3 additions and 2 deletions

View File

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