Skip to content

Commit

Permalink
remove dijit-legacy-requires, refs #4
Browse files Browse the repository at this point in the history
  • Loading branch information
wkeese committed Mar 8, 2013
1 parent b9db888 commit 5e11d37
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 98 deletions.
9 changes: 0 additions & 9 deletions Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ define([
"dojo/keys",
"dojo/_base/lang", // lang.mixin lang.hitch
"dojo/on",
"dojo/ready",
"dojo/sniff", // has("ie") has("opera") has("dijit-legacy-requires")
"dojo/window", // winUtils.getBox, winUtils.get
"dojo/dnd/Moveable", // Moveable
Expand Down Expand Up @@ -649,13 +648,5 @@ define([
}
});

// Back compat w/1.6, remove for 2.0
if(has("dijit-legacy-requires")){
ready(0, function(){
var requires = ["dijit/TooltipDialog"];
require(requires); // use indirection so modules not rolled into a build
});
}

return Dialog;
});
14 changes: 3 additions & 11 deletions Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,13 @@ define([
"dojo/_base/window", // win.body
"dojo/window", // winUtils.get
"./popup",
"./DropDownMenu",
"dojo/ready"
], function(require, array, declare, dom, domAttr, domGeometry, domStyle, keys, lang, on, has, win, winUtils, pm, DropDownMenu, ready){
"./DropDownMenu"
], function(require, array, declare, dom, domAttr, domGeometry, domStyle, keys, lang, on,
has, win, winUtils, pm, DropDownMenu){

// module:
// dijit/Menu

// Back compat w/1.6, remove for 2.0
if(has("dijit-legacy-requires")){
ready(0, function(){
var requires = ["dijit/MenuItem", "dijit/PopupMenuItem", "dijit/CheckedMenuItem", "dijit/MenuSeparator"];
require(requires); // use indirection so modules not rolled into a build
});
}

return declare("dijit.Menu", DropDownMenu, {
// summary:
// A context menu you can assign to multiple elements
Expand Down
12 changes: 1 addition & 11 deletions Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,14 @@ define([
"dojo/_base/declare", // declare
"dojo/has",
"dojo/keys", // keys.LEFT_ARROW keys.RIGHT_ARROW
"dojo/ready",
"./_Widget",
"./_KeyNavContainer",
"./_TemplatedMixin"
], function(require, declare, has, keys, ready, _Widget, _KeyNavContainer, _TemplatedMixin){
], function(require, declare, has, keys, _Widget, _KeyNavContainer, _TemplatedMixin){

// module:
// dijit/Toolbar


// Back compat w/1.6, remove for 2.0
if(has("dijit-legacy-requires")){
ready(0, function(){
var requires = ["dijit/ToolbarSeparator"];
require(requires); // use indirection so modules not rolled into a build
});
}

return declare("dijit.Toolbar", [_Widget, _TemplatedMixin, _KeyNavContainer], {
// summary:
// A Toolbar widget, used to hold things like `dijit.Editor` buttons
Expand Down
15 changes: 3 additions & 12 deletions _Widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ define([
"dojo/_base/kernel", // kernel.deprecated
"dojo/_base/lang", // lang.hitch
"dojo/query",
"dojo/ready",
"./registry", // registry.byNode
"./_WidgetBase",
"./_OnDijitClickMixin",
"./_FocusMixin",
"dojo/uacss", // browser sniffing (included for back-compat; subclasses may be using)
"./hccss" // high contrast mode sniffing (included to set CSS classes on <body>, module ret value unused)
], function(aspect, config, connect, declare, has, kernel, lang, query, ready,
], function(aspect, config, connect, declare, has, kernel, lang, query,
registry, _WidgetBase, _OnDijitClickMixin, _FocusMixin){


Expand Down Expand Up @@ -42,7 +41,7 @@ if(kernel.connect){
aspect.around(kernel, "connect", aroundAdvice);
}

var _Widget = declare("dijit._Widget", [_WidgetBase, _OnDijitClickMixin, _FocusMixin], {
return declare("dijit._Widget", [_WidgetBase, _OnDijitClickMixin, _FocusMixin], {
// summary:
// Old base class for widgets. New widgets should extend `dijit/_WidgetBase` instead
// description:
Expand Down Expand Up @@ -351,13 +350,5 @@ var _Widget = declare("dijit._Widget", [_WidgetBase, _OnDijitClickMixin, _FocusM
return true; // Boolean
}
});

// For back-compat, remove in 2.0.
if(has("dijit-legacy-requires")){
ready(0, function(){
var requires = ["dijit/_base"];
require(requires); // use indirection so modules not rolled into a build
});
}
return _Widget;
;
});
14 changes: 1 addition & 13 deletions _WidgetBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ define([
"dojo/_base/kernel",
"dojo/_base/lang", // mixin(), isArray(), etc.
"dojo/on",
"dojo/ready",
"dojo/Stateful", // Stateful
"dojo/topic",
"dojo/_base/window", // win.body()
Expand All @@ -24,26 +23,15 @@ define([
"./registry" // registry.getUniqueId(), registry.findWidgets()
], function(require, array, aspect, config, connect, declare,
dom, domAttr, domClass, domConstruct, domGeometry, domStyle, has, kernel,
lang, on, ready, Stateful, topic, win, Destroyable, _BidiMixin, registry){
lang, on, Stateful, topic, win, Destroyable, _BidiMixin, registry){

// module:
// dijit/_WidgetBase

// Flag to make dijit load modules the app didn't explicitly request, for backwards compatibility
has.add("dijit-legacy-requires", !kernel.isAsync);

// Flag to enable support for textdir attribute
has.add("dojo-bidi", false);


// For back-compat, remove in 2.0.
if(has("dijit-legacy-requires")){
ready(0, function(){
var requires = ["dijit/_base/manager"];
require(requires); // use indirection so modules not rolled into a build
});
}

// Nested hash listing attributes for each tag, all strings in lowercase.
// ex: {"div": {"style": true, "tabindex" true}, "form": { ...
var tagAttrs = {};
Expand Down
11 changes: 1 addition & 10 deletions form/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,14 @@ define([
"dojo/has", // has("dijit-legacy-requires")
"dojo/_base/kernel", // kernel.deprecated
"dojo/_base/lang", // lang.trim
"dojo/ready",
"./_FormWidget",
"./_ButtonMixin",
"dojo/text!./templates/Button.html"
], function(require, declare, domClass, has, kernel, lang, ready, _FormWidget, _ButtonMixin, template){
], function(require, declare, domClass, has, kernel, lang, _FormWidget, _ButtonMixin, template){

// module:
// dijit/form/Button

// Back compat w/1.6, remove for 2.0
if(has("dijit-legacy-requires")){
ready(0, function(){
var requires = ["dijit/form/DropDownButton", "dijit/form/ComboButton", "dijit/form/ToggleButton"];
require(requires); // use indirection so modules not rolled into a build
});
}

var Button = declare("dijit.form.Button" + (has("dojo-bidi") ? "_NoBidi" : ""), [_FormWidget, _ButtonMixin], {
// summary:
// Basically the same thing as a normal HTML button, but with special styling.
Expand Down
9 changes: 0 additions & 9 deletions form/CheckBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ define([
"dojo/dom-attr", // domAttr.set
"dojo/has", // has("dijit-legacy-requires")
"dojo/query", // query
"dojo/ready",
"./ToggleButton",
"./_CheckBoxMixin",
"dojo/text!./templates/CheckBox.html",
Expand All @@ -14,14 +13,6 @@ define([
// module:
// dijit/form/CheckBox

// Back compat w/1.6, remove for 2.0
if(has("dijit-legacy-requires")){
ready(0, function(){
var requires = ["dijit/form/RadioButton"];
require(requires); // use indirection so modules not rolled into a build
});
}

return declare("dijit.form.CheckBox", [ToggleButton, _CheckBoxMixin], {
// summary:
// Same as an HTML checkbox, but with fancy styling.
Expand Down
5 changes: 2 additions & 3 deletions form/_FormWidget.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
define([
"dojo/_base/declare", // declare
"dojo/sniff", // has("dijit-legacy-requires"), has("msapp")
"dojo/sniff", // has("msapp")
"dojo/_base/kernel", // kernel.deprecated
"dojo/ready",
"../_Widget",
"../_CssStateMixin",
"../_TemplatedMixin",
"./_FormWidgetMixin"
], function(declare, has, kernel, ready, _Widget, _CssStateMixin, _TemplatedMixin, _FormWidgetMixin){
], function(declare, has, kernel, _Widget, _CssStateMixin, _TemplatedMixin, _FormWidgetMixin){

// module:
// dijit/form/_FormWidget
Expand Down
13 changes: 3 additions & 10 deletions layout/AccordionContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ define([
"dojo/topic", // publish
"../focus", // focus.focus()
"../_base/manager", // manager.defaultDuration
"dojo/ready",
"../_Widget",
"../_Container",
"../_TemplatedMixin",
"../_CssStateMixin",
"./StackContainer",
"./ContentPane",
"dojo/text!./templates/AccordionButton.html"
], function(require, array, declare, fx, dom, domAttr, domClass, domConstruct, domGeometry, keys, lang, has, topic, focus, manager, ready, _Widget, _Container, _TemplatedMixin, _CssStateMixin, StackContainer, ContentPane, template){
], function(require, array, declare, fx, dom, domAttr, domClass, domConstruct, domGeometry,
keys, lang, has, topic, focus, manager,
_Widget, _Container, _TemplatedMixin, _CssStateMixin, StackContainer, ContentPane, template){

// module:
// dijit/layout/AccordionContainer
Expand Down Expand Up @@ -530,14 +531,6 @@ define([
}
});

// Back compat w/1.6, remove for 2.0
if(has("dijit-legacy-requires")){
ready(0, function(){
var requires = ["dijit/layout/AccordionPane"];
require(requires); // use indirection so modules not rolled into a build
});
}

// For monkey patching
AccordionContainer._InnerContainer = AccordionInnerContainer;
AccordionContainer._Button = AccordionButton;
Expand Down
11 changes: 1 addition & 10 deletions layout/StackContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,17 @@ define([
"dojo/has", // has("dijit-legacy-requires")
"dojo/_base/lang", // lang.extend
"dojo/on",
"dojo/ready",
"dojo/topic", // publish
"dojo/when",
"../registry", // registry.byId
"../_WidgetBase",
"./_LayoutWidget",
"dojo/i18n!../nls/common"
], function(array, cookie, declare, domClass, domConstruct, has, lang, on, ready, topic, when, registry, _WidgetBase, _LayoutWidget){
], function(array, cookie, declare, domClass, domConstruct, has, lang, on, topic, when, registry, _WidgetBase, _LayoutWidget){

// module:
// dijit/layout/StackContainer

// Back compat w/1.6, remove for 2.0
if(has("dijit-legacy-requires")){
ready(0, function(){
var requires = ["dijit/layout/StackController"];
require(requires); // use indirection so modules not rolled into a build
});
}

var StackContainer = declare("dijit.layout.StackContainer", _LayoutWidget, {
// summary:
// A container that has multiple children, but shows only
Expand Down

0 comments on commit 5e11d37

Please sign in to comment.