The day you press is the day that is saved
Browse files at this commitc9b8984df23a578d9f1f6deba1aafc40688d2040Parent: a85a030- fix
- the day you press is the day that is saved
1 changed file +9 -5
crates/izlek-web/src/detail.rsmodified+9 -5
| @@ -1120,6 +1120,14 @@ async fn description_control(cx: &Cx, task: &TaskDetail, may_write: bool, lang: | |||
| 1120 | } | 1120 | } |
| 1121 | } | 1121 | } |
| 1122 | 1122 | ||
| 1123 | +/// The deadline field: a calendar popover that commits on the day you press. | ||
| 1124 | +/// | ||
| 1125 | +/// It used to carry Save and Cancel under the grid, which put the commit two | ||
| 1126 | +/// gestures away from the choice — and picking a day closes the popover, so | ||
| 1127 | +/// the Save it was waiting for was no longer on screen. Every date chosen | ||
| 1128 | +/// this way was silently discarded. The grid now autosubmits, the way the | ||
| 1129 | +/// log filters already did, and closing is what Escape and a click outside | ||
| 1130 | +/// are for. | ||
| 1123 | async fn deadline_control( | 1131 | async fn deadline_control( |
| 1124 | cx: &Cx, | 1132 | cx: &Cx, |
| 1125 | task: &TaskDetail, | 1133 | task: &TaskDetail, |
| @@ -1160,11 +1168,7 @@ async fn deadline_control( | |||
| 1160 | <div class="edit-form pop-panel datepick-panel"> | 1168 | <div class="edit-form pop-panel datepick-panel"> |
| 1161 | <form class="pop-form" method="post" action="/api/save_task"> | 1169 | <form class="pop-form" method="post" action="/api/save_task"> |
| 1162 | <input type="hidden" name="task_id" value=(task.id.clone())> | 1170 | <input type="hidden" name="task_id" value=(task.id.clone())> |
| 1163 | - (datepicker_grid(cx, "deadline", &input_value, false, lang).await?) | 1171 | + (datepicker_grid(cx, "deadline", &input_value, true, lang).await?) |
| 1164 | - <div class="edit-row"> | ||
| 1165 | - <button class="edit-save" type="submit">(t(lang, Key::Save))</button> | ||
| 1166 | - <label class="edit-cancel" for=(toggle)>(t(lang, Key::Cancel))</label> | ||
| 1167 | - </div> | ||
| 1168 | </form> | 1172 | </form> |
| 1169 | (refused(cx, "save_task", lang).await?) | 1173 | (refused(cx, "save_task", lang).await?) |
| 1170 | </div> | 1174 | </div> |