mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
Make compose box accessor functions also be setters
(imported from commit ab568cc2c224b8558148f158d1c9c1f89bb1eb49)
This commit is contained in:
@@ -46,24 +46,40 @@ function composing_message() {
|
|||||||
return composing_stream_message() || composing_huddle_message();
|
return composing_stream_message() || composing_huddle_message();
|
||||||
}
|
}
|
||||||
|
|
||||||
function compose_stream_name() {
|
function compose_stream_name(newval) {
|
||||||
return $.trim($("#stream").val());
|
var oldval = $.trim($("#stream").val());
|
||||||
|
if (newval !== undefined) {
|
||||||
|
$("#stream").val(newval);
|
||||||
|
}
|
||||||
|
return oldval;
|
||||||
}
|
}
|
||||||
|
|
||||||
function compose_subject() {
|
function compose_subject(newval) {
|
||||||
return $.trim($("#subject").val());
|
var oldval = $.trim($("#subject").val());
|
||||||
|
if (newval !== undefined) {
|
||||||
|
$("#subject").val(newval);
|
||||||
|
}
|
||||||
|
return oldval;
|
||||||
}
|
}
|
||||||
|
|
||||||
function compose_message() {
|
function compose_message(newval) {
|
||||||
return $.trim($("#new_message_content").val());
|
var oldval = $.trim($("#new_message_content").val());
|
||||||
|
if (newval !== undefined) {
|
||||||
|
$("#new_message_content").val(newval);
|
||||||
|
}
|
||||||
|
return oldval;
|
||||||
}
|
}
|
||||||
|
|
||||||
function compose_recipient() {
|
function compose_recipient(newval) {
|
||||||
return $.trim($("#huddle_recipient").val());
|
var oldval = $.trim($("#huddle_recipient").val());
|
||||||
|
if (newval !== undefined) {
|
||||||
|
$("#huddle_recipient").val(newval);
|
||||||
|
}
|
||||||
|
return oldval;
|
||||||
}
|
}
|
||||||
|
|
||||||
function compose_huddle_message() {
|
function compose_huddle_message(newval) {
|
||||||
return $.trim($("#new_message_content").val());
|
return compose_message(newval);
|
||||||
}
|
}
|
||||||
|
|
||||||
function compose_error(error_text, bad_input) {
|
function compose_error(error_text, bad_input) {
|
||||||
|
|||||||
Reference in New Issue
Block a user