From 1354d17270961fff662d40f90521223f8fd0d73b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 14 Aug 2012 18:59:10 +0400 Subject: update dojo to 1.7.3 --- lib/dijit/_FocusMixin.js.uncompressed.js | 73 ++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 lib/dijit/_FocusMixin.js.uncompressed.js (limited to 'lib/dijit/_FocusMixin.js.uncompressed.js') diff --git a/lib/dijit/_FocusMixin.js.uncompressed.js b/lib/dijit/_FocusMixin.js.uncompressed.js new file mode 100644 index 000000000..0759329e4 --- /dev/null +++ b/lib/dijit/_FocusMixin.js.uncompressed.js @@ -0,0 +1,73 @@ +define("dijit/_FocusMixin", [ + "./focus", + "./_WidgetBase", + "dojo/_base/declare", // declare + "dojo/_base/lang" // lang.extend +], function(focus, _WidgetBase, declare, lang){ + +/*===== + var _WidgetBase = dijit._WidgetBase; +=====*/ + + // module: + // dijit/_FocusMixin + // summary: + // Mixin to widget to provide _onFocus() and _onBlur() methods that + // fire when a widget or it's descendants get/lose focus + + // We don't know where _FocusMixin will occur in the inheritance chain, but we need the _onFocus()/_onBlur() below + // to be last in the inheritance chain, so mixin to _WidgetBase. + lang.extend(_WidgetBase, { + // focused: [readonly] Boolean + // This widget or a widget it contains has focus, or is "active" because + // it was recently clicked. + focused: false, + + onFocus: function(){ + // summary: + // Called when the widget becomes "active" because + // it or a widget inside of it either has focus, or has recently + // been clicked. + // tags: + // callback + }, + + onBlur: function(){ + // summary: + // Called when the widget stops being "active" because + // focus moved to something outside of it, or the user + // clicked somewhere outside of it, or the widget was + // hidden. + // tags: + // callback + }, + + _onFocus: function(){ + // summary: + // This is where widgets do processing for when they are active, + // such as changing CSS classes. See onFocus() for more details. + // tags: + // protected + this.onFocus(); + }, + + _onBlur: function(){ + // summary: + // This is where widgets do processing for when they stop being active, + // such as changing CSS classes. See onBlur() for more details. + // tags: + // protected + this.onBlur(); + } + }); + + return declare("dijit._FocusMixin", null, { + // summary: + // Mixin to widget to provide _onFocus() and _onBlur() methods that + // fire when a widget or it's descendants get/lose focus + + // flag that I want _onFocus()/_onBlur() notifications from focus manager + _focusManager: focus + }); + +}); -- cgit v1.2.3