mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-21 02:05:54 +02:00
* ButtonView is now MCI BT. BN is pre-defined "Board Name"
* Client current theme info loaded & used for e.g. passwordChar * Code cleanup
This commit is contained in:
parent
5eee568586
commit
586f3d60b3
16 changed files with 169 additions and 114 deletions
|
@ -43,91 +43,5 @@ StandardMenuModule.prototype.mciReady = function(mciMap) {
|
|||
console.log(formData);
|
||||
});*/
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
menuUtil.getFormConfig(self.menuConfig, mciMap, function onFormConfig(err, formConfig) {
|
||||
console.log(formConfig);
|
||||
var vc = self.addViewController(new ViewController(self.client));
|
||||
vc.loadFromMCIMap(mciMap);
|
||||
vc.setViewOrder();
|
||||
|
||||
Object.keys(formConfig.mci).forEach(function onFormMci(mci) {
|
||||
var viewId = parseInt(mci[2]);
|
||||
if(formConfig.mci[mci].items && formConfig.mci[mci].items.length > 0) {
|
||||
vc.getView(viewId).setItems(formConfig.mci[mci].items);
|
||||
}
|
||||
});
|
||||
|
||||
//vc.getView(1).setItems(['Login', 'New User', 'Goodbye!']);
|
||||
vc.getView(1).submit = true;
|
||||
vc.switchFocus(1);
|
||||
});
|
||||
*/
|
||||
|
||||
/*
|
||||
{
|
||||
"menuName" : {
|
||||
"form" : [
|
||||
{
|
||||
"mciReq" : [ "MC1", "MC2", ... ],
|
||||
"MC1" : {
|
||||
"text" : "...",
|
||||
"focus" : true,
|
||||
"submit" : true,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
}
|
||||
}*/
|
||||
|
||||
/*
|
||||
if(mciMap.ET1 && mciMap.ET2 && mciMap.BN1 && mciMap.BN2 && mciMap.BN3) {
|
||||
//
|
||||
// Form via EditTextViews and ButtonViews
|
||||
// * ET1 - userName
|
||||
// * ET2 - password
|
||||
// * BN1 - Login
|
||||
// * BN2 - New
|
||||
// * BN3 - Bye!
|
||||
//
|
||||
} else if(mciMap.VM1) {
|
||||
//
|
||||
// Menu via VerticalMenuView
|
||||
//
|
||||
// * VM1 - menu with the following items:
|
||||
// 0 - Login
|
||||
// 1 - New
|
||||
// 2 - Bye!
|
||||
//
|
||||
//var vc = new ViewController(client);
|
||||
var vc = self.addViewController(new ViewController(self.client));
|
||||
|
||||
vc.on('submit', function onSubmit(form) {
|
||||
console.log(form);
|
||||
|
||||
var viewModuleMap = {
|
||||
'0' : 'login',
|
||||
'1' : 'new',
|
||||
'2' : 'logoff',
|
||||
};
|
||||
|
||||
if(0 === form.id && 1 === form.submitId) {
|
||||
console.log(viewModuleMap[form.value[1]]);
|
||||
self.client.gotoMenuModule(viewModuleMap[form.value[1]]);
|
||||
}
|
||||
});
|
||||
|
||||
vc.loadFromMCIMap(mciMap);
|
||||
vc.setViewOrder();
|
||||
// :TODO: Localize
|
||||
vc.getView(1).setItems(['Login', 'New User', 'Goodbye!']);
|
||||
vc.getView(1).submit = true;
|
||||
vc.switchFocus(1);
|
||||
}
|
||||
*/
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue