Last change
on this file since 529 was
483,
checked in by hendrikvanantwerpen, 11 years ago
|
Added Dojo 1.9.3 release.
|
File size:
1.3 KB
|
Line | |
---|
1 | define([ |
---|
2 | "dojo/_base/declare", |
---|
3 | "./common" |
---|
4 | ], function(declare, common){ |
---|
5 | |
---|
6 | // module: |
---|
7 | // dojox/mobile/bidi/ValuePickerSlot |
---|
8 | |
---|
9 | return declare(null, { |
---|
10 | // summary: |
---|
11 | // Support for control over text direction for mobile ValuePickerSlot widget, using Unicode Chontrol Characters to control text direction. |
---|
12 | // description: |
---|
13 | // Implementation for text direction support for Value. |
---|
14 | // This class should not be used directly. |
---|
15 | // Mobile ValuePickerSlot widget loads this module when user sets "has: {'dojo-bidi': true }" in data-dojo-config. |
---|
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 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.