summaryrefslogtreecommitdiff
path: root/lib/dijit/_Contained.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-15 10:39:52 +0300
committerAndrew Dolgov <[email protected]>2010-11-15 10:39:52 +0300
commit2f01fe57a8d37767827d6db42850aef86a767c53 (patch)
tree516a95ffce2fc2435aed8d9976e444dbcba7dce3 /lib/dijit/_Contained.js
parent951906dcecb1d3c7bcf751976a03e0c196ca6db0 (diff)
add dijit/dojo stuff; initial ui mockup
Diffstat (limited to 'lib/dijit/_Contained.js')
-rw-r--r--lib/dijit/_Contained.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/dijit/_Contained.js b/lib/dijit/_Contained.js
new file mode 100644
index 000000000..50d9dc559
--- /dev/null
+++ b/lib/dijit/_Contained.js
@@ -0,0 +1,31 @@
+/*
+ Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dijit._Contained"]){
+dojo._hasResource["dijit._Contained"]=true;
+dojo.provide("dijit._Contained");
+dojo.declare("dijit._Contained",null,{getParent:function(){
+var _1=dijit.getEnclosingWidget(this.domNode.parentNode);
+return _1&&_1.isContainer?_1:null;
+},_getSibling:function(_2){
+var _3=this.domNode;
+do{
+_3=_3[_2+"Sibling"];
+}while(_3&&_3.nodeType!=1);
+return _3&&dijit.byNode(_3);
+},getPreviousSibling:function(){
+return this._getSibling("previous");
+},getNextSibling:function(){
+return this._getSibling("next");
+},getIndexInParent:function(){
+var p=this.getParent();
+if(!p||!p.getIndexOfChild){
+return -1;
+}
+return p.getIndexOfChild(this);
+}});
+}