Rev | Line | |
---|
[483] | 1 | define([ |
---|
| 2 | "dojo/_base/declare", |
---|
| 3 | "./common" |
---|
| 4 | ], function(declare, common){ |
---|
| 5 | |
---|
| 6 | // module: |
---|
| 7 | // dojox/mobile/bidi/CarouselItem |
---|
| 8 | |
---|
| 9 | return declare(null, { |
---|
| 10 | // summary: |
---|
| 11 | // Support for control over text direction for mobile CarouselItem widget, using Unicode Control Characters to control text direction. |
---|
| 12 | // description: |
---|
| 13 | // Implementation for text direction support for Header and Footer. |
---|
| 14 | // This class should not be used directly. |
---|
| 15 | // Mobile CarouselItem widget loads this module when user sets "has: {'dojo-bidi': true }" in data-dojo-config. |
---|
| 16 | _setHeaderTextAttr: function(text){ |
---|
| 17 | this._set("headerText", text); |
---|
| 18 | this.headerTextNode.innerHTML = this._cv ? this._cv(text) : text; |
---|
| 19 | var p = this.getParent() ? this.getParent().getParent() : null; |
---|
| 20 | this.textDir = this.textDir ? this.textDir : p ? p.get("textDir") : ""; //take textDir from Carousel |
---|
| 21 | if(this.textDir){ |
---|
| 22 | this.headerTextNode.innerHTML = common.enforceTextDirWithUcc(this.headerTextNode.innerHTML, this.textDir); |
---|
| 23 | } |
---|
| 24 | }, |
---|
| 25 | |
---|
| 26 | _setFooterTextAttr: function(text){ |
---|
| 27 | this._set("footerText", text); |
---|
| 28 | this.footerTextNode.innerHTML = this._cv ? this._cv(text) : text; |
---|
| 29 | var p = this.getParent() ? this.getParent().getParent() : null; |
---|
| 30 | this.textDir = this.textDir ? this.textDir : p ? p.get("textDir") : ""; //take textDir from Carousel |
---|
| 31 | if(this.textDir){ |
---|
| 32 | this.footerTextNode.innerHTML = _BidiSupport.enforceTextDirWithUcc(this.footerTextNode.innerHTML, this.textDir); |
---|
| 33 | } |
---|
| 34 | } |
---|
| 35 | }); |
---|
| 36 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.