diff --git a/Menu.js b/Menu.js index 7fd2258f3..712361231 100644 --- a/Menu.js +++ b/Menu.js @@ -9,25 +9,16 @@ define([ "dojo/keys", // keys.F10 "dojo/_base/lang", // lang.hitch "dojo/on", - "dojo/sniff", // has("ie"), has("quirks") "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, + 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 @@ -298,8 +289,8 @@ define([ var cs = domStyle.getComputedStyle(iframe), tp = domStyle.toPixelValue, - left = (has("ie") && has("quirks") ? 0 : tp(iframe, cs.paddingLeft)) + (has("ie") && has("quirks") ? tp(iframe, cs.borderLeftWidth) : 0), - top = (has("ie") && has("quirks") ? 0 : tp(iframe, cs.paddingTop)) + (has("ie") && has("quirks") ? tp(iframe, cs.borderTopWidth) : 0); + left = tp(iframe, cs.paddingLeft), + top = tp(iframe, cs.paddingTop); coords.x += ifc.x + left - scroll.x; coords.y += ifc.y + top - scroll.y; diff --git a/MenuItem.js b/MenuItem.js index 1c632371d..1c4c30619 100644 --- a/MenuItem.js +++ b/MenuItem.js @@ -3,22 +3,22 @@ define([ "dojo/dom", // dom.setSelectable "dojo/dom-attr", // domAttr.set "dojo/dom-class", // domClass.toggle - "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){ +], function(declare, dom, domAttr, domClass, has, lang, + _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 @@ -137,24 +137,6 @@ define([ domClass.toggle(this.domNode, "dijitMenuItemSelected", selected); }, - setLabel: function(/*String*/ content){ - // summary: - // Deprecated. Use set('label', ...) instead. - // tags: - // deprecated - kernel.deprecated("dijit.MenuItem.setLabel() is deprecated. Use set('label', ...) instead.", "", "2.0"); - this.set("label", content); - }, - - setDisabled: function(/*Boolean*/ disabled){ - // summary: - // Deprecated. Use set('disabled', bool) instead. - // tags: - // deprecated - kernel.deprecated("dijit.Menu.setDisabled() is deprecated. Use set('disabled', bool) instead.", "", "2.0"); - this.set('disabled', disabled); - }, - _setDisabledAttr: function(/*Boolean*/ value){ // summary: // Hook for attr('disabled', ...) to work. diff --git a/_MenuBase.js b/_MenuBase.js index cdaa78e52..7209f049a 100644 --- a/_MenuBase.js +++ b/_MenuBase.js @@ -10,17 +10,17 @@ define([ "dojo/window", "./a11yclick", "./registry", - "./_Widget", + "./_WidgetBase", "./_CssStateMixin", "./_KeyNavContainer", "./_TemplatedMixin" ], function(array, declare, dom, domAttr, domClass, lang, mouse, on, winUtils, a11yclick, - 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: // Abstract base class for Menu and MenuBar. // Subclass should implement _onUpArrow(), _onDownArrow(), _onLeftArrow(), and _onRightArrow().