| 1 |
define([ |
| 2 |
"dojo/_base/declare", |
| 3 |
"./common" |
| 4 |
], function(declare, common){ |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
return declare(null, { |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
postCreate: function(){ |
| 17 |
if(!this.textDir && this.getParent() && this.getParent().get("textDir")){ |
| 18 |
this.textDir = this.getParent().get("textDir"); |
| 19 |
} |
| 20 |
}, |
| 21 |
|
| 22 |
_getValueAttr: function(){ |
| 23 |
return common.removeUCCFromText(this.inputNode.value); |
| 24 |
}, |
| 25 |
|
| 26 |
_setValueAttr: function(value){ |
| 27 |
this.inherited(arguments); |
| 28 |
this._applyTextDirToValueNode(); |
| 29 |
}, |
| 30 |
|
| 31 |
_setTextDirAttr: function(textDir){ |
| 32 |
if(textDir && this.textDir !== textDir){ |
| 33 |
this.textDir = textDir; |
| 34 |
this._applyTextDirToValueNode(); |
| 35 |
} |
| 36 |
}, |
| 37 |
|
| 38 |
_applyTextDirToValueNode: function(){ |
| 39 |
this.inputNode.value = common.removeUCCFromText(this.inputNode.value); |
| 40 |
this.inputNode.value = common.enforceTextDirWithUcc(this.inputNode.value, this.textDir); |
| 41 |
} |
| 42 |
}); |
| 43 |
}); |