mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-25 03:58:17 +02:00
* SEXYZ: XModem & YModem
* Explicit sort avail to protocols * MenuView.removeItem() * Natural sort for more things * Fix some issues with HorizontalMenuView redraw/update * Sanatize non-blind upload filename (security) * Validator on non-blind upload filename
This commit is contained in:
parent
8261881e3e
commit
ff64a7aed5
10 changed files with 161 additions and 45 deletions
|
@ -454,7 +454,7 @@ ViewController.prototype.resetInitialFocus = function() {
|
|||
if(this.formInitialFocusId) {
|
||||
return this.switchFocus(this.formInitialFocusId);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ViewController.prototype.switchFocus = function(id) {
|
||||
//
|
||||
|
@ -480,15 +480,19 @@ ViewController.prototype.switchFocus = function(id) {
|
|||
};
|
||||
|
||||
ViewController.prototype.nextFocus = function() {
|
||||
var nextId;
|
||||
let nextFocusView = this.focusedView ? this.focusedView : this.views[this.firstId];
|
||||
|
||||
if(!this.focusedView) {
|
||||
nextId = this.views[this.firstId].id;
|
||||
} else {
|
||||
nextId = this.views[this.focusedView.id].nextId;
|
||||
// find the next view that accepts focus
|
||||
while(nextFocusView && nextFocusView.nextId) {
|
||||
nextFocusView = this.getView(nextFocusView.nextId);
|
||||
if(!nextFocusView || nextFocusView.acceptsFocus) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.switchFocus(nextId);
|
||||
if(nextFocusView && this.focusedView !== nextFocusView) {
|
||||
this.switchFocus(nextFocusView.id);
|
||||
}
|
||||
};
|
||||
|
||||
ViewController.prototype.setViewOrder = function(order) {
|
||||
|
@ -507,7 +511,6 @@ ViewController.prototype.setViewOrder = function(order) {
|
|||
}
|
||||
|
||||
if(viewIdOrder.length > 0) {
|
||||
var view;
|
||||
var count = viewIdOrder.length - 1;
|
||||
for(var i = 0; i < count; ++i) {
|
||||
this.views[viewIdOrder[i]].nextId = viewIdOrder[i + 1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue