mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-08 05:34:41 +02:00
* Minor work on fse class. Experimental handling of submit/etc. directly
This commit is contained in:
parent
40e1e1bea8
commit
08bebb560d
4 changed files with 61 additions and 0 deletions
|
@ -255,6 +255,11 @@ function FullScreenEditor(options) {
|
|||
from.acceptsFocus = false;
|
||||
from.setText(self.client.user.username);
|
||||
|
||||
callback(null);
|
||||
},
|
||||
function setInitialFocus(callback) {
|
||||
self.viewControllers.body.setFocus(false);
|
||||
self.viewControllers.header.switchFocus(2);
|
||||
callback(null);
|
||||
}
|
||||
],
|
||||
|
@ -263,6 +268,15 @@ function FullScreenEditor(options) {
|
|||
}
|
||||
);
|
||||
};
|
||||
|
||||
this.initObservers = function() {
|
||||
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);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
require('util').inherits(FullScreenEditor, events.EventEmitter);
|
||||
|
@ -283,6 +297,10 @@ FullScreenEditor.prototype.enter = function() {
|
|||
self.createInitialViews(function viewsCreated(err) {
|
||||
callback(err);
|
||||
});
|
||||
},
|
||||
function prepObservers(callback) {
|
||||
self.initObservers();
|
||||
callback(null);
|
||||
}
|
||||
],
|
||||
function complete(err) {
|
||||
|
@ -294,3 +312,5 @@ FullScreenEditor.prototype.enter = function() {
|
|||
FullScreenEditor.prototype.leave = function() {
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue