- Remove inputType from previous check in. Will replace with MaskEditTextView stuff
* Cleanup self.options in Views. Just use self.XXXXXX and pass in options to configure * View's take one param for ctor: options. Including options.client * Experimental / WIP cursor show/hide in Views
This commit is contained in:
@@ -10,19 +10,19 @@ var assert = require('assert');
|
||||
|
||||
exports.TextView = TextView;
|
||||
|
||||
function TextView(client, options) {
|
||||
View.call(this, client, options);
|
||||
function TextView(options) {
|
||||
View.call(this, options);
|
||||
|
||||
var self = this;
|
||||
|
||||
if(this.options.maxLength) {
|
||||
this.maxLength = this.options.maxLength;
|
||||
if(options.maxLength) {
|
||||
this.maxLength = options.maxLength;
|
||||
}
|
||||
|
||||
this.multiLine = this.options.multiLine || false;
|
||||
this.fillChar = miscUtil.valueWithDefault(this.options.fillChar, ' ').substr(0, 1);
|
||||
this.justify = this.options.justify || 'right';
|
||||
this.inputType = this.options.inputType || 'normal';
|
||||
this.multiLine = options.multiLine || false;
|
||||
this.fillChar = miscUtil.valueWithDefault(options.fillChar, ' ').substr(0, 1);
|
||||
this.justify = options.justify || 'right';
|
||||
//this.inputType = options.inputType || 'normal';
|
||||
|
||||
this.isPasswordTextStyle = 'P' === this.textStyle || 'password' === this.textStyle;
|
||||
|
||||
@@ -56,7 +56,7 @@ function TextView(client, options) {
|
||||
}
|
||||
};
|
||||
|
||||
this.setText(this.options.text || '');
|
||||
this.setText(options.text || '');
|
||||
|
||||
if(this.isPasswordTextStyle) {
|
||||
this.textMaskChar = miscUtil.valueWithDefault(this.textMaskChar, '*').substr(0, 1);
|
||||
|
||||
Reference in New Issue
Block a user