RoundRectCategory.js 984 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. define("dojox/mobile/RoundRectCategory", [
  2. "dojo/_base/declare",
  3. "dojo/_base/window",
  4. "dijit/_Contained",
  5. "dijit/_WidgetBase"
  6. ], function(declare, win, Contained, WidgetBase){
  7. /*=====
  8. var Contained = dijit._Contained;
  9. var WidgetBase = dijit._WidgetBase;
  10. =====*/
  11. // module:
  12. // dojox/mobile/RoundRectCategory
  13. // summary:
  14. // A category header for a rounded rectangle list.
  15. return declare("dojox.mobile.RoundRectCategory", [WidgetBase, Contained],{
  16. // summary:
  17. // A category header for a rounded rectangle list.
  18. // label: String
  19. // A label text for the widget.
  20. label: "",
  21. buildRendering: function(){
  22. this.domNode = this.containerNode = this.srcNodeRef || win.doc.createElement("H2");
  23. this.domNode.className = "mblRoundRectCategory";
  24. if(!this.label){
  25. this.label = this.domNode.innerHTML;
  26. }
  27. },
  28. _setLabelAttr: function(/*String*/label){
  29. this.label = label;
  30. this.domNode.innerHTML = this._cv ? this._cv(label) : label;
  31. }
  32. });
  33. });