mirror of https://github.com/zulip/zulip.git
settings: Nest PM content setting in Desktop notification setting.
Fixes #5879
This commit is contained in:
parent
0e25055c1d
commit
e21c3e1cb7
|
@ -74,6 +74,16 @@ exports.set_up = function () {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#enable_desktop_notifications").change(function () {
|
||||
if (this.checked) {
|
||||
$("#pm_content_in_desktop_notifications").removeAttr("disabled");
|
||||
$("#pm_content_in_desktop_notifications_label").parent().removeClass("control-label-disabled");
|
||||
} else {
|
||||
$("#pm_content_in_desktop_notifications").attr("disabled", true);
|
||||
$("#pm_content_in_desktop_notifications_label").parent().addClass("control-label-disabled");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function _update_page() {
|
||||
|
|
|
@ -60,16 +60,17 @@
|
|||
</label>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group disableable {{#unless page_params.enable_desktop_notifications}}control-label-disabled{{/unless}}">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="pm_content_in_desktop_notifications"
|
||||
id="pm_content_in_desktop_notifications"
|
||||
{{#unless page_params.enable_desktop_notifications}}disabled="disabled"{{/unless}}
|
||||
{{#if page_params.pm_content_in_desktop_notifications}}
|
||||
checked="checked"
|
||||
{{/if}} />
|
||||
<span></span>
|
||||
</label>
|
||||
<label for="pm_content_in_desktop_notifications" class="inline-block">
|
||||
<label for="pm_content_in_desktop_notifications" id="pm_content_in_desktop_notifications_label" class="inline-block">
|
||||
{{t "Include content of private messages in desktop notifications" }}
|
||||
</label>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue