mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-25 03:58:17 +02:00
* Fix bug assigning wrong default submit view ID
This commit is contained in:
parent
0d2d2602cd
commit
1f409435f4
3 changed files with 10 additions and 7 deletions
|
@ -84,7 +84,6 @@ function ViewController(options) {
|
|||
break;
|
||||
|
||||
case 'accept' : // :TODO: consider naming this 'done'
|
||||
// :TODO: check if id is submit, etc.
|
||||
if(self.focusedView && self.focusedView.submit) {
|
||||
self.submitForm();
|
||||
} else {
|
||||
|
@ -177,6 +176,10 @@ function ViewController(options) {
|
|||
var viewId = parseInt(mciMatch[2]);
|
||||
assert(!isNaN(viewId));
|
||||
|
||||
if(viewId > highestId) {
|
||||
highestId = viewId;
|
||||
}
|
||||
|
||||
var view = self.getView(viewId);
|
||||
|
||||
if(!view) {
|
||||
|
@ -207,8 +210,7 @@ function ViewController(options) {
|
|||
|
||||
nextItem(null);
|
||||
},
|
||||
function complete(err) {
|
||||
|
||||
function complete(err) {
|
||||
// default to highest ID if no 'submit' entry present
|
||||
if(!submitId) {
|
||||
self.getView(highestId).submit = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue