mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-05 17:28:06 +02:00
* Don't look for non-user (e.g. predefined) MCI codes in form/config lookup
This commit is contained in:
parent
4cf10ba85c
commit
ca26cca55b
4 changed files with 32 additions and 3 deletions
|
@ -80,6 +80,27 @@ MCIViewFactory.prototype.getPredefinedViewLabel = function(code) {
|
|||
}
|
||||
};
|
||||
|
||||
/*
|
||||
MCIViewFactory.getUserViewClass = function(code) {
|
||||
return {
|
||||
TL : TextView,
|
||||
ET : EditTextView,
|
||||
ME : MaskEditTextView,
|
||||
MT : MultiLineEditTextView,
|
||||
PL : TextView,
|
||||
BT : ButtonView,
|
||||
VM : VerticalMenuView,
|
||||
HM : HorizontalMenuView,
|
||||
SM : SpinnerMenuView,
|
||||
TM : ToggleMenuView,
|
||||
}[code];
|
||||
};
|
||||
*/
|
||||
|
||||
MCIViewFactory.UserViewCodes = [
|
||||
'TL', 'ET', 'ME', 'MT', 'PL', 'BT', 'VM', 'HM', 'SM', 'TM'
|
||||
];
|
||||
|
||||
MCIViewFactory.prototype.createFromMCI = function(mci) {
|
||||
assert(mci.code);
|
||||
assert(mci.id > 0);
|
||||
|
@ -121,6 +142,9 @@ MCIViewFactory.prototype.createFromMCI = function(mci) {
|
|||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Note: Keep this in sync with UserViewCodes above!
|
||||
//
|
||||
switch(mci.code) {
|
||||
// Text Label (Text View)
|
||||
case 'TL' :
|
||||
|
@ -236,6 +260,8 @@ MCIViewFactory.prototype.createFromMCI = function(mci) {
|
|||
setOption(2, 'justify');
|
||||
|
||||
view = new TextView(options);
|
||||
} else {
|
||||
// :TODO: log this
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue