| 1 |
define([ |
| 2 |
"dojo/_base/declare", |
| 3 |
"./common", |
| 4 |
"dojo/dom-style" |
| 5 |
], function(declare,common, domStyle){ |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
return declare(null, { |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
buildRendering: function(){ |
| 19 |
this.inherited(arguments); |
| 20 |
|
| 21 |
if(!this.isLeftToRight()){ |
| 22 |
if(this.navButton){ |
| 23 |
domStyle.set(this.btnContainerNode, "float", "left"); |
| 24 |
this.disconnect(this._prevHandle); |
| 25 |
this.disconnect(this._nextHandle); |
| 26 |
this._prevHandle = this.connect(this.prevBtnNode, "onclick", "onNextBtnClick"); |
| 27 |
this._nextHandle = this.connect(this.nextBtnNode, "onclick", "onPrevBtnClick"); |
| 28 |
} |
| 29 |
|
| 30 |
if(this.pageIndicator){ |
| 31 |
domStyle.set(this.piw.domNode, "float", "left"); |
| 32 |
} |
| 33 |
} |
| 34 |
}, |
| 35 |
_setTitleAttr: function(title){ |
| 36 |
this.titleNode.innerHTML = this._cv ? this._cv(title) : title; |
| 37 |
this._set("title", title); |
| 38 |
if(this.textDir){ |
| 39 |
this.titleNode.innerHTML = common.enforceTextDirWithUcc(this.titleNode.innerHTML, this.textDir); |
| 40 |
this.titleNode.style.textAlign = (this.dir.toLowerCase() === "rtl") ? "right" : "left"; |
| 41 |
} |
| 42 |
}, |
| 43 |
_setTextDirAttr: function(textDir){ |
| 44 |
if(textDir && this.textDir !== textDir){ |
| 45 |
this.textDir = textDir; |
| 46 |
this.titleNode.innerHTML = common.removeUCCFromText(this.titleNode.innerHTML); |
| 47 |
this.titleNode.innerHTML = common.enforceTextDirWithUcc(this.titleNode.innerHTML, this.textDir); |
| 48 |
if(this.items.length > 0) |
| 49 |
this.onComplete(this.items); |
| 50 |
} |
| 51 |
} |
| 52 |
}); |
| 53 |
}); |