12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- if(!dojo._hasResource["dijit._Contained"]){
- dojo._hasResource["dijit._Contained"] = true;
- dojo.provide("dijit._Contained");
- dojo.declare("dijit._Contained",
- null,
- {
-
-
-
-
-
-
- getParent: function(){
-
-
-
- var parent = dijit.getEnclosingWidget(this.domNode.parentNode);
- return parent && parent.isContainer ? parent : null;
- },
- _getSibling: function(/*String*/ which){
-
-
-
-
-
-
- var node = this.domNode;
- do{
- node = node[which+"Sibling"];
- }while(node && node.nodeType != 1);
- return node && dijit.byNode(node);
- },
- 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);
- }
- }
- );
- }
|