mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 14:44:40 +02:00
* MCI keys no longer consider view IDs as this implied order
* Converted all MCI keys in menu.json/etc., e.g. BN1ET2 -> BN1ET2 * Fix regression with prompt loading * 'age' property -> 'birthdate' * MaskEditView.getData() returns data with literals in place * Other minor changes
This commit is contained in:
parent
81e684cdcc
commit
735b572f9f
14 changed files with 93 additions and 32 deletions
|
@ -21,6 +21,12 @@ exports.MaskEditTextView = MaskEditTextView;
|
|||
// styleSGR2: Literals (focused)
|
||||
// styleSGR3: fillChar
|
||||
|
||||
//
|
||||
// :TODO:
|
||||
// * Hint, e.g. YYYY/MM/DD
|
||||
// * Return values with literals in place
|
||||
//
|
||||
|
||||
function MaskEditTextView(options) {
|
||||
options.acceptsFocus = miscUtil.valueWithDefault(options.acceptsFocus, true);
|
||||
options.acceptsInput = miscUtil.valueWithDefault(options.acceptsInput, true);
|
||||
|
@ -168,4 +174,22 @@ MaskEditTextView.prototype.setPropertyValue = function(propName, value) {
|
|||
}
|
||||
|
||||
MaskEditTextView.super_.prototype.setPropertyValue.call(this, propName, value);
|
||||
};
|
||||
};
|
||||
|
||||
MaskEditTextView.prototype.getData = function() {
|
||||
var rawData = MaskEditTextView.super_.prototype.getData.call(this);
|
||||
var data = '';
|
||||
|
||||
assert(rawData.length <= this.patternArray.length);
|
||||
|
||||
var p = 0;
|
||||
for(var i = 0; i < this.patternArray.length; ++i) {
|
||||
if(_.isRegExp(this.patternArray[i])) {
|
||||
data += rawData[p++];
|
||||
} else {
|
||||
data += this.patternArray[i];
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue