This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[formReset] New behaviour that allows form widgets to become aware of…
… the fact that the form they are in has been reset
- Loading branch information
Gabriel Schulhof
committed
Oct 23, 2012
1 parent
398ecd9
commit 0f212b3
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); | ||
//>>description: Make a widget react to a form's reset. | ||
//>>label: formReset | ||
//>>group: Forms | ||
|
||
define( [ "jquery", "../../jquery.mobile.core" ], function( $ ) { | ||
//>>excludeEnd("jqmBuildExclude"); | ||
(function( $, undefined ) { | ||
|
||
$.mobile.behaviors.formReset = { | ||
_handleFormReset: function() { | ||
this._on( this.element.closest( "form" ), { | ||
reset: function() { | ||
this._delay( "_reset" ); | ||
} | ||
}); | ||
} | ||
}; | ||
|
||
})( jQuery ); | ||
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); | ||
}); | ||
//>>excludeEnd("jqmBuildExclude"); |