fix new task/event context, add keystroke to create task
This commit is contained in:
Vendored
+5
-2
@@ -2435,6 +2435,7 @@
|
|||||||
};
|
};
|
||||||
// view
|
// view
|
||||||
this.open = () => {
|
this.open = () => {
|
||||||
|
console.log(this);
|
||||||
this.coreViewModel.context = this;
|
this.coreViewModel.context = this;
|
||||||
this.containingModel.selectTask(this);
|
this.containingModel.selectTask(this);
|
||||||
};
|
};
|
||||||
@@ -2584,7 +2585,7 @@
|
|||||||
this,
|
this,
|
||||||
taskFileContent
|
taskFileContent
|
||||||
);
|
);
|
||||||
this.selectTask(taskViewModel);
|
taskViewModel.open();
|
||||||
this.updateTaskIndices();
|
this.updateTaskIndices();
|
||||||
};
|
};
|
||||||
// view
|
// view
|
||||||
@@ -2642,7 +2643,7 @@
|
|||||||
this,
|
this,
|
||||||
taskFileContent
|
taskFileContent
|
||||||
);
|
);
|
||||||
this.selectTask(taskViewModel);
|
taskViewModel.open();
|
||||||
this.updateTaskIndices();
|
this.updateTaskIndices();
|
||||||
};
|
};
|
||||||
this.getEventsForDate = () => {
|
this.getEventsForDate = () => {
|
||||||
@@ -2757,6 +2758,7 @@
|
|||||||
this.registerKeyStroke("-" /* Reset */, this.showToday);
|
this.registerKeyStroke("-" /* Reset */, this.showToday);
|
||||||
this.registerKeyStroke("p", this.showNextMonth);
|
this.registerKeyStroke("p", this.showNextMonth);
|
||||||
this.registerKeyStroke("o", this.showPreviousMonth);
|
this.registerKeyStroke("o", this.showPreviousMonth);
|
||||||
|
this.registerKeyStroke(";" /* Create */, this.createEvent);
|
||||||
this.chatViewModel.registerContext("calendar" /* Calendar */, this);
|
this.chatViewModel.registerContext("calendar" /* Calendar */, this);
|
||||||
}
|
}
|
||||||
// data
|
// data
|
||||||
@@ -3384,6 +3386,7 @@
|
|||||||
this.registerKeyStroke("backspace" /* CloseOrCancel */, this.hideFilterModal);
|
this.registerKeyStroke("backspace" /* CloseOrCancel */, this.hideFilterModal);
|
||||||
this.registerKeyStroke("," /* Settings */, this.showSettings);
|
this.registerKeyStroke("," /* Settings */, this.showSettings);
|
||||||
this.registerKeyStroke("enter" /* Apply */, this.hideSettings);
|
this.registerKeyStroke("enter" /* Apply */, this.hideSettings);
|
||||||
|
this.registerKeyStroke(";" /* Create */, this.createTask);
|
||||||
this.taskPageViewModel.registerContext(this.boardInfo.fileId, this);
|
this.taskPageViewModel.registerContext(this.boardInfo.fileId, this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ export enum CommonKeys {
|
|||||||
CloseOrCancel = "backspace",
|
CloseOrCancel = "backspace",
|
||||||
Apply = "enter",
|
Apply = "enter",
|
||||||
Settings = ",",
|
Settings = ",",
|
||||||
|
Create = ";",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -311,6 +311,7 @@ export default class BoardViewModel extends TaskContainingPageViewModel {
|
|||||||
this.registerKeyStroke(CommonKeys.CloseOrCancel, this.hideFilterModal);
|
this.registerKeyStroke(CommonKeys.CloseOrCancel, this.hideFilterModal);
|
||||||
this.registerKeyStroke(CommonKeys.Settings, this.showSettings);
|
this.registerKeyStroke(CommonKeys.Settings, this.showSettings);
|
||||||
this.registerKeyStroke(CommonKeys.Apply, this.hideSettings);
|
this.registerKeyStroke(CommonKeys.Apply, this.hideSettings);
|
||||||
|
this.registerKeyStroke(CommonKeys.Create, this.createTask);
|
||||||
|
|
||||||
this.taskPageViewModel.registerContext(this.boardInfo.fileId, this);
|
this.taskPageViewModel.registerContext(this.boardInfo.fileId, this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export default class CalendarPageViewModel extends TaskContainingPageViewModel {
|
|||||||
taskFileContent,
|
taskFileContent,
|
||||||
);
|
);
|
||||||
|
|
||||||
this.selectTask(taskViewModel);
|
taskViewModel.open();
|
||||||
this.updateTaskIndices();
|
this.updateTaskIndices();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -215,6 +215,7 @@ export default class CalendarPageViewModel extends TaskContainingPageViewModel {
|
|||||||
this.registerKeyStroke(CommonKeys.Reset, this.showToday);
|
this.registerKeyStroke(CommonKeys.Reset, this.showToday);
|
||||||
this.registerKeyStroke("p", this.showNextMonth);
|
this.registerKeyStroke("p", this.showNextMonth);
|
||||||
this.registerKeyStroke("o", this.showPreviousMonth);
|
this.registerKeyStroke("o", this.showPreviousMonth);
|
||||||
|
this.registerKeyStroke(CommonKeys.Create, this.createEvent);
|
||||||
|
|
||||||
this.chatViewModel.registerContext(ChatPageTypes.Calendar, this);
|
this.chatViewModel.registerContext(ChatPageTypes.Calendar, this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export default class TaskContainingPageViewModel extends Context {
|
|||||||
this,
|
this,
|
||||||
taskFileContent,
|
taskFileContent,
|
||||||
);
|
);
|
||||||
this.selectTask(taskViewModel);
|
taskViewModel.open();
|
||||||
this.updateTaskIndices();
|
this.updateTaskIndices();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ export default class TaskViewModel extends Context {
|
|||||||
|
|
||||||
// view
|
// view
|
||||||
open = (): void => {
|
open = (): void => {
|
||||||
|
console.log(this);
|
||||||
this.coreViewModel.context = this;
|
this.coreViewModel.context = this;
|
||||||
this.containingModel.selectTask(this);
|
this.containingModel.selectTask(this);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user