` element.
// baseClass: String
// The name of the CSS class of this widget.
baseClass: "mblPane",
buildRendering: function(){
this.inherited(arguments);
if(!this.containerNode){
// set containerNode so that getChildren() works
this.containerNode = this.domNode;
}
},
resize: function(){
// summary:
// Calls resize() of each child widget.
array.forEach(this.getChildren(), function(child){
if(child.resize){ child.resize(); }
});
}
});
});
},
'dojox/mobile/common':function(){
define("dojox/mobile/common", [
"dojo/_base/array",
"dojo/_base/config",
"dojo/_base/connect",
"dojo/_base/lang",
"dojo/_base/window",
"dojo/dom-class",
"dojo/dom-construct",
"dojo/ready",
"dijit/registry",
"./sniff",
"./uacss" // (no direct references)
], function(array, config, connect, lang, win, domClass, domConstruct, ready, registry, has){
// module:
// dojox/mobile/common
var dm = lang.getObject("dojox.mobile", true);
dm.getScreenSize = function(){
// summary:
// Returns the dimensions of the browser window.
return {
h: win.global.innerHeight || win.doc.documentElement.clientHeight,
w: win.global.innerWidth || win.doc.documentElement.clientWidth
};
};
dm.updateOrient = function(){
// summary:
// Updates the orientation specific CSS classes, 'dj_portrait' and
// 'dj_landscape'.
var dim = dm.getScreenSize();
domClass.replace(win.doc.documentElement,
dim.h > dim.w ? "dj_portrait" : "dj_landscape",
dim.h > dim.w ? "dj_landscape" : "dj_portrait");
};
dm.updateOrient();
dm.tabletSize = 500;
dm.detectScreenSize = function(/*Boolean?*/force){
// summary:
// Detects the screen size and determines if the screen is like
// phone or like tablet. If the result is changed,
// it sets either of the following css class to ``:
//
// - 'dj_phone'
// - 'dj_tablet'
//
// and it publishes either of the following events:
//
// - '/dojox/mobile/screenSize/phone'
// - '/dojox/mobile/screenSize/tablet'
var dim = dm.getScreenSize();
var sz = Math.min(dim.w, dim.h);
var from, to;
if(sz >= dm.tabletSize && (force || (!this._sz || this._sz < dm.tabletSize))){
from = "phone";
to = "tablet";
}else if(sz < dm.tabletSize && (force || (!this._sz || this._sz >= dm.tabletSize))){
from = "tablet";
to = "phone";
}
if(to){
domClass.replace(win.doc.documentElement, "dj_"+to, "dj_"+from);
connect.publish("/dojox/mobile/screenSize/"+to, [dim]);
}
this._sz = sz;
};
dm.detectScreenSize();
// dojox/mobile.hideAddressBarWait: Number
// The time in milliseconds to wait before the fail-safe hiding address
// bar runs. The value must be larger than 800.
dm.hideAddressBarWait = typeof(config["mblHideAddressBarWait"]) === "number" ?
config["mblHideAddressBarWait"] : 1500;
dm.hide_1 = function(){
// summary:
// Internal function to hide the address bar.
// tags:
// private
scrollTo(0, 1);
dm._hidingTimer = (dm._hidingTimer == 0) ? 200 : dm._hidingTimer * 2;
setTimeout(function(){ // wait for a while for "scrollTo" to finish
if(dm.isAddressBarHidden() || dm._hidingTimer > dm.hideAddressBarWait){
// Succeeded to hide address bar, or failed but timed out
dm.resizeAll();
dm._hiding = false;
}else{
// Failed to hide address bar, so retry after a while
setTimeout(dm.hide_1, dm._hidingTimer);
}
}, 50); //50ms is an experiential value
};
dm.hideAddressBar = function(/*Event?*/evt){
// summary:
// Hides the address bar.
// description:
// Tries to hide the address bar a couple of times. The purpose is to do
// it as quick as possible while ensuring the resize is done after the hiding
// finishes.
if(dm.disableHideAddressBar || dm._hiding){ return; }
dm._hiding = true;
dm._hidingTimer = has('iphone') ? 200 : 0; // Need to wait longer in case of iPhone
var minH = screen.availHeight;
if(has('android')){
minH = outerHeight / devicePixelRatio;
// On some Android devices such as Galaxy SII, minH might be 0 at this time.
// In that case, retry again after a while. (200ms is an experiential value)
if(minH == 0){
dm._hiding = false;
setTimeout(function(){ dm.hideAddressBar(); }, 200);
}
// On some Android devices such as HTC EVO, "outerHeight/devicePixelRatio"
// is too short to hide address bar, so make it high enough
if(minH <= innerHeight){ minH = outerHeight; }
// On Android 2.2/2.3, hiding address bar fails when "overflow:hidden" style is
// applied to html/body element, so force "overflow:visible" style
if(has('android') < 3){
win.doc.documentElement.style.overflow = win.body().style.overflow = "visible";
}
}
if(win.body().offsetHeight < minH){ // to ensure enough height for scrollTo to work
win.body().style.minHeight = minH + "px";
dm._resetMinHeight = true;
}
setTimeout(dm.hide_1, dm._hidingTimer);
};
dm.isAddressBarHidden = function(){
return pageYOffset === 1;
};
dm.resizeAll = function(/*Event?*/evt, /*Widget?*/root){
// summary:
// Calls the resize() method of all the top level resizable widgets.
// description:
// Finds all widgets that do not have a parent or the parent does not
// have the resize() method, and calls resize() for them.
// If a widget has a parent that has resize(), calling widget's
// resize() is its parent's responsibility.
// evt:
// Native event object
// root:
// If specified, searches the specified widget recursively for top-level
// resizable widgets.
// root.resize() is always called regardless of whether root is a
// top level widget or not.
// If omitted, searches the entire page.
if(dm.disableResizeAll){ return; }
connect.publish("/dojox/mobile/resizeAll", [evt, root]); // back compat
connect.publish("/dojox/mobile/beforeResizeAll", [evt, root]);
if(dm._resetMinHeight){
win.body().style.minHeight = dm.getScreenSize().h + "px";
}
dm.updateOrient();
dm.detectScreenSize();
var isTopLevel = function(w){
var parent = w.getParent && w.getParent();
return !!((!parent || !parent.resize) && w.resize);
};
var resizeRecursively = function(w){
array.forEach(w.getChildren(), function(child){
if(isTopLevel(child)){ child.resize(); }
resizeRecursively(child);
});
};
if(root){
if(root.resize){ root.resize(); }
resizeRecursively(root);
}else{
array.forEach(array.filter(registry.toArray(), isTopLevel),
function(w){ w.resize(); });
}
connect.publish("/dojox/mobile/afterResizeAll", [evt, root]);
};
dm.openWindow = function(url, target){
// summary:
// Opens a new browser window with the given URL.
win.global.open(url, target || "_blank");
};
if(config["mblApplyPageStyles"] !== false){
domClass.add(win.doc.documentElement, "mobile");
}
if(has('chrome')){
// dojox/mobile does not load uacss (only _compat does), but we need dj_chrome.
domClass.add(win.doc.documentElement, "dj_chrome");
}
if(win.global._no_dojo_dm){
// deviceTheme seems to be loaded from a script tag (= non-dojo usage)
var _dm = win.global._no_dojo_dm;
for(var i in _dm){
dm[i] = _dm[i];
}
dm.deviceTheme.setDm(dm);
}
// flag for Android transition animation flicker workaround
has.add('mblAndroidWorkaround',
config["mblAndroidWorkaround"] !== false && has('android') < 3, undefined, true);
has.add('mblAndroid3Workaround',
config["mblAndroid3Workaround"] !== false && has('android') >= 3, undefined, true);
ready(function(){
dm.detectScreenSize(true);
if(config["mblAndroidWorkaroundButtonStyle"] !== false && has('android')){
// workaround for the form button disappearing issue on Android 2.2-4.0
domConstruct.create("style", {innerHTML:"BUTTON,INPUT[type='button'],INPUT[type='submit'],INPUT[type='reset'],INPUT[type='file']::-webkit-file-upload-button{-webkit-appearance:none;}"}, win.doc.head, "first");
}
if(has('mblAndroidWorkaround')){
// add a css class to show view offscreen for android flicker workaround
domConstruct.create("style", {innerHTML:".mblView.mblAndroidWorkaround{position:absolute;top:-9999px !important;left:-9999px !important;}"}, win.doc.head, "last");
}
// You can disable hiding the address bar with the following dojoConfig.
// var dojoConfig = { mblHideAddressBar: false };
var f = dm.resizeAll;
if(config["mblHideAddressBar"] !== false &&
navigator.appVersion.indexOf("Mobile") != -1 ||
config["mblForceHideAddressBar"] === true){
dm.hideAddressBar();
if(config["mblAlwaysHideAddressBar"] === true){
f = dm.hideAddressBar;
}
}
if(has('android') && win.global.onorientationchange !== undefined){
var _f = f;
f = function(evt){
var _conn = connect.connect(null, "onresize", null, function(e){
connect.disconnect(_conn);
_f(e);
});
};
var curSize = dm.getScreenSize();
// Watch for resize events when the virtual keyboard is shown/hidden,
// the heuristic to detect this is that the screen width does not change
// and the height changes by more than 100 pixels.
connect.connect(null, "onresize", null, function(e){
var newSize = dm.getScreenSize();
if(newSize.w == curSize.w && Math.abs(newSize.h - curSize.h) >= 100){
// keyboard has been shown/hidden
_f(e);
}
curSize = newSize;
});
}
connect.connect(null, win.global.onorientationchange !== undefined
? "onorientationchange" : "onresize", null, f);
win.body().style.visibility = "visible";
});
// TODO: return functions declared above in this hash, rather than
// dojox.mobile.
/*=====
return {
// summary:
// A common module for dojox/mobile.
// description:
// This module includes common utility functions that are used by
// dojox/mobile widgets. Also, it provides functions that are commonly
// necessary for mobile web applications, such as the hide address bar
// function.
};
=====*/
return dm;
});
},
'dojox/mobile/iconUtils':function(){
define("dojox/mobile/iconUtils", [
"dojo/_base/array",
"dojo/_base/config",
"dojo/_base/connect",
"dojo/_base/event",
"dojo/_base/lang",
"dojo/_base/window",
"dojo/dom-class",
"dojo/dom-construct",
"dojo/dom-style",
"./sniff"
], function(array, config, connect, event, lang, win, domClass, domConstruct, domStyle, has){
var dm = lang.getObject("dojox.mobile", true);
// module:
// dojox/mobile/iconUtils
var IconUtils = function(){
// summary:
// Utilities to create an icon (image, CSS sprite image, or DOM Button).
this.setupSpriteIcon = function(/*DomNode*/iconNode, /*String*/iconPos){
// summary:
// Sets up CSS sprite for a foreground image.
if(iconNode && iconPos){
var arr = array.map(iconPos.split(/[ ,]/),function(item){return item-0});
var t = arr[0]; // top
var r = arr[1] + arr[2]; // right
var b = arr[0] + arr[3]; // bottom
var l = arr[1]; // left
domStyle.set(iconNode, {
clip: "rect("+t+"px "+r+"px "+b+"px "+l+"px)",
top: (iconNode.parentNode ? domStyle.get(iconNode, "top") : 0) - t + "px",
left: -l + "px"
});
domClass.add(iconNode, "mblSpriteIcon");
}
};
this.createDomButton = function(/*DomNode*/refNode, /*Object?*/style, /*DomNode?*/toNode){
// summary:
// Creates a DOM button.
// description:
// DOM button is a simple graphical object that consists of one or
// more nested DIV elements with some CSS styling. It can be used
// in place of an icon image on ListItem, IconItem, and so on.
// The kind of DOM button to create is given as a class name of
// refNode. The number of DIVs to create is searched from the style
// sheets in the page. However, if the class name has a suffix that
// starts with an underscore, like mblDomButtonGoldStar_5, then the
// suffixed number is used instead. A class name for DOM button
// must starts with 'mblDomButton'.
// refNode:
// A node that has a DOM button class name.
// style:
// A hash object to set styles to the node.
// toNode:
// A root node to create a DOM button. If omitted, refNode is used.
if(!this._domButtons){
if(has("webkit")){
var findDomButtons = function(sheet, dic){
// summary:
// Searches the style sheets for DOM buttons.
// description:
// Returns a key-value pair object whose keys are DOM
// button class names and values are the number of DOM
// elements they need.
var i, j;
if(!sheet){
var _dic = {};
var ss = win.doc.styleSheets;
for (i = 0; i < ss.length; i++){
ss[i] && findDomButtons(ss[i], _dic);
}
return _dic;
}
var rules = sheet.cssRules || [];
for (i = 0; i < rules.length; i++){
var rule = rules[i];
if(rule.href && rule.styleSheet){
findDomButtons(rule.styleSheet, dic);
}else if(rule.selectorText){
var sels = rule.selectorText.split(/,/);
for (j = 0; j < sels.length; j++){
var sel = sels[j];
var n = sel.split(/>/).length - 1;
if(sel.match(/(mblDomButton\w+)/)){
var cls = RegExp.$1;
if(!dic[cls] || n > dic[cls]){
dic[cls] = n;
}
}
}
}
}
return dic;
}
this._domButtons = findDomButtons();
}else{
this._domButtons = {};
}
}
var s = refNode.className;
var node = toNode || refNode;
if(s.match(/(mblDomButton\w+)/) && s.indexOf("/") === -1){
var btnClass = RegExp.$1;
var nDiv = 4;
if(s.match(/(mblDomButton\w+_(\d+))/)){
nDiv = RegExp.$2 - 0;
}else if(this._domButtons[btnClass] !== undefined){
nDiv = this._domButtons[btnClass];
}
var props = null;
if(has("bb") && config["mblBBBoxShadowWorkaround"] !== false){
// Removes box-shadow because BlackBerry incorrectly renders it.
props = {style:"-webkit-box-shadow:none"};
}
for(var i = 0, p = node; i < nDiv; i++){
p = p.firstChild || domConstruct.create("div", props, p);
}
if(toNode){
setTimeout(function(){
domClass.remove(refNode, btnClass);
}, 0);
domClass.add(toNode, btnClass);
}
}else if(s.indexOf(".") !== -1){ // file name
domConstruct.create("img", {src:s}, node);
}else{
return null;
}
domClass.add(node, "mblDomButton");
!!style && domStyle.set(node, style);
return node;
};
this.createIcon = function(/*String*/icon, /*String?*/iconPos, /*DomNode?*/node, /*String?*/title, /*DomNode?*/parent, /*DomNode?*/refNode, /*String?*/pos){
// summary:
// Creates or updates an icon node
// description:
// If node exists, updates the existing node. Otherwise, creates a new one.
// icon:
// Path for an image, or DOM button class name.
title = title || "";
if(icon && icon.indexOf("mblDomButton") === 0){
// DOM button
if(!node){
node = domConstruct.create("div", null, refNode || parent, pos);
}else{
if(node.className.match(/(mblDomButton\w+)/)){
domClass.remove(node, RegExp.$1);
}
}
node.title = title;
domClass.add(node, icon);
this.createDomButton(node);
}else if(icon && icon !== "none"){
// Image
if(!node || node.nodeName !== "IMG"){
node = domConstruct.create("img", {
alt: title
}, refNode || parent, pos);
}
node.src = (icon || "").replace("${theme}", dm.currentTheme);
this.setupSpriteIcon(node, iconPos);
if(iconPos && parent){
var arr = iconPos.split(/[ ,]/);
domStyle.set(parent, {
width: arr[2] + "px",
height: arr[3] + "px"
});
domClass.add(parent, "mblSpriteIconParent");
}
connect.connect(node, "ondragstart", event, "stop");
}
return node;
};
this.iconWrapper = false;
this.setIcon = function(/*String*/icon, /*String*/iconPos, /*DomNode*/iconNode, /*String?*/alt, /*DomNode*/parent, /*DomNode?*/refNode, /*String?*/pos){
// summary:
// A setter function to set an icon.
// description:
// This function is intended to be used by icon setters (e.g. _setIconAttr)
// icon:
// An icon path or a DOM button class name.
// iconPos:
// The position of an aggregated icon. IconPos is comma separated
// values like top,left,width,height (ex. "0,0,29,29").
// iconNode:
// An icon node.
// alt:
// An alt text for the icon image.
// parent:
// Parent node of the icon.
// refNode:
// A node reference to place the icon.
// pos:
// The position of the icon relative to refNode.
if(!parent || !icon && !iconNode){ return null; }
if(icon && icon !== "none"){ // create or update an icon
if(!this.iconWrapper && icon.indexOf("mblDomButton") !== 0 && !iconPos){ // image
if(iconNode && iconNode.tagName === "DIV"){
domConstruct.destroy(iconNode);
iconNode = null;
}
iconNode = this.createIcon(icon, null, iconNode, alt, parent, refNode, pos);
domClass.add(iconNode, "mblImageIcon");
}else{ // sprite or DOM button
if(iconNode && iconNode.tagName === "IMG"){
domConstruct.destroy(iconNode);
iconNode = null;
}
iconNode && domConstruct.empty(iconNode);
if(!iconNode){
iconNode = domConstruct.create("div", null, refNode || parent, pos);
}
this.createIcon(icon, iconPos, null, null, iconNode);
if(alt){
iconNode.title = alt;
}
}
domClass.remove(parent, "mblNoIcon");
return iconNode;
}else{ // clear the icon
domConstruct.destroy(iconNode);
domClass.add(parent, "mblNoIcon");
return null;
}
};
};
// Return singleton. (TODO: can we replace IconUtils class and singleton w/a simple hash of functions?)
return new IconUtils();
});
},
'dojox/mobile/uacss':function(){
define("dojox/mobile/uacss", [
"dojo/_base/kernel",
"dojo/_base/lang",
"dojo/_base/window",
"./sniff"
], function(dojo, lang, win, has){
var html = win.doc.documentElement;
html.className = lang.trim(html.className + " " + [
has('bb') ? "dj_bb" : "",
has('android') ? "dj_android" : "",
has('iphone') ? "dj_iphone" : "",
has('ipod') ? "dj_ipod" : "",
has('ipad') ? "dj_ipad" : ""
].join(" ").replace(/ +/g," "));
/*=====
return {
// summary:
// Requiring this module adds CSS classes to your document's ` tag:
//
// - "dj_android" when running on Android;
// - "dj_bb" when running on BlackBerry;
// - "dj_iphone" when running on iPhone;
// - "dj_ipod" when running on iPod;
// - "dj_ipad" when running on iPad.
};
=====*/
return dojo;
});
},
'dojox/mobile/RoundRectCategory':function(){
define("dojox/mobile/RoundRectCategory", [
"dojo/_base/declare",
"dojo/_base/window",
"dojo/dom-construct",
"dijit/_Contained",
"dijit/_WidgetBase"
], function(declare, win, domConstruct, Contained, WidgetBase){
// module:
// dojox/mobile/RoundRectCategory
return declare("dojox.mobile.RoundRectCategory", [WidgetBase, Contained], {
// summary:
// A category header for a rounded rectangle list.
// label: String
// A label of the category. If the label is not specified,
// innerHTML is used as a label.
label: "",
// tag: String
// A name of html tag to create as domNode.
tag: "h2",
/* internal properties */
// baseClass: String
// The name of the CSS class of this widget.
baseClass: "mblRoundRectCategory",
buildRendering: function(){
var domNode = this.domNode = this.containerNode = this.srcNodeRef || domConstruct.create(this.tag);
this.inherited(arguments);
if(!this.label && domNode.childNodes.length === 1 && domNode.firstChild.nodeType === 3){
// if it has only one text node, regard it as a label
this.label = domNode.firstChild.nodeValue;
}
},
_setLabelAttr: function(/*String*/label){
// summary:
// Sets the category header text.
// tags:
// private
this.label = label;
this.domNode.innerHTML = this._cv ? this._cv(label) : label;
}
});
});
},
'dojox/mobile/ProgressIndicator':function(){
define("dojox/mobile/ProgressIndicator", [
"dojo/_base/config",
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/dom-class",
"dojo/dom-construct",
"dojo/dom-geometry",
"dojo/dom-style",
"dojo/has",
"dijit/_Contained",
"dijit/_WidgetBase"
], function(config, declare, lang, domClass, domConstruct, domGeometry, domStyle, has, Contained, WidgetBase){
// module:
// dojox/mobile/ProgressIndicator
var cls = declare("dojox.mobile.ProgressIndicator", [WidgetBase, Contained], {
// summary:
// A progress indication widget.
// description:
// ProgressIndicator is a round spinning graphical representation
// that indicates the current task is ongoing.
// interval: Number
// The time interval in milliseconds for updating the spinning
// indicator.
interval: 100,
// size: Number
// The size of the indicator in pixels.
size: 40,
// removeOnStop: Boolean
// If true, this widget is removed from the parent node
// when stop() is called.
removeOnStop: true,
// startSpinning: Boolean
// If true, calls start() to run the indicator at startup.
startSpinning: false,
// center: Boolean
// If true, the indicator is displayed as center aligned.
center: true,
// colors: String[]
// An array of indicator colors. 12 colors have to be given.
// If colors are not specified, CSS styles
// (mblProg0Color - mblProg11Color) are used.
colors: null,
/* internal properties */
// baseClass: String
// The name of the CSS class of this widget.
baseClass: "mblProgressIndicator",
constructor: function(){
// summary:
// Creates a new instance of the class.
this.colors = [];
this._bars = [];
},
buildRendering: function(){
this.inherited(arguments);
if(this.center){
domClass.add(this.domNode, "mblProgressIndicatorCenter");
}
this.containerNode = domConstruct.create("div", {className:"mblProgContainer"}, this.domNode);
this.spinnerNode = domConstruct.create("div", null, this.containerNode);
for(var i = 0; i < 12; i++){
var div = domConstruct.create("div", {className:"mblProg mblProg"+i}, this.spinnerNode);
this._bars.push(div);
}
this.scale(this.size);
if(this.startSpinning){
this.start();
}
},
scale: function(/*Number*/size){
// summary:
// Changes the size of the indicator.
// size:
// The size of the indicator in pixels.
var scale = size / 40;
domStyle.set(this.containerNode, {
webkitTransform: "scale(" + scale + ")",
webkitTransformOrigin: "0 0"
});
domGeometry.setMarginBox(this.domNode, {w:size, h:size});
domGeometry.setMarginBox(this.containerNode, {w:size / scale, h:size / scale});
},
start: function(){
// summary:
// Starts the spinning of the ProgressIndicator.
if(this.imageNode){
var img = this.imageNode;
var l = Math.round((this.containerNode.offsetWidth - img.offsetWidth) / 2);
var t = Math.round((this.containerNode.offsetHeight - img.offsetHeight) / 2);
img.style.margin = t+"px "+l+"px";
return;
}
var cntr = 0;
var _this = this;
var n = 12;
this.timer = setInterval(function(){
cntr--;
cntr = cntr < 0 ? n - 1 : cntr;
var c = _this.colors;
for(var i = 0; i < n; i++){
var idx = (cntr + i) % n;
if(c[idx]){
_this._bars[i].style.backgroundColor = c[idx];
}else{
domClass.replace(_this._bars[i],
"mblProg" + idx + "Color",
"mblProg" + (idx === n - 1 ? 0 : idx + 1) + "Color");
}
}
}, this.interval);
},
stop: function(){
// summary:
// Stops the spinning of the ProgressIndicator.
if(this.timer){
clearInterval(this.timer);
}
this.timer = null;
if(this.removeOnStop && this.domNode && this.domNode.parentNode){
this.domNode.parentNode.removeChild(this.domNode);
}
},
setImage: function(/*String*/file){
// summary:
// Sets an indicator icon image file (typically animated GIF).
// If null is specified, restores the default spinner.
if(file){
this.imageNode = domConstruct.create("img", {src:file}, this.containerNode);
this.spinnerNode.style.display = "none";
}else{
if(this.imageNode){
this.containerNode.removeChild(this.imageNode);
this.imageNode = null;
}
this.spinnerNode.style.display = "";
}
}
});
cls._instance = null;
cls.getInstance = function(props){
if(!cls._instance){
cls._instance = new cls(props);
}
return cls._instance;
};
return cls;
});
},
'dojox/mobile/EdgeToEdgeList':function(){
define("dojox/mobile/EdgeToEdgeList", [
"dojo/_base/declare",
"./RoundRectList"
], function(declare, RoundRectList){
// module:
// dojox/mobile/EdgeToEdgeCategory
return declare("dojox.mobile.EdgeToEdgeList", RoundRectList, {
// summary:
// An edge-to-edge layout list.
// description:
// EdgeToEdgeList is an edge-to-edge layout list, which displays
// all items in equally-sized rows. Each item must be a
// dojox/mobile/ListItem.
buildRendering: function(){
this.inherited(arguments);
this.domNode.className = "mblEdgeToEdgeList";
}
});
});
},
'dojox/mobile/EdgeToEdgeCategory':function(){
define("dojox/mobile/EdgeToEdgeCategory", [
"dojo/_base/declare",
"./RoundRectCategory"
], function(declare, RoundRectCategory){
// module:
// dojox/mobile/EdgeToEdgeCategory
return declare("dojox.mobile.EdgeToEdgeCategory", RoundRectCategory, {
// summary:
// A category header for an edge-to-edge list.
buildRendering: function(){
this.inherited(arguments);
this.domNode.className = "mblEdgeToEdgeCategory";
}
});
});
},
'dojox/mobile/Container':function(){
define("dojox/mobile/Container", [
"dojo/_base/declare",
"dijit/_Container",
"./Pane"
], function(declare, Container, Pane){
// module:
// dojox/mobile/Container
return declare("dojox.mobile.Container", [Pane, Container], {
// summary:
// A simple container-type widget.
// description:
// Container is a simple general-purpose container widget.
// It is a widget, but can be regarded as a simple `
` element.
// baseClass: String
// The name of the CSS class of this widget.
baseClass: "mblContainer"
});
});
},
'dojox/mobile/ToolBarButton':function(){
define("dojox/mobile/ToolBarButton", [
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/_base/window",
"dojo/dom-class",
"dojo/dom-construct",
"dojo/dom-style",
"./sniff",
"./_ItemBase"
], function(declare, lang, win, domClass, domConstruct, domStyle, has, ItemBase){
// module:
// dojox/mobile/ToolBarButton
return declare("dojox.mobile.ToolBarButton", ItemBase, {
// summary:
// A button widget which is placed in the Heading widget.
// description:
// ToolBarButton is a button which is typically placed in the
// Heading widget. It is a subclass of dojox/mobile/_ItemBase just
// like ListItem or IconItem. So, unlike Button, it has basically
// the same capability as ListItem or IconItem, such as icon
// support, transition, etc.
// selected: Boolean
// If true, the button is in the selected state.
selected: false,
// arrow: String
// Specifies "right" or "left" to be an arrow button.
arrow: "",
// light: Boolean
// If true, this widget produces only a single `` node when it
// has only an icon or only a label, and has no arrow. In that
// case, you cannot have both icon and label, or arrow even if you
// try to set them.
light: true,
// defaultColor: String
// CSS class for the default color.
// Note: If this button has an arrow (typically back buttons on iOS),
// the class selector used for it is the value of defaultColor + "45".
// For example, by default the arrow selector is "mblColorDefault45".
defaultColor: "mblColorDefault",
// selColor: String
// CSS class for the selected color.
// Note: If this button has an arrow (typically back buttons on iOS),
// the class selector used for it is the value of selColor + "45".
// For example, by default the selected arrow selector is "mblColorDefaultSel45".
selColor: "mblColorDefaultSel",
/* internal properties */
baseClass: "mblToolBarButton",
_selStartMethod: "touch",
_selEndMethod: "touch",
buildRendering: function(){
if(!this.label && this.srcNodeRef){
this.label = this.srcNodeRef.innerHTML;
}
this.label = lang.trim(this.label);
this.domNode = (this.srcNodeRef && this.srcNodeRef.tagName === "SPAN") ?
this.srcNodeRef : domConstruct.create("span");
this.inherited(arguments);
if(this.light && !this.arrow && (!this.icon || !this.label)){
this.labelNode = this.tableNode = this.bodyNode = this.iconParentNode = this.domNode;
domClass.add(this.domNode, this.defaultColor + " mblToolBarButtonBody" +
(this.icon ? " mblToolBarButtonLightIcon" : " mblToolBarButtonLightText"));
return;
}
this.domNode.innerHTML = "";
if(this.arrow === "left" || this.arrow === "right"){
this.arrowNode = domConstruct.create("span", {
className: "mblToolBarButtonArrow mblToolBarButton" +
(this.arrow === "left" ? "Left" : "Right") + "Arrow " +
(has("ie") ? "" : (this.defaultColor + " " + this.defaultColor + "45"))
}, this.domNode);
domClass.add(this.domNode, "mblToolBarButtonHas" +
(this.arrow === "left" ? "Left" : "Right") + "Arrow");
}
this.bodyNode = domConstruct.create("span", {className:"mblToolBarButtonBody"}, this.domNode);
this.tableNode = domConstruct.create("table", {cellPadding:"0",cellSpacing:"0",border:"0"}, this.bodyNode);
var row = this.tableNode.insertRow(-1);
this.iconParentNode = row.insertCell(-1);
this.labelNode = row.insertCell(-1);
this.iconParentNode.className = "mblToolBarButtonIcon";
this.labelNode.className = "mblToolBarButtonLabel";
if(this.icon && this.icon !== "none" && this.label){
domClass.add(this.domNode, "mblToolBarButtonHasIcon");
domClass.add(this.bodyNode, "mblToolBarButtonLabeledIcon");
}
domClass.add(this.bodyNode, this.defaultColor);
},
startup: function(){
if(this._started){ return; }
this._keydownHandle = this.connect(this.domNode, "onkeydown", "_onClick"); // for desktop browsers
this.inherited(arguments);
if(!this._isOnLine){
this._isOnLine = true;
this.set("icon", this.icon); // retry applying the attribute
}
},
_onClick: function(e){
// summary:
// Internal handler for click events.
// tags:
// private
if(e && e.type === "keydown" && e.keyCode !== 13){ return; }
if(this.onClick(e) === false){ return; } // user's click action
this.defaultClickAction(e);
},
onClick: function(/*Event*/ /*===== e =====*/){
// summary:
// User defined function to handle clicks
// tags:
// callback
},
_setLabelAttr: function(/*String*/text){
// summary:
// Sets the button label text.
this.inherited(arguments);
domClass.toggle(this.tableNode, "mblToolBarButtonText", text);
},
_setSelectedAttr: function(/*Boolean*/selected){
// summary:
// Makes this widget in the selected or unselected state.
var replace = function(node, a, b){
domClass.replace(node, a + " " + a + "45", b + " " + b + "45");
}
this.inherited(arguments);
if(selected){
domClass.replace(this.bodyNode, this.selColor, this.defaultColor);
if(!has("ie") && this.arrowNode){
replace(this.arrowNode, this.selColor, this.defaultColor);
}
}else{
domClass.replace(this.bodyNode, this.defaultColor, this.selColor);
if(!has("ie") && this.arrowNode){
replace(this.arrowNode, this.defaultColor, this.selColor);
}
}
domClass.toggle(this.domNode, "mblToolBarButtonSelected", selected);
domClass.toggle(this.bodyNode, "mblToolBarButtonBodySelected", selected);
}
});
});
},
'dojox/mobile/_ItemBase':function(){
define("dojox/mobile/_ItemBase", [
"dojo/_base/array",
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/_base/window",
"dojo/dom-class",
"dojo/touch",
"dijit/registry",
"dijit/_Contained",
"dijit/_Container",
"dijit/_WidgetBase",
"./TransitionEvent",
"./iconUtils"
], function(array, declare, lang, win, domClass, touch, registry, Contained, Container, WidgetBase, TransitionEvent, iconUtils){
// module:
// dojox/mobile/_ItemBase
return declare("dojox.mobile._ItemBase", [WidgetBase, Container, Contained],{
// summary:
// A base class for item classes (e.g. ListItem, IconItem, etc.).
// description:
// _ItemBase is a base class for widgets that have capability to
// make a view transition when clicked.
// icon: String
// An icon image to display. The value can be either a path for an
// image file or a class name of a DOM button. If icon is not
// specified, the iconBase parameter of the parent widget is used.
icon: "",
// iconPos: String
// The position of an aggregated icon. IconPos is comma separated
// values like top,left,width,height (ex. "0,0,29,29"). If iconPos
// is not specified, the iconPos parameter of the parent widget is
// used.
iconPos: "", // top,left,width,height (ex. "0,0,29,29")
// alt: String
// An alternate text for the icon image.
alt: "",
// href: String
// A URL of another web page to go to.
href: "",
// hrefTarget: String
// A target that specifies where to open a page specified by
// href. The value will be passed to the 2nd argument of
// window.open().
hrefTarget: "",
// moveTo: String
// The id of the transition destination view which resides in the
// current page.
//
// If the value has a hash sign ('#') before the id (e.g. #view1)
// and the dojo/hash module is loaded by the user application, the
// view transition updates the hash in the browser URL so that the
// user can bookmark the destination view. In this case, the user
// can also use the browser's back/forward button to navigate
// through the views in the browser history.
//
// If null, transitions to a blank view.
// If '#', returns immediately without transition.
moveTo: "",
// scene: String
// The name of a scene. Used from dojox/mobile/app.
scene: "",
// clickable: Boolean
// If true, this item becomes clickable even if a transition
// destination (moveTo, etc.) is not specified.
clickable: false,
// url: String
// A URL of an html fragment page or JSON data that represents a
// new view content. The view content is loaded with XHR and
// inserted in the current page. Then a view transition occurs to
// the newly created view. The view is cached so that subsequent
// requests would not load the content again.
url: "",
// urlTarget: String
// Node id under which a new view will be created according to the
// url parameter. If not specified, The new view will be created as
// a sibling of the current view.
urlTarget: "",
// back: Boolean
// If true, history.back() is called when clicked.
back: false,
// transition: String
// A type of animated transition effect. You can choose from the
// standard transition types, "slide", "fade", "flip", or from the
// extended transition types, "cover", "coverv", "dissolve",
// "reveal", "revealv", "scaleIn", "scaleOut", "slidev",
// "swirl", "zoomIn", "zoomOut", "cube", and "swap". If "none" is
// specified, transition occurs immediately without animation.
transition: "",
// transitionDir: Number
// The transition direction. If 1, transition forward. If -1,
// transition backward. For example, the slide transition slides
// the view from right to left when dir == 1, and from left to
// right when dir == -1.
transitionDir: 1,
// transitionOptions: Object
// A hash object that holds transition options.
transitionOptions: null,
// callback: Function|String
// A callback function that is called when the transition has been
// finished. A function reference, or name of a function in
// context.
callback: null,
// label: String
// A label of the item. If the label is not specified, innerHTML is
// used as a label.
label: "",
// toggle: Boolean
// If true, the item acts like a toggle button.
toggle: false,
// selected: Boolean
// If true, the item is highlighted to indicate it is selected.
selected: false,
// tabIndex: String
// Tabindex setting for the item so users can hit the tab key to
// focus on it.
tabIndex: "0",
// _setTabIndexAttr: [private] String
// Sets tabIndex to domNode.
_setTabIndexAttr: "",
/* internal properties */
// paramsToInherit: String
// Comma separated parameters to inherit from the parent.
paramsToInherit: "transition,icon",
// _selStartMethod: String
// Specifies how the item enters the selected state.
//
// - "touch": Use touch events to enter the selected state.
// - "none": Do not change the selected state.
_selStartMethod: "none", // touch or none
// _selEndMethod: String
// Specifies how the item leaves the selected state.
//
// - "touch": Use touch events to leave the selected state.
// - "timer": Use setTimeout to leave the selected state.
// - "none": Do not change the selected state.
_selEndMethod: "none", // touch, timer, or none
// _delayedSelection: Boolean
// If true, selection is delayed 100ms and canceled if dragged in
// order to avoid selection when flick operation is performed.
_delayedSelection: false,
// _duration: Number
// Duration of selection, milliseconds.
_duration: 800,
// _handleClick: Boolean
// If true, this widget listens to touch events.
_handleClick: true,
buildRendering: function(){
this.inherited(arguments);
this._isOnLine = this.inheritParams();
},
startup: function(){
if(this._started){ return; }
if(!this._isOnLine){
this.inheritParams();
}
if(this._handleClick && this._selStartMethod === "touch"){
this._onTouchStartHandle = this.connect(this.domNode, touch.press, "_onTouchStart");
}
this.inherited(arguments);
},
inheritParams: function(){
// summary:
// Copies from the parent the values of parameters specified
// by the property paramsToInherit.
var parent = this.getParent();
if(parent){
array.forEach(this.paramsToInherit.split(/,/), function(p){
if(p.match(/icon/i)){
var base = p + "Base", pos = p + "Pos";
if(this[p] && parent[base] &&
parent[base].charAt(parent[base].length - 1) === '/'){
this[p] = parent[base] + this[p];
}
if(!this[p]){ this[p] = parent[base]; }
if(!this[pos]){ this[pos] = parent[pos]; }
}
if(!this[p]){ this[p] = parent[p]; }
}, this);
}
return !!parent;
},
getTransOpts: function(){
// summary:
// Copies from the parent and returns the values of parameters
// specified by the property paramsToInherit.
var opts = this.transitionOptions || {};
array.forEach(["moveTo", "href", "hrefTarget", "url", "target",
"urlTarget", "scene", "transition", "transitionDir"], function(p){
opts[p] = opts[p] || this[p];
}, this);
return opts; // Object
},
userClickAction: function(/*Event*/ /*===== e =====*/){
// summary:
// User-defined click action.
},
defaultClickAction: function(/*Event*/e){
// summary:
// The default action of this item.
this.handleSelection(e);
if(this.userClickAction(e) === false){ return; } // user's click action
this.makeTransition(e);
},
handleSelection: function(/*Event*/e){
// summary:
// Handles this items selection state.
if(this._onTouchEndHandle){
this.disconnect(this._onTouchEndHandle);
this._onTouchEndHandle = null;
}
var p = this.getParent();
if(this.toggle){
this.set("selected", !this._currentSel);
}else if(p && p.selectOne){
this.set("selected", true);
}else{
if(this._selEndMethod === "touch"){
this.set("selected", false);
}else if(this._selEndMethod === "timer"){
var _this = this;
this.defer(function(){
_this.set("selected", false);
}, this._duration);
}
}
},
makeTransition: function(/*Event*/e){
// summary:
// Makes a transition.
if(this.back && history){
history.back();
return;
}
if (this.href && this.hrefTarget) {
win.global.open(this.href, this.hrefTarget || "_blank");
this._onNewWindowOpened(e);
return;
}
var opts = this.getTransOpts();
var doTransition =
!!(opts.moveTo || opts.href || opts.url || opts.target || opts.scene);
if(this._prepareForTransition(e, doTransition ? opts : null) === false){ return; }
if(doTransition){
this.setTransitionPos(e);
new TransitionEvent(this.domNode, opts, e).dispatch();
}
},
_onNewWindowOpened: function(/*Event*/ /*===== e =====*/){
// summary:
// Subclasses may want to implement it.
},
_prepareForTransition: function(/*Event*/e, /*Object*/transOpts){
// summary:
// Subclasses may want to implement it.
},
_onTouchStart: function(e){
// tags:
// private
if(this.getParent().isEditing || this.onTouchStart(e) === false){ return; } // user's touchStart action
if(!this._onTouchEndHandle && this._selStartMethod === "touch"){
// Connect to the entire window. Otherwise, fail to receive
// events if operation is performed outside this widget.
// Expose both connect handlers in case the user has interest.
this._onTouchMoveHandle = this.connect(win.body(), touch.move, "_onTouchMove");
this._onTouchEndHandle = this.connect(win.body(), touch.release, "_onTouchEnd");
}
this.touchStartX = e.touches ? e.touches[0].pageX : e.clientX;
this.touchStartY = e.touches ? e.touches[0].pageY : e.clientY;
this._currentSel = this.selected;
if(this._delayedSelection){
// so as not to make selection when the user flicks on ScrollableView
this._selTimer = setTimeout(lang.hitch(this, function(){ this.set("selected", true); }), 100);
}else{
this.set("selected", true);
}
},
onTouchStart: function(/*Event*/ /*===== e =====*/){
// summary:
// User-defined function to handle touchStart events.
// tags:
// callback
},
_onTouchMove: function(e){
// tags:
// private
var x = e.touches ? e.touches[0].pageX : e.clientX;
var y = e.touches ? e.touches[0].pageY : e.clientY;
if(Math.abs(x - this.touchStartX) >= 4 ||
Math.abs(y - this.touchStartY) >= 4){ // dojox/mobile/scrollable.threshold
this.cancel();
var p = this.getParent();
if(p && p.selectOne){
this._prevSel && this._prevSel.set("selected", true);
}else{
this.set("selected", false);
}
}
},
_disconnect: function(){
// tags:
// private
this.disconnect(this._onTouchMoveHandle);
this.disconnect(this._onTouchEndHandle);
this._onTouchMoveHandle = this._onTouchEndHandle = null;
},
cancel: function(){
// summary:
// Cancels an ongoing selection (if any).
if(this._selTimer){
clearTimeout(this._selTimer);
this._selTimer = null;
}
this._disconnect();
},
_onTouchEnd: function(e){
// tags:
// private
if(!this._selTimer && this._delayedSelection){ return; }
this.cancel();
this._onClick(e);
},
setTransitionPos: function(e){
// summary:
// Stores the clicked position for later use.
// description:
// Some of the transition animations (e.g. ScaleIn) need the
// clicked position.
var w = this;
while(true){
w = w.getParent();
if(!w || domClass.contains(w.domNode, "mblView")){ break; }
}
if(w){
w.clickedPosX = e.clientX;
w.clickedPosY = e.clientY;
}
},
transitionTo: function(/*String|Object*/moveTo, /*String*/href, /*String*/url, /*String*/scene){
// summary:
// Performs a view transition.
// description:
// Given a transition destination, this method performs a view
// transition. This method is typically called when this item
// is clicked.
var opts = (moveTo && typeof(moveTo) === "object") ? moveTo :
{moveTo: moveTo, href: href, url: url, scene: scene,
transition: this.transition, transitionDir: this.transitionDir};
new TransitionEvent(this.domNode, opts).dispatch();
},
_setIconAttr: function(icon){
// tags:
// private
if(!this._isOnLine){ return; } // icon may be invalid because inheritParams is not called yet
this._set("icon", icon);
this.iconNode = iconUtils.setIcon(icon, this.iconPos, this.iconNode, this.alt, this.iconParentNode, this.refNode, this.position);
},
_setLabelAttr: function(/*String*/text){
// tags:
// private
this._set("label", text);
this.labelNode.innerHTML = this._cv ? this._cv(text) : text;
},
_setSelectedAttr: function(/*Boolean*/selected){
// summary:
// Makes this widget in the selected or unselected state.
// description:
// Subclass should override.
// tags:
// private
if(selected){
var p = this.getParent();
if(p && p.selectOne){
// deselect the currently selected item
var arr = array.filter(p.getChildren(), function(w){
return w.selected;
});
array.forEach(arr, function(c){
this._prevSel = c;
c.set("selected", false);
}, this);
}
}
this._set("selected", selected);
}
});
});
},
'dijit/_Contained':function(){
define("dijit/_Contained", [
"dojo/_base/declare", // declare
"./registry" // registry.getEnclosingWidget(), registry.byNode()
], function(declare, registry){
// module:
// dijit/_Contained
return declare("dijit._Contained", null, {
// summary:
// Mixin for widgets that are children of a container widget
//
// example:
// | // make a basic custom widget that knows about it's parents
// | declare("my.customClass",[dijit._Widget,dijit._Contained],{});
_getSibling: function(/*String*/ which){
// summary:
// Returns next or previous sibling
// which:
// Either "next" or "previous"
// tags:
// private
var node = this.domNode;
do{
node = node[which+"Sibling"];
}while(node && node.nodeType != 1);
return node && registry.byNode(node); // dijit/_WidgetBase
},
getPreviousSibling: function(){
// summary:
// Returns null if this is the first child of the parent,
// otherwise returns the next element sibling to the "left".
return this._getSibling("previous"); // dijit/_WidgetBase
},
getNextSibling: function(){
// summary:
// Returns null if this is the last child of the parent,
// otherwise returns the next element sibling to the "right".
return this._getSibling("next"); // dijit/_WidgetBase
},
getIndexInParent: function(){
// summary:
// Returns the index of this widget within its container parent.
// It returns -1 if the parent does not exist, or if the parent
// is not a dijit._Container
var p = this.getParent();
if(!p || !p.getIndexOfChild){
return -1; // int
}
return p.getIndexOfChild(this); // int
}
});
});
},
'dojox/mobile/_base':function(){
define("dojox/mobile/_base", [
"./common",
"./View",
"./Heading",
"./RoundRect",
"./RoundRectCategory",
"./EdgeToEdgeCategory",
"./RoundRectList",
"./EdgeToEdgeList",
"./ListItem",
"./Container",
"./Pane",
"./Switch",
"./ToolBarButton",
"./ProgressIndicator"
], function(common, View, Heading, RoundRect, RoundRectCategory, EdgeToEdgeCategory, RoundRectList, EdgeToEdgeList, ListItem, Switch, ToolBarButton, ProgressIndicator){
// module:
// dojox/mobile/_base
/*=====
return {
// summary:
// Includes the basic dojox/mobile modules: common, View, Heading,
// RoundRect, RoundRectCategory, EdgeToEdgeCategory, RoundRectList,
// EdgeToEdgeList, ListItem, Container, Pane, Switch, ToolBarButton,
// and ProgressIndicator.
};
=====*/
return common;
});
},
'dijit/main':function(){
define("dijit/main", [
"dojo/_base/kernel"
], function(dojo){
// module:
// dijit/main
/*=====
return {
// summary:
// The dijit package main module.
// Deprecated. Users should access individual modules (ex: dijit/registry) directly.
};
=====*/
return dojo.dijit;
});
},
'dijit/Destroyable':function(){
define("dijit/Destroyable", [
"dojo/_base/array", // array.forEach array.map
"dojo/aspect",
"dojo/_base/declare"
], function(array, aspect, declare){
// module:
// dijit/Destroyable
return declare("dijit.Destroyable", null, {
// summary:
// Mixin to track handles and release them when instance is destroyed.
// description:
// Call this.own(...) on list of handles (returned from dojo/aspect, dojo/on,
// dojo/Stateful::watch, or any class (including widgets) with a destroyRecursive() or destroy() method.
// Then call destroy() later to destroy this instance and release the resources.
destroy: function(/*Boolean*/ preserveDom){
// summary:
// Destroy this class, releasing any resources registered via own().
this._destroyed = true;
},
own: function(){
// summary:
// Track specified handles and remove/destroy them when this instance is destroyed, unless they were
// already removed/destroyed manually.
// tags:
// protected
// returns:
// The array of specified handles, so you can do for example:
// | var handle = this.own(on(...))[0];
array.forEach(arguments, function(handle){
var destroyMethodName =
"destroyRecursive" in handle ? "destroyRecursive" : // remove "destroyRecursive" for 2.0
"destroy" in handle ? "destroy" :
"remove";
// When this is destroyed, destroy handle. Since I'm using aspect.before(),
// the handle will be destroyed before a subclass's destroy() method starts running, before it calls
// this.inherited() or even if it doesn't call this.inherited() at all. If that's an issue, make an
// onDestroy() method and connect to that instead.
handle._odh = aspect.before(this, "destroy", function(preserveDom){
handle._odh.remove();
handle[destroyMethodName](preserveDom);
});
// If handle is destroyed manually before this is destroyed, then remove the listener set directly above.
aspect.after(handle, destroyMethodName, function(){
handle._odh.remove();
});
}, this);
return arguments; // handle
}
});
});
},
'dijit/_Container':function(){
define("dijit/_Container", [
"dojo/_base/array", // array.forEach array.indexOf
"dojo/_base/declare", // declare
"dojo/dom-construct" // domConstruct.place
], function(array, declare, domConstruct){
// module:
// dijit/_Container
return declare("dijit._Container", null, {
// summary:
// Mixin for widgets that contain HTML and/or a set of widget children.
buildRendering: function(){
this.inherited(arguments);
if(!this.containerNode){
// all widgets with descendants must set containerNode
this.containerNode = this.domNode;
}
},
addChild: function(/*dijit/_WidgetBase*/ widget, /*int?*/ insertIndex){
// summary:
// Makes the given widget a child of this widget.
// description:
// Inserts specified child widget's dom node as a child of this widget's
// container node, and possibly does other processing (such as layout).
//
// Functionality is undefined if this widget contains anything besides
// a list of child widgets (ie, if it contains arbitrary non-widget HTML).
var refNode = this.containerNode;
if(insertIndex && typeof insertIndex == "number"){
var children = this.getChildren();
if(children && children.length >= insertIndex){
refNode = children[insertIndex-1].domNode;
insertIndex = "after";
}
}
domConstruct.place(widget.domNode, refNode, insertIndex);
// If I've been started but the child widget hasn't been started,
// start it now. Make sure to do this after widget has been
// inserted into the DOM tree, so it can see that it's being controlled by me,
// so it doesn't try to size itself.
if(this._started && !widget._started){
widget.startup();
}
},
removeChild: function(/*Widget|int*/ widget){
// summary:
// Removes the passed widget instance from this widget but does
// not destroy it. You can also pass in an integer indicating
// the index within the container to remove (ie, removeChild(5) removes the sixth widget).
if(typeof widget == "number"){
widget = this.getChildren()[widget];
}
if(widget){
var node = widget.domNode;
if(node && node.parentNode){
node.parentNode.removeChild(node); // detach but don't destroy
}
}
},
hasChildren: function(){
// summary:
// Returns true if widget has child widgets, i.e. if this.containerNode contains widgets.
return this.getChildren().length > 0; // Boolean
},
_getSiblingOfChild: function(/*dijit/_WidgetBase*/ child, /*int*/ dir){
// summary:
// Get the next or previous widget sibling of child
// dir:
// if 1, get the next sibling
// if -1, get the previous sibling
// tags:
// private
var children = this.getChildren(),
idx = array.indexOf(this.getChildren(), child); // int
return children[idx + dir];
},
getIndexOfChild: function(/*dijit/_WidgetBase*/ child){
// summary:
// Gets the index of the child in this container or -1 if not found
return array.indexOf(this.getChildren(), child); // int
}
});
});
}}});
define("dojox/mobile", [
".",
"dojo/_base/lang",
"dojox/mobile/_base"
], function(dojox, lang, base){
lang.getObject("mobile", true, dojox);
/*=====
return {
// summary:
// Deprecated. Should require dojox/mobile classes directly rather than trying to access them through
// this module.
};
=====*/
return dojox.mobile;
});