mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
settings: Nest PM content setting in Desktop notification setting.
Fixes #5879
This commit is contained in:
@@ -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() {
|
function _update_page() {
|
||||||
|
|||||||
@@ -60,16 +60,17 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-group">
|
<div class="input-group disableable {{#unless page_params.enable_desktop_notifications}}control-label-disabled{{/unless}}">
|
||||||
<label class="checkbox">
|
<label class="checkbox">
|
||||||
<input type="checkbox" name="pm_content_in_desktop_notifications"
|
<input type="checkbox" name="pm_content_in_desktop_notifications"
|
||||||
id="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}}
|
{{#if page_params.pm_content_in_desktop_notifications}}
|
||||||
checked="checked"
|
checked="checked"
|
||||||
{{/if}} />
|
{{/if}} />
|
||||||
<span></span>
|
<span></span>
|
||||||
</label>
|
</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" }}
|
{{t "Include content of private messages in desktop notifications" }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user