mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-11 23:24:43 +02:00
* Add rumorz mod
* ANSI/pipe working properly in VerticalMenuView * Fix bug in renderStringLength() * Make initSequence() part of prototype chain for inheritance * Use proper 'desc' field vs 'status' for menus when setting client/user status * Move pipeToAnsi() to setItems/setFocusItems vs every render * Add %RR random rumor MCI * Predefined MCI's can be init @ startup - RR uses random as a test bed * Add some StatLog functionality for ordering, keep forever, etc. * Fix TextView redraw issue * Better VerticalMenuView drawItem() logic * Add 'key press' emit for View * Enable formats for BBS list - works with MCI * Remove old system_property.js
This commit is contained in:
parent
2b68201f7d
commit
30ba609fb4
13 changed files with 492 additions and 241 deletions
|
@ -23,7 +23,6 @@ function ViewController(options) {
|
|||
assert(_.isObject(options));
|
||||
assert(_.isObject(options.client));
|
||||
|
||||
|
||||
events.EventEmitter.call(this);
|
||||
|
||||
var self = this;
|
||||
|
@ -83,28 +82,28 @@ function ViewController(options) {
|
|||
|
||||
this.viewActionListener = function(action, key) {
|
||||
switch(action) {
|
||||
case 'next' :
|
||||
self.emit('action', { view : this, action : action, key : key });
|
||||
self.nextFocus();
|
||||
break;
|
||||
|
||||
case 'accept' :
|
||||
if(self.focusedView && self.focusedView.submit) {
|
||||
// :TODO: need to do validation here!!!
|
||||
var focusedView = self.focusedView;
|
||||
self.validateView(focusedView, function validated(err, newFocusedViewId) {
|
||||
if(err) {
|
||||
var newFocusedView = self.getView(newFocusedViewId) || focusedView;
|
||||
self.setViewFocusWithEvents(newFocusedView, true);
|
||||
} else {
|
||||
self.submitForm(key);
|
||||
}
|
||||
});
|
||||
//self.submitForm(key);
|
||||
} else {
|
||||
case 'next' :
|
||||
self.emit('action', { view : this, action : action, key : key });
|
||||
self.nextFocus();
|
||||
}
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'accept' :
|
||||
if(self.focusedView && self.focusedView.submit) {
|
||||
// :TODO: need to do validation here!!!
|
||||
var focusedView = self.focusedView;
|
||||
self.validateView(focusedView, function validated(err, newFocusedViewId) {
|
||||
if(err) {
|
||||
var newFocusedView = self.getView(newFocusedViewId) || focusedView;
|
||||
self.setViewFocusWithEvents(newFocusedView, true);
|
||||
} else {
|
||||
self.submitForm(key);
|
||||
}
|
||||
});
|
||||
//self.submitForm(key);
|
||||
} else {
|
||||
self.nextFocus();
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue