123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- define("dojox/mobile/RoundRectList", [
- "dojo/_base/array",
- "dojo/_base/declare",
- "dojo/_base/window",
- "dijit/_Contained",
- "dijit/_Container",
- "dijit/_WidgetBase"
- ], function(array, declare, win, Contained, Container, WidgetBase){
- /*=====
- var Contained = dijit._Contained;
- var Container = dijit._Container;
- var WidgetBase = dijit._WidgetBase;
- =====*/
- // module:
- // dojox/mobile/RoundRectList
- // summary:
- // A rounded rectangle list.
- return declare("dojox.mobile.RoundRectList", [WidgetBase, Container, Contained], {
- // summary:
- // A rounded rectangle list.
- // description:
- // RoundRectList is a rounded rectangle list, which can be used to
- // display a group of items. Each item must be
- // dojox.mobile.ListItem.
- // transition: String
- // The default animated transition effect for child items.
- transition: "slide",
- // iconBase: String
- // The default icon path for child items.
- iconBase: "",
- // iconPos: String
- // The default icon position for child items.
- iconPos: "",
- // select: String
- // Selection mode of the list. The check mark is shown for the
- // selected list item(s). The value can be "single", "multiple", or
- // "". If "single", there can be only one selected item at a time.
- // If "multiple", there can be multiple selected items at a time.
- select: "",
- // stateful: String
- // If true, the last selected item remains highlighted.
- stateful: false,
- buildRendering: function(){
- this.domNode = this.containerNode = this.srcNodeRef || win.doc.createElement("UL");
- this.domNode.className = "mblRoundRectList";
- },
-
- resize: function(){
- // summary:
- // Calls resize() of each child widget.
- array.forEach(this.getChildren(), function(child){
- if(child.resize){ child.resize(); }
- });
- },
- onCheckStateChanged: function(/*Widget*/listItem, /*String*/newState){
- // summary:
- // Stub function to connect to from your application.
- // description:
- // Called when the check state has been changed.
- },
- _setStatefulAttr: function(stateful){
- this.stateful = stateful;
- array.forEach(this.getChildren(), function(child){
- child.setArrow && child.setArrow();
- });
- },
- deselectItem: function(/*ListItem*/item){
- // summary:
- // Deselects the given item.
- item.deselect();
- },
- deselectAll: function(){
- // summary:
- // Deselects all the items.
- array.forEach(this.getChildren(), function(child){
- child.deselect && child.deselect();
- });
- },
- selectItem: function(/*ListItem*/item){
- // summary:
- // Selects the given item.
- item.select();
- }
- });
- });
|