Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
todo_widget: Fix /todo checkboxes to match style used in menus.
Manan Rathif3469ac3c8ec
diff --git a/static/js/todo_widget.js b/static/js/todo_widget.jsindex d0a3133ebb9..b5ec3262498 100644--- a/static/js/todo_widget.js+++ b/static/js/todo_widget.js@@ -191,7 +191,7 @@ export function activate(opts) {elem.find("ul.todo-widget").html(html);elem.find(".widget-error").text("");- elem.find("button.task").on("click", (e) => {+ elem.find("input.task").on("click", (e) => {e.stopPropagation();const key = $(e.target).attr("data-key");diff --git a/static/templates/widgets/todo_widget.hbs b/static/templates/widgets/todo_widget.hbsindex a46a8a578aa..ed8aad5a831 100644--- a/static/templates/widgets/todo_widget.hbs+++ b/static/templates/widgets/todo_widget.hbs@@ -6,6 +6,6 @@<button class="add-task">{{t "Add task" }}</button><div class="widget-error"></div></div>- <ul class="todo-widget">+ <ul class="todo-widget new-style"></ul></div>diff --git a/static/templates/widgets/todo_widget_tasks.hbs b/static/templates/widgets/todo_widget_tasks.hbsindex de9fb44399e..3b9dcb90da5 100644--- a/static/templates/widgets/todo_widget_tasks.hbs+++ b/static/templates/widgets/todo_widget_tasks.hbs@@ -1,16 +1,20 @@<br />{{#each pending_tasks}}<li>- <button class="task" data-key="{{ key }}">- </button>- <span class="task"><strong>{{ task }}</strong>{{#if desc }} - {{ desc }}{{/if}}</span>+ <label class="checkbox">+ <input type="checkbox" class="task" data-key="{{ key }}" />+ <span></span>+ <strong>{{ task }}</strong>{{#if desc }} - {{ desc }}{{/if}}+ </label>+</li>{{/each}}{{#each completed_tasks}}<li>- <button class="task-completed task" data-key="{{ key }}">- <img class="task-completed" src="/static/images/checkbox-green.svg" data-key="{{ key }}"/>- </button>- <span class="task"><strike><em><strong>{{ task }}</strong>{{#if desc }} - {{ desc }}{{/if}}</em></strike></span>+ <label class="checkbox">+ <input type="checkbox" class="task" data-key="{{ key }}" checked="checked"/>+ <span></span>+ <strike><em><strong>{{ task }}</strong>{{#if desc }} - {{ desc }}{{/if}}</em></strike>+ </label></li>{{/each}}