| 1 |
define([ |
| 2 |
"dojo/_base/declare", |
| 3 |
"dojo/_base/window", |
| 4 |
"dojo/dom-construct", |
| 5 |
"dijit/_Contained", |
| 6 |
"dijit/_WidgetBase", |
| 7 |
"dojo/has", |
| 8 |
"dojo/has!dojo-bidi?dojox/mobile/bidi/RoundRectCategory" |
| 9 |
], function(declare, win, domConstruct, Contained, WidgetBase, has, BidiRoundRectCategory){ |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
var RoundRectCategory = declare(has("dojo-bidi") ? "dojox.mobile.NonBidiRoundRectCategory" : "dojox.mobile.RoundRectCategory", [WidgetBase, Contained], { |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
label: "", |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
tag: "h2", |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
baseClass: "mblRoundRectCategory", |
| 32 |
|
| 33 |
buildRendering: function(){ |
| 34 |
var domNode = this.domNode = this.containerNode = this.srcNodeRef || domConstruct.create(this.tag); |
| 35 |
this.inherited(arguments); |
| 36 |
if(!this.label && domNode.childNodes.length === 1 && domNode.firstChild.nodeType === 3){ |
| 37 |
|
| 38 |
this.label = domNode.firstChild.nodeValue; |
| 39 |
} |
| 40 |
}, |
| 41 |
|
| 42 |
_setLabelAttr: function(label){ |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
this.label = label; |
| 48 |
this.domNode.innerHTML = this._cv ? this._cv(label) : label; |
| 49 |
} |
| 50 |
}); |
| 51 |
|
| 52 |
return has("dojo-bidi") ? declare("dojox.mobile.RoundRectCategory", [RoundRectCategory, BidiRoundRectCategory]) : RoundRectCategory; |
| 53 |
}); |