forked from zulip/zulip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
todo_list: Add option for modal to create todo-lists.
Previously, the `/todo` slash command was the sole method for creating todos. Now, a button has been introduced to launch a modal for creating todo-lists directly from the compose box. This button becomes enabled only when the compose box is empty, thereby avoiding complexities associated with losing or having to save drafts of any messages already being composed. 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.ts`, and `poll_modal.ts` is now deprecated. Fixes: zulip#29779.
- Loading branch information
1 parent
7038df4
commit 5b83e6a
Showing
11 changed files
with
193 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<form id="add-todo-form" class="new-style"> | ||
<label class="todo-label">{{t "To-do list title"}}</label> | ||
<div class="todo-title-input-container"> | ||
<input type="text" id="todo-title-input" class="modal_text_input" placeholder="{{t 'Task list'}}" /> | ||
</div> | ||
<label class="todo-label">{{t "Tasks"}}</label> | ||
<p>{{t "Anyone can add more tasks after the to-do list is posted."}}</p> | ||
<ul class="todo-options-list" data-simplebar> | ||
{{> todo_modal_task }} | ||
{{> todo_modal_task }} | ||
{{> todo_modal_task }} | ||
</ul> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<li class="option-row"> | ||
<i class="zulip-icon zulip-icon-grip-vertical drag-icon"></i> | ||
<input type="text" class="todo-input modal_text_input" placeholder="{{t 'New task'}}" /> | ||
<input type="text" class="todo-description-input modal_text_input" placeholder="{{t 'Task description (optional)'}}" /> | ||
<button type="button" class="button rounded small btn-secondary delete-option" title="{{t 'Delete' }}"> | ||
<i class="fa fa-trash-o" aria-hidden="true"></i> | ||
</button> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters