Skip to content

Commit

Permalink
start removing _Widget, refs #1
Browse files Browse the repository at this point in the history
Many of the modules converted to use _WidgetBase instead of _Widget need to be changed to include _OnDijitClickMixin, _FocusMixin, dojo/uacss, and dojo/hccss.
  • Loading branch information
wkeese committed Mar 8, 2013
1 parent e9abbbd commit 70bd6ff
Show file tree
Hide file tree
Showing 42 changed files with 98 additions and 1,205 deletions.
8 changes: 4 additions & 4 deletions Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ define([
"dojo/on",
"dojo/sniff", // has("ie")
"./CalendarLite",
"./_Widget",
"./_WidgetBase",
"./_CssStateMixin",
"./_TemplatedMixin",
"./form/DropDownButton"
], function(array, date, local, declare, domAttr, domClass, kernel, keys, lang, on, has, CalendarLite, _Widget, _CssStateMixin, _TemplatedMixin, DropDownButton){
], function(array, date, local, declare, domAttr, domClass, kernel, keys, lang, on, has, CalendarLite, _WidgetBase, _CssStateMixin, _TemplatedMixin, DropDownButton){

// module:
// dijit/Calendar

var Calendar = declare("dijit.Calendar",
[CalendarLite, _Widget, _CssStateMixin], // _Widget for deprecated methods like setAttribute()
[CalendarLite, _WidgetBase, _CssStateMixin], // _WidgetBase for deprecated methods like setAttribute()
{
// summary:
// A simple GUI for choosing a date in the context of a monthly calendar.
Expand Down Expand Up @@ -285,7 +285,7 @@ define([
}
});

Calendar._MonthDropDown = declare("dijit.Calendar._MonthDropDown", [_Widget, _TemplatedMixin], {
Calendar._MonthDropDown = declare("dijit.Calendar._MonthDropDown", [_WidgetBase, _TemplatedMixin], {
// summary:
// The list-of-months drop down from the MonthDropDownButton

Expand Down
6 changes: 3 additions & 3 deletions ColorPalette.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
define([
"require", // require.toUrl
"dojo/text!./templates/ColorPalette.html",
"./_Widget", // used also to load dijit/hccss for setting has("highcontrast")
"./_WidgetBase",
"./_TemplatedMixin",
"./_PaletteMixin",
"./hccss", // has("highcontrast")
Expand All @@ -12,13 +12,13 @@ define([
"dojo/string", // string.substitute
"dojo/i18n!dojo/nls/colors", // translations
"dojo/colors" // extend dojo.Color w/names of other colors
], function(require, template, _Widget, _TemplatedMixin, _PaletteMixin, has, i18n, Color,
], function(require, template, _WidgetBase, _TemplatedMixin, _PaletteMixin, has, i18n, Color,
declare, domConstruct, string){

// module:
// dijit/ColorPalette

var ColorPalette = declare("dijit.ColorPalette", [_Widget, _TemplatedMixin, _PaletteMixin], {
var ColorPalette = declare("dijit.ColorPalette", [_WidgetBase, _TemplatedMixin, _PaletteMixin], {
// summary:
// A keyboard accessible color-picking widget
// description:
Expand Down
10 changes: 5 additions & 5 deletions Declaration.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ define([
"dojo/_base/lang", // lang.getObject
"dojo/parser", // parser._functionFromScript
"dojo/query", // query
"./_Widget",
"./_WidgetBase",
"./_TemplatedMixin",
"./_WidgetsInTemplateMixin",
"dojo/NodeList-dom"
], function(array, aspect, declare, lang, parser, query, _Widget, _TemplatedMixin, _WidgetsInTemplateMixin){
], function(array, aspect, declare, lang, parser, query, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin){

// module:
// dijit/Declaration

return declare("dijit.Declaration", _Widget, {
return declare("dijit.Declaration", _WidgetBase, {
// summary:
// The Declaration widget allows a developer to declare new widget
// classes directly from a snippet of markup.
Expand All @@ -38,7 +38,7 @@ define([

// mixins: [const] String[]
// List containing the prototype for this widget, and also any mixins,
// ex: ["dijit._Widget", "dijit._Container"]
// ex: ["dijit._WidgetBase", "dijit._Container"]
mixins: [],

buildRendering: function(){
Expand Down Expand Up @@ -70,7 +70,7 @@ define([
if(this.mixins.length){
this.mixins = array.map(this.mixins, function(name){ return lang.getObject(name); } );
}else{
this.mixins = [ _Widget, _TemplatedMixin, _WidgetsInTemplateMixin ];
this.mixins = [ _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin ];
}

propList._skipNodeCache = true;
Expand Down
4 changes: 2 additions & 2 deletions Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ define([
"dojo/dnd/TimedMoveable", // TimedMoveable
"./focus",
"./_base/manager", // manager.defaultDuration
"./_Widget",
"./_WidgetBase",
"./_TemplatedMixin",
"./_CssStateMixin",
"./form/_FormMixin",
Expand All @@ -30,7 +30,7 @@ define([
"dojo/i18n!./nls/common"
], function(require, array, aspect, declare, Deferred,
dom, domClass, domGeometry, domStyle, fx, i18n, keys, lang, on, ready, has, winUtils,
Moveable, TimedMoveable, focus, manager, _Widget, _TemplatedMixin, _CssStateMixin, _FormMixin, _DialogMixin,
Moveable, TimedMoveable, focus, manager, _WidgetBase, _TemplatedMixin, _CssStateMixin, _FormMixin, _DialogMixin,
DialogUnderlay, ContentPane, template){

// module:
Expand Down
4 changes: 2 additions & 2 deletions DialogUnderlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ define([
"dojo/dom-style", // domStyle.getComputedStyle
"dojo/on",
"dojo/window", // winUtils.getBox, winUtils.get
"./_Widget",
"./_WidgetBase",
"./_TemplatedMixin",
"./BackgroundIframe",
"./Viewport",
Expand All @@ -17,7 +17,7 @@ define([
// module:
// dijit/DialogUnderlay

var DialogUnderlay = declare("dijit.DialogUnderlay", [_Widget, _TemplatedMixin], {
var DialogUnderlay = declare("dijit.DialogUnderlay", [_WidgetBase, _TemplatedMixin], {
// summary:
// A component used to block input behind a `dijit/Dialog`.
//
Expand Down
8 changes: 4 additions & 4 deletions InlineEditBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ define([
"dojo/when",
"./a11yclick",
"./focus",
"./_Widget",
"./_WidgetBase",
"./_TemplatedMixin",
"./_WidgetsInTemplateMixin",
"./_Container",
Expand All @@ -25,12 +25,12 @@ define([
"./form/TextBox",
"dojo/text!./templates/InlineEditBox.html",
"dojo/i18n!./nls/common"
], function(require, array, aspect, declare, domAttr, domClass, domConstruct, domStyle, i18n, kernel, keys, lang, on, has, when, a11yclick, fm, _Widget, _TemplatedMixin, _WidgetsInTemplateMixin, _Container, Button, _TextBoxMixin, TextBox, template){
], function(require, array, aspect, declare, domAttr, domClass, domConstruct, domStyle, i18n, kernel, keys, lang, on, has, when, a11yclick, fm, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, _Container, Button, _TextBoxMixin, TextBox, template){

// module:
// dijit/InlineEditBox

var InlineEditor = declare("dijit._InlineEditor", [_Widget, _TemplatedMixin, _WidgetsInTemplateMixin], {
var InlineEditor = declare("dijit._InlineEditor", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {
// summary:
// Internal widget used by InlineEditBox, displayed when in editing mode
// to display the editor and maybe save/cancel buttons. Calling code should
Expand Down Expand Up @@ -255,7 +255,7 @@ define([
});


var InlineEditBox = declare("dijit.InlineEditBox" + (has("dojo-bidi") ? "_NoBidi" : ""), _Widget, {
var InlineEditBox = declare("dijit.InlineEditBox" + (has("dojo-bidi") ? "_NoBidi" : ""), _WidgetBase, {
// summary:
// An element with in-line edit capabilities
//
Expand Down
7 changes: 4 additions & 3 deletions MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@ define([
"dojo/_base/kernel", // kernel.deprecated
"dojo/sniff", // has("ie")
"dojo/_base/lang", // lang.hitch
"./_Widget",
"./_WidgetBase",
"./_TemplatedMixin",
"./_Contained",
"./_CssStateMixin",
"dojo/text!./templates/MenuItem.html"
], function(declare, dom, domAttr, domClass, kernel, has, lang,
_Widget, _TemplatedMixin, _Contained, _CssStateMixin, template){
_WidgetBase, _TemplatedMixin, _Contained, _CssStateMixin, template){

// module:
// dijit/MenuItem

var MenuItem = declare("dijit.MenuItem" + (has("dojo-bidi") ? "_NoBidi" : ""),
[_Widget, _TemplatedMixin, _Contained, _CssStateMixin], {
[_WidgetBase, _TemplatedMixin, _Contained, _CssStateMixin], {

// summary:
// A line item in a Menu Widget

Expand Down
6 changes: 3 additions & 3 deletions ProgressBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ define([
"dojo/dom-class", // domClass.toggle
"dojo/_base/lang", // lang.mixin
"dojo/number", // number.format
"./_Widget",
"./_WidgetBase",
"./_TemplatedMixin",
"dojo/text!./templates/ProgressBar.html"
], function(require, declare, domClass, lang, number, _Widget, _TemplatedMixin, template){
], function(require, declare, domClass, lang, number, _WidgetBase, _TemplatedMixin, template){

// module:
// dijit/ProgressBar

return declare("dijit.ProgressBar", [_Widget, _TemplatedMixin], {
return declare("dijit.ProgressBar", [_WidgetBase, _TemplatedMixin], {
// summary:
// A progress indication widget, showing the amount completed
// (often the percentage completed) of a task.
Expand Down
6 changes: 3 additions & 3 deletions Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ define([
"dojo/_base/declare", // declare
"dojo/has",
"dojo/keys", // keys.LEFT_ARROW keys.RIGHT_ARROW
"./_Widget",
"./_WidgetBase",
"./_KeyNavContainer",
"./_TemplatedMixin"
], function(require, declare, has, keys, _Widget, _KeyNavContainer, _TemplatedMixin){
], function(require, declare, has, keys, _WidgetBase, _KeyNavContainer, _TemplatedMixin){

// module:
// dijit/Toolbar

return declare("dijit.Toolbar", [_Widget, _TemplatedMixin, _KeyNavContainer], {
return declare("dijit.Toolbar", [_WidgetBase, _TemplatedMixin, _KeyNavContainer], {
// summary:
// A Toolbar widget, used to hold things like `dijit.Editor` buttons

Expand Down
6 changes: 3 additions & 3 deletions ToolbarSeparator.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
define([
"dojo/_base/declare", // declare
"dojo/dom", // dom.setSelectable
"./_Widget",
"./_WidgetBase",
"./_TemplatedMixin"
], function(declare, dom, _Widget, _TemplatedMixin){
], function(declare, dom, _WidgetBase, _TemplatedMixin){

// module:
// dijit/ToolbarSeparator


return declare("dijit.ToolbarSeparator", [_Widget, _TemplatedMixin], {
return declare("dijit.ToolbarSeparator", [_WidgetBase, _TemplatedMixin], {
// summary:
// A spacer between two `dijit.Toolbar` items

Expand Down
8 changes: 4 additions & 4 deletions Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ define([
"dojo/sniff", // has("ie")
"./_base/manager", // manager.defaultDuration
"./place",
"./_Widget",
"./_WidgetBase",
"./_TemplatedMixin",
"./BackgroundIframe",
"dojo/text!./templates/Tooltip.html",
"./main" // sets dijit.showTooltip etc. for back-compat
], function(array, declare, fx, dom, domClass, domGeometry, domStyle, lang, mouse, on, has,
manager, place, _Widget, _TemplatedMixin, BackgroundIframe, template, dijit){
manager, place, _WidgetBase, _TemplatedMixin, BackgroundIframe, template, dijit){

// module:
// dijit/Tooltip
Expand All @@ -32,7 +32,7 @@ define([
// The problem is that Tooltip's implementation supplies it's own <iframe> and interacts directly
// with dijit/place, rather than going through dijit/popup like TooltipDialog and other popups (ex: Menu).

var MasterTooltip = declare("dijit._MasterTooltip", [_Widget, _TemplatedMixin], {
var MasterTooltip = declare("dijit._MasterTooltip", [_WidgetBase, _TemplatedMixin], {
// summary:
// Internal widget that holds the actual tooltip markup,
// which occurs once per page.
Expand Down Expand Up @@ -298,7 +298,7 @@ define([
return Tooltip._masterTT && Tooltip._masterTT.hide(aroundNode);
};

var Tooltip = declare("dijit.Tooltip", _Widget, {
var Tooltip = declare("dijit.Tooltip", _WidgetBase, {
// summary:
// Pops up a tooltip (a help message) when you hover over a node.
// Also provides static show() and hide() methods that can be used without instantiating a dijit/Tooltip.
Expand Down
8 changes: 4 additions & 4 deletions Tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ define([
"./focus",
"./registry", // registry.byNode(), registry.getEnclosingWidget()
"./_base/manager", // manager.defaultDuration
"./_Widget",
"./_WidgetBase",
"./_TemplatedMixin",
"./_Container",
"./_Contained",
Expand All @@ -35,14 +35,14 @@ define([
"dojo/query!css2" // needed when on.selector() used with a string for the selector
], function(array, aspect, connect, cookie, declare, Deferred, all,
dom, domClass, domGeometry, domStyle, createError, fxUtils, has, kernel, keys, lang, on, topic, touch, when,
focus, registry, manager, _Widget, _TemplatedMixin, _Container, _Contained, _CssStateMixin, _KeyNavMixin,
focus, registry, manager, _WidgetBase, _TemplatedMixin, _Container, _Contained, _CssStateMixin, _KeyNavMixin,
treeNodeTemplate, treeTemplate, _dndSelector){

// module:
// dijit/Tree


var TreeNode = declare("dijit._TreeNode", [_Widget, _TemplatedMixin, _Container, _Contained, _CssStateMixin], {
var TreeNode = declare("dijit._TreeNode", [_WidgetBase, _TemplatedMixin, _Container, _Contained, _CssStateMixin], {
// summary:
// Single node within a tree. This class is used internally
// by Tree and should not be accessed directly.
Expand Down Expand Up @@ -518,7 +518,7 @@ define([
});
}

var Tree = declare("dijit.Tree", [_Widget, _KeyNavMixin, _TemplatedMixin, _CssStateMixin], {
var Tree = declare("dijit.Tree", [_WidgetBase, _KeyNavMixin, _TemplatedMixin, _CssStateMixin], {
// summary:
// This widget displays hierarchical data from a store.

Expand Down
2 changes: 1 addition & 1 deletion _Contained.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ define([
//
// example:
// | // make a basic custom widget that knows about it's parents
// | declare("my.customClass",[dijit._Widget,dijit._Contained],{});
// | declare("my.customClass",[dijit._WidgetBase,dijit._Contained],{});

_getSibling: function(/*String*/ which){
// summary:
Expand Down
6 changes: 3 additions & 3 deletions _MenuBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ define([
"./a11yclick",
"./popup",
"./registry",
"./_Widget",
"./_WidgetBase",
"./_CssStateMixin",
"./_KeyNavContainer",
"./_TemplatedMixin"
], function(array, declare, dom, domAttr, domClass, lang, mouse, on, winUtils, a11yclick, pm,
registry, _Widget, _CssStateMixin, _KeyNavContainer, _TemplatedMixin){
registry, _WidgetBase, _CssStateMixin, _KeyNavContainer, _TemplatedMixin){

// module:
// dijit/_MenuBase

return declare("dijit._MenuBase", [_Widget, _TemplatedMixin, _KeyNavContainer, _CssStateMixin], {
return declare("dijit._MenuBase", [_WidgetBase, _TemplatedMixin, _KeyNavContainer, _CssStateMixin], {
// summary:
// Base class for Menu and MenuBar

Expand Down
2 changes: 1 addition & 1 deletion _TemplatedMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ define([
this.domNode = node;
}

// Call down to _Widget.buildRendering() to get base classes assigned
// Call down to _WidgetBase.buildRendering() to get base classes assigned
// TODO: change the baseClass assignment to _setBaseClassAttr
this.inherited(arguments);

Expand Down
Loading

0 comments on commit 70bd6ff

Please sign in to comment.