mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
changed new (undocumented) "enhance" event to "create" to better match our existing event name conventions
This commit is contained in:
parent
1a828594f5
commit
fdb77bfa52
20 changed files with 26 additions and 26 deletions
|
|
@ -140,7 +140,7 @@ var attachEvents = function() {
|
|||
|
||||
//links in bars, or those with data-role become buttons
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
|
||||
$( ":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a", e.target )
|
||||
.not( ".ui-btn, :jqmData(role='none'), :jqmData(role='nojs')" )
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
$( ":jqmData(role='collapsible')", e.target ).collapsible();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
$( ":jqmData(role='controlgroup')", e.target ).controlgroup({ excludeInvisible: false });
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
$( ":jqmData(role='fieldcontain')", e.target ).fieldcontain();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
|
||||
if( $( ":jqmData(position='fixed')", e.target ).length ){
|
||||
$( e.target ).each(function(){
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
$( "button, [type='button'], [type='submit'], [type='reset'], [type='image']", e.target )
|
||||
.not( ":jqmData(role='none'), :jqmData(role='nojs')" )
|
||||
.button();
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
$( "input[type='checkbox'],input[type='radio']", e.target )
|
||||
.not( ":jqmData(role='none'), :jqmData(role='nojs')" )
|
||||
.checkboxradio();
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
$( "select:not(:jqmData(role='slider'))", e.target )
|
||||
.not( ":jqmData(role='none'), :jqmData(role='nojs')" )
|
||||
.selectmenu();
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
( function( $, undefined ) {
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
|
||||
var nativeSel = ":jqmData(role='none'), :jqmData(role='nojs')";
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
$( "input[type='text'], input[type='search'], input[type='number'], input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea", e.target )
|
||||
.not( ":jqmData(role='none'), :jqmData(role='nojs')" )
|
||||
.textinput();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
(function( $, undefined ) {
|
||||
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
|
||||
//links within content areas
|
||||
$( e.target )
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
$( ":jqmData(role='listview')", e.target ).listview();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
$( ":jqmData(role='navbar')", e.target ).navbar();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
(function( $, undefined ) {
|
||||
|
||||
$( document ).bind( "pagecreate enhance", function( e ){
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
$( ":jqmData(role='nojs')", e.target ).addClass( "ui-nojs" );
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -110,9 +110,9 @@
|
|||
|
||||
});
|
||||
|
||||
test( "checkboxradio controls will create when inside a container that receives an 'enhance' event", function(){
|
||||
test( "checkboxradio controls will create when inside a container that receives a 'create' event", function(){
|
||||
ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-checkbox").length, "did not have enhancements applied" );
|
||||
ok( $("#enhancetest").trigger("enhance").find(".ui-checkbox").length, "enhancements applied" );
|
||||
ok( $("#enhancetest").trigger("create").find(".ui-checkbox").length, "enhancements applied" );
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -119,9 +119,9 @@
|
|||
});
|
||||
|
||||
|
||||
test( "controlgroups will create when inside a container that receives an 'enhance' event", function(){
|
||||
test( "controlgroups will create when inside a container that receives a 'create' event", function(){
|
||||
ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-controlgroup").length, "did not have enhancements applied" );
|
||||
ok( $("#enhancetest").trigger("enhance").find(".ui-controlgroup").length, "enhancements applied" );
|
||||
ok( $("#enhancetest").trigger("create").find(".ui-controlgroup").length, "enhancements applied" );
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
ok($('#test-fieldcontain').hasClass('ui-field-contain ui-body ui-br'), 'A fieldcontain element must contain styles "ui-field-contain ui-body ui-br"');
|
||||
});
|
||||
|
||||
test( "Field container will create when inside a container that receives an 'enhance' event", function(){
|
||||
test( "Field container will create when inside a container that receives a 'create' event", function(){
|
||||
ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-field-contain").length, "did not have enhancements applied" );
|
||||
ok( $("#enhancetest").trigger("enhance").find(".ui-field-contain").length, "enhancements applied" );
|
||||
ok( $("#enhancetest").trigger("create").find(".ui-field-contain").length, "enhancements applied" );
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
|
|
|||
|
|
@ -484,9 +484,9 @@
|
|||
]);
|
||||
});
|
||||
|
||||
test( "Listview will create when inside a container that receives an 'enhance' event", function(){
|
||||
test( "Listview will create when inside a container that receives a 'create' event", function(){
|
||||
ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-listview").length, "did not have enhancements applied" );
|
||||
ok( $("#enhancetest").trigger("enhance").find(".ui-listview").length, "enhancements applied" );
|
||||
ok( $("#enhancetest").trigger("create").find(".ui-listview").length, "enhancements applied" );
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@
|
|||
same($("#select-choice-native-container div.ui-btn select").length, 1);
|
||||
});
|
||||
|
||||
test( "select controls will create when inside a container that receives an 'enhance' event", function(){
|
||||
test( "select controls will create when inside a container that receives a 'create' event", function(){
|
||||
ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-select").length, "did not have enhancements applied" );
|
||||
ok( $("#enhancetest").trigger("enhance").find(".ui-select").length, "enhancements applied" );
|
||||
ok( $("#enhancetest").trigger("create").find(".ui-select").length, "enhancements applied" );
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
|
|
|||
|
|
@ -157,8 +157,8 @@
|
|||
});
|
||||
|
||||
|
||||
test( "slider controls will create when inside a container that receives an 'enhance' event", function(){
|
||||
test( "slider controls will create when inside a container that receives a 'create' event", function(){
|
||||
ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-slider").length, "did not have enhancements applied" );
|
||||
ok( $("#enhancetest").trigger("enhance").find(".ui-slider").length, "enhancements applied" );
|
||||
ok( $("#enhancetest").trigger("create").find(".ui-slider").length, "enhancements applied" );
|
||||
});
|
||||
})(jQuery);
|
||||
Loading…
Reference in a new issue