mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-21 18:25:55 +02:00
* Bunch of WIP on new setPropertyValue() stuff making it easier to set props from JSON
This commit is contained in:
parent
8a5f890bee
commit
658c64c8c8
8 changed files with 202 additions and 45 deletions
|
@ -138,3 +138,18 @@ TextView.prototype.setText = function(text) {
|
|||
TextView.prototype.clearText = function() {
|
||||
this.setText('');
|
||||
};
|
||||
|
||||
TextView.prototype.setPropertyValue = function(propName, value) {
|
||||
switch(propName) {
|
||||
case 'textMaskChar' : this.textMaskChar = value.substr(0, 1); break;
|
||||
case 'textOverflow' : this.textOverflow = value; break;
|
||||
case 'maxLength' : this.maxLength = parseInt(value, 10); break;
|
||||
case 'password' :
|
||||
if(true === value) {
|
||||
this.textMaskChar = this.client.currentTheme.helpers.getPasswordChar();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
TextView.super_.prototype.setPropertyValue.call(this, propName, value);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue