mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
todo_list: Add option for modal to create todo-lists.
A button has been introduced to launch a modal for creating todo-lists directly from the compose box. The modal features a form that, upon submission, generates a message using the `/todo` syntax and the data inputted in the form. Subsequently, the content of the compose box is set to this message, which the user can then send. This modal closely parallels the UI for adding a poll; therefore, the poll and todo code has been shifted to a newly created file named `widget_modal.ts`, and `poll_modal.ts` is now deprecated. Co-authored-by: Sujal Shah <sujalshah28092004@gmail.com> Fixes #29779.
This commit is contained in:
@@ -141,7 +141,9 @@ function clear_box(): void {
|
||||
compose_banner.clear_errors();
|
||||
compose_banner.clear_warnings();
|
||||
compose_banner.clear_uploads();
|
||||
$(".compose_control_button_container:has(.add-poll)").removeClass("disabled-on-hover");
|
||||
$(".compose_control_button_container:has(.needs-empty-compose)").removeClass(
|
||||
"disabled-on-hover",
|
||||
);
|
||||
}
|
||||
|
||||
let autosize_callback_opts: ComposeActionsStartOpts;
|
||||
@@ -388,7 +390,9 @@ export let start = (raw_opts: ComposeActionsStartOpts): void => {
|
||||
false,
|
||||
replace_all_without_undo_support,
|
||||
);
|
||||
$(".compose_control_button_container:has(.add-poll)").addClass("disabled-on-hover");
|
||||
$(".compose_control_button_container:has(.needs-empty-compose)").addClass(
|
||||
"disabled-on-hover",
|
||||
);
|
||||
// If we were provided with message content, we might need to
|
||||
// display that it's too long.
|
||||
compose_validate.check_overflow_text($("#send_message_form"));
|
||||
|
||||
Reference in New Issue
Block a user