Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

For properties created by parent widgets (like !BorderContainer) that…

… are set on child widgets, document the properties on sub-pages of the parent widget, rather than on the _WidgetBase page. Refs #13101 !strict.
  • Loading branch information...
commit 7ae88d3360b82452c3f5cd285ced98f44b848c60 1 parent 56ead81
Bill Keese wkeese authored
3  _Templated.js
View
@@ -14,7 +14,8 @@ define([
// These arguments can be specified for widgets which are used in templates.
// Since any widget can be specified as sub widgets in template, mix it
// into the base widget class. (This is a hack, but it's effective.)
- lang.extend(_WidgetBase, {
+ // Remove for 2.0. Also, hide from API doc parser.
+ lang.extend(_WidgetBase, /*===== {} || =====*/ {
waiRole: "",
waiState:""
});
5 _TemplatedMixin.js
View
@@ -297,8 +297,9 @@ define([
// These arguments can be specified for widgets which are used in templates.
// Since any widget can be specified as sub widgets in template, mix it
- // into the base widget class. (This is a hack, but it's effective.)
- lang.extend(_WidgetBase,{
+ // into the base widget class. (This is a hack, but it's effective.).
+ // Remove for 2.0. Also, hide from API doc parser.
+ lang.extend(_WidgetBase, /*===== {} || =====*/ {
dojoAttachEvent: "",
dojoAttachPoint: ""
});
37 layout/BorderContainer.js
View
@@ -25,19 +25,19 @@ define([
var _Splitter = declare("dijit.layout._Splitter", [_Widget, _TemplatedMixin ],
{
// summary:
- // A draggable spacer between two items in a `dijit.layout.BorderContainer`.
+ // A draggable spacer between two items in a `dijit/layout/BorderContainer`.
// description:
- // This is instantiated by `dijit.layout.BorderContainer`. Users should not
+ // This is instantiated by `dijit/layout/BorderContainer`. Users should not
// create it directly.
// tags:
// private
/*=====
- // container: [const] dijit.layout.BorderContainer
+ // container: [const] dijit/layout/BorderContainer
// Pointer to the parent BorderContainer
container: null,
- // child: [const] dijit.layout._LayoutWidget
+ // child: [const] dijit/layout/_LayoutWidget
// Pointer to the pane associated with this splitter
child: null,
@@ -216,7 +216,7 @@ var _Gutter = declare("dijit.layout._Gutter", [_Widget, _TemplatedMixin],
// Just a spacer div to separate side pane from center pane.
// Basically a trick to lookup the gutter/splitter width from the theme.
// description:
- // Instantiated by `dijit.layout.BorderContainer`. Users should not
+ // Instantiated by `dijit/layout/BorderContainer`. Users should not
// create directly.
// tags:
// private
@@ -237,7 +237,6 @@ var _Gutter = declare("dijit.layout._Gutter", [_Widget, _TemplatedMixin],
var BorderContainer = declare("dijit.layout.BorderContainer", _LayoutWidget, {
// summary:
// Provides layout in up to 5 regions, a mandatory center with optional borders along its 4 sides.
- //
// description:
// A BorderContainer is a box with a specified size, such as style="width: 500px; height: 500px;",
// that contains a child widget marked region="center" and optionally children widgets marked
@@ -255,6 +254,9 @@ var BorderContainer = declare("dijit.layout.BorderContainer", _LayoutWidget, {
// layoutPriority flag on the children determines which child is closer to the edge (low layoutPriority)
// and which child is closer to the center (high layoutPriority). layoutPriority can also be used
// instead of the design attribute to control layout precedence of horizontal vs. vertical panes.
+ //
+ // See `BorderContainer.ChildWidgetProperties` for details on the properties that can be set on
+ // children of a `BorderContainer`.
// example:
// | <div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design: 'sidebar', gutters: false"
// | style="width: 400px; height: 300px;">
@@ -503,38 +505,39 @@ var BorderContainer = declare("dijit.layout.BorderContainer", _LayoutWidget, {
}
});
-// This argument can be specified for the children of a BorderContainer.
-// Since any widget can be specified as a LayoutContainer child, mix it
-// into the base widget class. (This is a hack, but it's effective.)
-lang.extend(_WidgetBase, {
+BorderContainer.ChildWidgetProperties = {
+ // summary:
+ // These properties can be specified for the children of a BorderContainer.
+
// region: [const] String
- // Parameter for children of `dijit.layout.BorderContainer`.
// Values: "top", "bottom", "leading", "trailing", "left", "right", "center".
- // See the `dijit.layout.BorderContainer` description for details.
+ // See the `dijit/layout/BorderContainer` description for details.
region: '',
// layoutPriority: [const] Number
- // Parameter for children of `dijit.layout.BorderContainer`.
// Children with a higher layoutPriority will be placed closer to the BorderContainer center,
// between children with a lower layoutPriority.
layoutPriority: 0,
// splitter: [const] Boolean
- // Parameter for child of `dijit.layout.BorderContainer` where region != "center".
+ // Parameter for children where region != "center".
// If true, enables user to resize the widget by putting a draggable splitter between
// this widget and the region=center widget.
splitter: false,
// minSize: [const] Number
- // Parameter for children of `dijit.layout.BorderContainer`.
// Specifies a minimum size (in pixels) for this widget when resized by a splitter.
minSize: 0,
// maxSize: [const] Number
- // Parameter for children of `dijit.layout.BorderContainer`.
// Specifies a maximum size (in pixels) for this widget when resized by a splitter.
maxSize: Infinity
-});
+};
+
+// Since any widget can be specified as a LayoutContainer child, mix it
+// into the base widget class. (This is a hack, but it's effective.)
+// This is for the benefit of the parser. Remove for 2.0. Also, hide from doc viewer.
+lang.extend(_WidgetBase, /*===== {} || =====*/ BorderContainer.ChildWidgetProperties);
// For monkey patching
BorderContainer._Splitter = _Splitter;
33 layout/LayoutContainer.js
View
@@ -10,21 +10,9 @@ define([
// module:
// dijit/layout/LayoutContainer
-
-// This argument can be specified for the children of a LayoutContainer.
-// Since any widget can be specified as a LayoutContainer child, mix it
-// into the base widget class. (This is a hack, but it's effective.)
-lang.extend(_WidgetBase, {
- // layoutAlign: String
- // "none", "left", "right", "bottom", "top", and "client".
- // See the LayoutContainer description for details on this parameter.
- layoutAlign: 'none'
-});
-
-return declare("dijit.layout.LayoutContainer", _LayoutWidget, {
+var LayoutContainer = declare("dijit.layout.LayoutContainer", _LayoutWidget, {
// summary:
// Deprecated. Use `dijit.layout.BorderContainer` instead.
- //
// description:
// Provides Delphi-style panel layout semantics.
//
@@ -40,6 +28,9 @@ return declare("dijit.layout.LayoutContainer", _LayoutWidget, {
// Note that there can only be one client element, but there can be multiple left, right, top,
// or bottom elements.
//
+ // See `LayoutContainer.ChildWidgetProperties` for details on the properties that can be set on
+ // children of a `LayoutContainer`.
+ //
// example:
// | <style>
// | html, body{ height: 100%; width: 100%; }
@@ -81,4 +72,20 @@ return declare("dijit.layout.LayoutContainer", _LayoutWidget, {
}
});
+LayoutContainer.ChildWidgetProperties = {
+ // summary:
+ // This property can be specified for the children of a LayoutContainer.
+
+ // layoutAlign: String
+ // "none", "left", "right", "bottom", "top", and "client".
+ // See the LayoutContainer description for details on this parameter.
+ layoutAlign: 'none'
+};
+
+// Since any widget can be specified as a LayoutContainer child, mix it
+// into the base widget class. (This is a hack, but it's effective.)
+// This is for the benefit of the parser. Remove for 2.0. Also, hide from doc viewer.
+lang.extend(_WidgetBase, /*===== {} || =====*/ LayoutContainer.ChildWidgetProperties);
+
+return LayoutContainer;
});
48 layout/SplitContainer.js
View
@@ -27,26 +27,7 @@ define([
// FIXME: sizeWidth should be a CSS attribute (at 7 because css wants it to be 7 until we fix to css)
//
-// These arguments can be specified for the children of a SplitContainer.
-// Since any widget can be specified as a SplitContainer child, mix them
-// into the base widget class. (This is a hack, but it's effective.)
-lang.extend(_WidgetBase, {
- // sizeMin: [deprecated] Integer
- // Deprecated. Parameter for children of `dijit.layout.SplitContainer`.
- // Minimum size (width or height) of a child of a SplitContainer.
- // The value is relative to other children's sizeShare properties.
- sizeMin: 10,
-
- // sizeShare: [deprecated] Integer
- // Deprecated. Parameter for children of `dijit.layout.SplitContainer`.
- // Size (width or height) of a child of a SplitContainer.
- // The value is relative to other children's sizeShare properties.
- // For example, if there are two children and each has sizeShare=10, then
- // each takes up 50% of the available space.
- sizeShare: 10
-});
-
-return declare("dijit.layout.SplitContainer", _LayoutWidget, {
+var SplitContainer = declare("dijit.layout.SplitContainer", _LayoutWidget, {
// summary:
// Deprecated. Use `dijit.layout.BorderContainer` instead.
// description:
@@ -56,6 +37,9 @@ return declare("dijit.layout.SplitContainer", _LayoutWidget, {
// and you can adjust the relative size of each child by dragging the bars.
//
// You must specify a size (width and height) for the SplitContainer.
+ //
+ // See `SplitContainer.ChildWidgetProperties` for details on the properties that can be set on
+ // children of a `SplitContainer`.
// tags:
// deprecated
@@ -573,4 +557,28 @@ return declare("dijit.layout.SplitContainer", _LayoutWidget, {
}
});
+SplitContainer.ChildWidgetProperties = {
+ // summary:
+ // These properties can be specified for the children of a SplitContainer.
+
+ // sizeMin: [deprecated] Integer
+ // Minimum size (width or height) of a child of a SplitContainer.
+ // The value is relative to other children's sizeShare properties.
+ sizeMin: 10,
+
+ // sizeShare: [deprecated] Integer
+ // Size (width or height) of a child of a SplitContainer.
+ // The value is relative to other children's sizeShare properties.
+ // For example, if there are two children and each has sizeShare=10, then
+ // each takes up 50% of the available space.
+ sizeShare: 10
+};
+
+// Since any widget can be specified as a SplitContainer child, mix them
+// into the base widget class. (This is a hack, but it's effective.)
+// This is for the benefit of the parser. Remove for 2.0. Also, hide from doc viewer.
+lang.extend(_WidgetBase, /*===== {} || =====*/ SplitContainer.ChildWidgetProperties);
+
+return SplitContainer;
+
});
77 layout/StackContainer.js
View
@@ -25,40 +25,7 @@ if(has("dijit-legacy-requires")){
});
}
-// These arguments can be specified for the children of a StackContainer.
-// Since any widget can be specified as a StackContainer child, mix them
-// into the base widget class. (This is a hack, but it's effective.)
-lang.extend(_WidgetBase, {
- // selected: Boolean
- // Attribute of children of `dijit.layout.StackContainer` and subclasses.
- // Specifies that this widget should be the initially displayed pane.
- // Note: to change the selected child use `dijit.layout.StackContainer.selectChild`
- selected: false,
-
- // disabled: Boolean
- // Attribute of children of `dijit.layout.StackContainer` and subclasses.
- // Specifies that the button to select this pane should be disabled.
- // Doesn't affect programmatic selection of the pane, nor does it deselect the pane if it is currently selected.
- disabled: false,
-
- // closable: Boolean
- // Attribute of children of `dijit.layout.StackContainer` and subclasses.
- // True if user can close (destroy) this child, such as (for example) clicking the X on the tab.
- closable: false,
-
- // iconClass: String
- // Attribute of children of `dijit.layout.StackContainer` and subclasses.
- // CSS Class specifying icon to use in label associated with this pane.
- iconClass: "dijitNoIcon",
-
- // showTitle: Boolean
- // Attribute of children of `dijit.layout.StackContainer` and subclasses.
- // When true, display title of this widget as tab label etc., rather than just using
- // icon specified in iconClass
- showTitle: true
-});
-
-return declare("dijit.layout.StackContainer", _LayoutWidget, {
+var StackContainer = declare("dijit.layout.StackContainer", _LayoutWidget, {
// summary:
// A container that has multiple children, but shows only
// one child at a time
@@ -70,6 +37,9 @@ return declare("dijit.layout.StackContainer", _LayoutWidget, {
// Publishes topics [widgetId]-addChild, [widgetId]-removeChild, and [widgetId]-selectChild
//
// Can be base class for container, Wizard, Show, etc.
+ //
+ // See `StackContainer.ChildWidgetProperties` for details on the properties that can be set on
+ // children of a `StackContainer`.
// doLayout: Boolean
// If true, change the size of my currently displayed child to match my size
@@ -367,4 +337,43 @@ return declare("dijit.layout.StackContainer", _LayoutWidget, {
}
});
+StackContainer.ChildWidgetProperties = {
+ // summary:
+ // These properties can be specified for the children of a StackContainer.
+
+ // selected: Boolean
+ // Attribute of children of `dijit.layout.StackContainer` and subclasses.
+ // Specifies that this widget should be the initially displayed pane.
+ // Note: to change the selected child use `dijit.layout.StackContainer.selectChild`
+ selected: false,
+
+ // disabled: Boolean
+ // Attribute of children of `dijit.layout.StackContainer` and subclasses.
+ // Specifies that the button to select this pane should be disabled.
+ // Doesn't affect programmatic selection of the pane, nor does it deselect the pane if it is currently selected.
+ disabled: false,
+
+ // closable: Boolean
+ // Attribute of children of `dijit.layout.StackContainer` and subclasses.
+ // True if user can close (destroy) this child, such as (for example) clicking the X on the tab.
+ closable: false,
+
+ // iconClass: String
+ // Attribute of children of `dijit.layout.StackContainer` and subclasses.
+ // CSS Class specifying icon to use in label associated with this pane.
+ iconClass: "dijitNoIcon",
+
+ // showTitle: Boolean
+ // Attribute of children of `dijit.layout.StackContainer` and subclasses.
+ // When true, display title of this widget as tab label etc., rather than just using
+ // icon specified in iconClass
+ showTitle: true
+};
+
+// Since any widget can be specified as a StackContainer child, mix them
+// into the base widget class. (This is a hack, but it's effective.)
+// This is for the benefit of the parser. Remove for 2.0. Also, hide from doc viewer.
+lang.extend(_WidgetBase, /*===== {} || =====*/ StackContainer.ChildWidgetProperties);
+
+return StackContainer;
});
3  layout/TabContainer.js
View
@@ -17,6 +17,9 @@ define([
// A TabContainer is a container that has multiple panes, but shows only
// one pane at a time. There are a set of tabs corresponding to each pane,
// where each tab has the name (aka title) of the pane, and optionally a close button.
+ //
+ // See `StackContainer.ChildWidgetProperties` for details on the properties that can be set on
+ // children of a `TabContainer`.
// useMenu: [const] Boolean
// True if a menu should be used to select tabs when they are too
Please sign in to comment.
Something went wrong with that request. Please try again.