mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
compose: Create a separate "New stream message" title editing function.
To reduce code duplication, create a new function for editing the "New stream message" button title.
This commit is contained in:
committed by
Tim Abbott
parent
62bee26ea7
commit
4dbf59dbaa
@@ -100,14 +100,17 @@ exports.clear_preview_area = function () {
|
|||||||
$("#markdown_preview").show();
|
$("#markdown_preview").show();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function update_stream_button(title) {
|
||||||
|
$("#left_bar_compose_stream_button_big").text(title);
|
||||||
|
$("#left_bar_compose_stream_button_big").prop("title", title);
|
||||||
|
}
|
||||||
|
|
||||||
exports.update_stream_button_for_private = function () {
|
exports.update_stream_button_for_private = function () {
|
||||||
$("#left_bar_compose_stream_button_big").html(i18n.t("New stream message"));
|
update_stream_button(i18n.t("New stream message"));
|
||||||
$("#left_bar_compose_stream_button_big").prop("title", i18n.t("New stream message"));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.update_stream_button_for_stream = function () {
|
exports.update_stream_button_for_stream = function () {
|
||||||
$("#left_bar_compose_stream_button_big").html(i18n.t("New topic"));
|
update_stream_button(i18n.t("New topic"));
|
||||||
$("#left_bar_compose_stream_button_big").prop("title", i18n.t("New topic"));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function update_fade() {
|
function update_fade() {
|
||||||
|
|||||||
Reference in New Issue
Block a user