summaryrefslogtreecommitdiff
path: root/lib/dijit/_Contained.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-08-14 18:59:10 +0400
committerAndrew Dolgov <[email protected]>2012-08-14 18:59:18 +0400
commit1354d17270961fff662d40f90521223f8fd0d73b (patch)
treee9266be71587e47c800303446e968a6d3565e2cf /lib/dijit/_Contained.js
parentd04f8c826f5283765f52cf6b98b42a1ed8f2d6bc (diff)
update dojo to 1.7.3
Diffstat (limited to 'lib/dijit/_Contained.js')
-rw-r--r--lib/dijit/_Contained.js78
1 files changed, 2 insertions, 76 deletions
diff --git a/lib/dijit/_Contained.js b/lib/dijit/_Contained.js
index fcefca1f8..047e0d591 100644
--- a/lib/dijit/_Contained.js
+++ b/lib/dijit/_Contained.js
@@ -1,76 +1,2 @@
-/*
- Copyright (c) 2004-2011, 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"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit._Contained"] = true;
-dojo.provide("dijit._Contained");
-
-
-dojo.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
- // | dojo.declare("my.customClass",[dijit._Widget,dijit._Contained],{});
-
- getParent: function(){
- // summary:
- // Returns the parent widget of this widget, assuming the parent
- // specifies isContainer
- var parent = dijit.getEnclosingWidget(this.domNode.parentNode);
- return parent && parent.isContainer ? parent : null;
- },
-
- _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 && dijit.byNode(node); // dijit._Widget
- },
-
- 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._Widget
- },
-
- 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._Widget
- },
-
- 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
- }
- }
- );
-
-}
+//>>built
+define("dijit/_Contained",["dojo/_base/declare","./registry"],function(_1,_2){return _1("dijit._Contained",null,{_getSibling:function(_3){var _4=this.domNode;do{_4=_4[_3+"Sibling"];}while(_4&&_4.nodeType!=1);return _4&&_2.byNode(_4);},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);}});}); \ No newline at end of file