mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 22:54:37 +02:00
* Pass 'key' object to actions & submit form events
This commit is contained in:
parent
08bebb560d
commit
6d49e5e55f
5 changed files with 56 additions and 14 deletions
|
@ -270,10 +270,18 @@ function FullScreenEditor(options) {
|
|||
};
|
||||
|
||||
this.initObservers = function() {
|
||||
// :TODO: Should probably still allow key mapping/etc. to come from module for this stuff
|
||||
|
||||
this.viewControllers.header.on('submit', function headerSubmit(formData, extraArgs) {
|
||||
if(formData.id === self.getFormId('header')) {
|
||||
self.viewControllers.header.setFocus(false);
|
||||
self.viewControllers.body.switchFocus(1);
|
||||
// :TODO: we need to validate the "to" here
|
||||
self.viewControllers.header.setFocus(false);
|
||||
self.viewControllers.body.switchFocus(1);
|
||||
});
|
||||
|
||||
this.viewControllers.body.on('submit', function bodySubmit(formData, extraArgs) {
|
||||
|
||||
if(formData.key && 'escape' === formData.key.name) {
|
||||
console.log('toggle menu depending on mode...')
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue