summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3916a89)
This makes tagging a bunch of tasks with the same tag easier.
function BrowserUI() {
var currentViewState = "todo";
var taskFocusedBeforeJumpingToInput: HTMLElement | null = null;
function BrowserUI() {
var currentViewState = "todo";
var taskFocusedBeforeJumpingToInput: HTMLElement | null = null;
+ var lastTagNameEntered = "";
return {
addTask: function (event: KeyboardEvent) {
const input = <HTMLInputElement>document.getElementById("taskName");
return {
addTask: function (event: KeyboardEvent) {
const input = <HTMLInputElement>document.getElementById("taskName");
const input = document.createElement("input");
input.classList.add("tag");
input.addEventListener("blur", this.completeTagEdit, { once: true });
const input = document.createElement("input");
input.classList.add("tag");
input.addEventListener("blur", this.completeTagEdit, { once: true });
+ input.value = lastTagNameEntered;
task.appendChild(input);
input.focus();
task.appendChild(input);
input.focus();
event.preventDefault();
},
event.preventDefault();
},
task.focus();
if (!Model.hasTag(task, newTagName)) {
ui.addTag(task.getAttribute("data-created")!, newTagName);
task.focus();
if (!Model.hasTag(task, newTagName)) {
ui.addTag(task.getAttribute("data-created")!, newTagName);
+ lastTagNameEntered = newTagName;