mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
settings: Change save and discard button look and feel.
This commit changes the way the save and discard buttons on the organization profile, settings and permissions tabs look and fades them out after a delay. It also cleans up the code a bit in the settings_org.js file. It introduces changes to the css in settings.css as well as the template for save-discard buttons. It also fixes a bug on the user settings whereby if an option that requires reload is clicked before clicking an option that does not require reload, the reload message is erased. This could create an issue where the user is not aware that a reload is required. The loader is also changed to using fa-icon as loading spinner on user settings and the colors are tweaked a little bit.
This commit is contained in:
committed by
Tim Abbott
parent
9a0fdf5b8d
commit
58d07fabef
@@ -7,10 +7,18 @@ var meta = {
|
||||
};
|
||||
|
||||
function change_display_setting(data, status_element, success_msg, sticky) {
|
||||
var $status_el = $(status_element);
|
||||
var status_is_sticky = $status_el.data('is_sticky');
|
||||
var display_message = (status_is_sticky) ? $status_el.data('sticky_msg') : success_msg;
|
||||
var opts = {
|
||||
success_msg: success_msg,
|
||||
sticky: sticky,
|
||||
success_msg: display_message,
|
||||
sticky: status_is_sticky || sticky,
|
||||
};
|
||||
|
||||
if (sticky) {
|
||||
$status_el.data('is_sticky', true);
|
||||
$status_el.data('sticky_msg', success_msg);
|
||||
}
|
||||
settings_ui.do_settings_change(channel.patch, '/json/settings/display', data, status_element, opts);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user