Skip to content

Commit

Permalink
Safe keeping
Browse files Browse the repository at this point in the history
  • Loading branch information
Duc Tri Le committed Feb 14, 2011
1 parent 938bfdb commit 4725e25
Show file tree
Hide file tree
Showing 14 changed files with 766 additions and 91 deletions.
16 changes: 16 additions & 0 deletions change.log
@@ -0,0 +1,16 @@

Version 0.2
* Fixed bug with the continueChain method of ResponsesJS.
* Include pre-built files.
* Added a new script for auto complete.
* Another bug fix for the focusin and focusout event so that it is only fired if the triggering
element is that element that the event was attached to or is a child of it.
* Fixes JSDoc.

----------------------------------------------------------------------------------------------------
2010/11/13:
Version 0.1.1:
* Bug fix with the delegation of the focusin and focusout event.

Version 0.1
* Initial release.
5 changes: 3 additions & 2 deletions package.yml
Expand Up @@ -4,9 +4,9 @@ author: "Duc Tri Le"

category: utilities

tags: [mutator, element, event, layer, json]
tags: [mutator, element, event, layer, json, autocomplete]

current: 0.1
current: 0.2

exports: "mootools-plus.js"

Expand All @@ -18,6 +18,7 @@ sources:
- "source/Class/HtmlOptions.js"
- "source/Element/Element.Delegation.Plus.js"
- "source/Element/Element.Plus.js"
- "source/Interface/AutoComplete.js"
- "source/Interface/Layer.js"
- "source/Request/Responses.js"
- "source/Types/Array.Plus.js"
Expand Down
4 changes: 3 additions & 1 deletion source/Class/Class.Mutators.StoredInstances.js
Expand Up @@ -3,7 +3,9 @@
name: Class.Mutators.StoredInstances
description: Allow classes to stored instances that has been created.
description: Allow classes to stored instances that has been created. Note that because this
contains static data and methods, any subclass will also need to include this if the parent
class has it.
license: MIT-style license
Expand Down
33 changes: 26 additions & 7 deletions source/Element/Element.Delegation.Plus.js
Expand Up @@ -21,6 +21,9 @@ provides:
...
*/
(function() {
/**
* @type {Object} Constants.
*/
var constants = {
ie_change: 'mootools-plus-element-delegation:ie-change',
ie_submit: 'mootools-plus-element-delegation:ie-submit'
Expand Down Expand Up @@ -92,21 +95,40 @@ provides:

// ------------------------------------------------------------------------------------------ //

/**
* @type {Array} The list of elements that is monitoring the focusin event.
*/
var focusInElements = [];

/**
* @type {Array} The list of elements that is monitoring the focusout event.
*/
var focusOutElements = [];

/**
* Custom handler for the focus/blur event so that it would bubbles.
* Event handler for the focusin event.
*
* @param event {Event} The event that was triggered.
* @returns void
*/
var focusInHandler = function(event) {
focusInElements.invoke('fireEvent', 'focusin', event);
event = new Event(event);
if((this == event.target) || (this.contains(event.target))) {
focusInElements.invoke('fireEvent', 'focusin', event);
}
};

/**
* Event handler for the focusout event.
*
* @param event {Event} The event that was triggered.
* @returns void
*/
var focusOutHandler = function(event) {
focusOutElements.invoke('fireEvent', 'focusout', event);
event = new Event(event);
if((this == event.target) || (this.contains(event.target))) {
focusOutElements.invoke('fireEvent', 'focusout', event);
}
};

// Use event capturing to monitor the focus and blur event on browsers that isn't it
Expand All @@ -116,10 +138,7 @@ provides:
}

// And finally, allow focusin and focusout to be added as native events
Object.append(Element.NativeEvents, {
'focusin': 2,
'focusout': 2
});
Object.append(Element.NativeEvents, { 'focusin': 2, 'focusout': 2 });

// ------------------------------------------------------------------------------------------ //

Expand Down
3 changes: 3 additions & 0 deletions source/Element/Element.Plus.js
Expand Up @@ -96,6 +96,9 @@ Element.implement({
// ---------------------------------------------------------------------------------------------- //

(function() {
/**
* @type {int} Counter for generating IDs.
*/
var id_counter = 1;
Element.Properties.id = {
/**
Expand Down

0 comments on commit 4725e25

Please sign in to comment.