Skip to content
This repository
Browse code

changed new (undocumented) "enhance" event to "create" to better matc…

…h our existing event name conventions
  • Loading branch information...
commit fdb77bfa528a8d12fdc5408110605054fb0a557e 1 parent 1a82859
authored July 22, 2011
2  js/jquery.mobile.buttonMarkup.js
@@ -140,7 +140,7 @@ var attachEvents = function() {
140 140
 
141 141
 //links in bars, or those with  data-role become buttons
142 142
 //auto self-init widgets
143  
-$( document ).bind( "pagecreate enhance", function( e ){
  143
+$( document ).bind( "pagecreate create", function( e ){
144 144
 
145 145
 	$( ":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a", e.target )
146 146
 		.not( ".ui-btn, :jqmData(role='none'), :jqmData(role='nojs')" )
2  js/jquery.mobile.collapsible.js
@@ -7,7 +7,7 @@
7 7
 (function( $, undefined ) {
8 8
 
9 9
 //auto self-init widgets
10  
-$( document ).bind( "pagecreate enhance", function( e ){
  10
+$( document ).bind( "pagecreate create", function( e ){
11 11
 	$( ":jqmData(role='collapsible')", e.target ).collapsible();
12 12
 });
13 13
 
2  js/jquery.mobile.controlGroup.js
@@ -7,7 +7,7 @@
7 7
 (function( $, undefined ) {
8 8
 
9 9
 //auto self-init widgets
10  
-$( document ).bind( "pagecreate enhance", function( e ){
  10
+$( document ).bind( "pagecreate create", function( e ){
11 11
 	$( ":jqmData(role='controlgroup')", e.target ).controlgroup({ excludeInvisible: false });
12 12
 });
13 13
 
2  js/jquery.mobile.fieldContain.js
@@ -8,7 +8,7 @@
8 8
 (function( $, undefined ) {
9 9
 
10 10
 //auto self-init widgets
11  
-$( document ).bind( "pagecreate enhance", function( e ){
  11
+$( document ).bind( "pagecreate create", function( e ){
12 12
 	$( ":jqmData(role='fieldcontain')", e.target ).fieldcontain();
13 13
 });
14 14
 
2  js/jquery.mobile.fixHeaderFooter.js
@@ -8,7 +8,7 @@
8 8
 (function( $, undefined ) {
9 9
 	
10 10
 //auto self-init widgets
11  
-$( document ).bind( "pagecreate enhance", function( e ){
  11
+$( document ).bind( "pagecreate create", function( e ){
12 12
 	
13 13
 	if( $( ":jqmData(position='fixed')", e.target ).length ){
14 14
 		$( e.target ).each(function(){
2  js/jquery.mobile.forms.button.js
@@ -8,7 +8,7 @@
8 8
 (function( $, undefined ) {
9 9
 
10 10
 //auto self-init widgets
11  
-$( document ).bind( "pagecreate enhance", function( e ){
  11
+$( document ).bind( "pagecreate create", function( e ){
12 12
 	$( "button, [type='button'], [type='submit'], [type='reset'], [type='image']", e.target )
13 13
 		.not( ":jqmData(role='none'), :jqmData(role='nojs')" )
14 14
 		.button();
2  js/jquery.mobile.forms.checkboxradio.js
@@ -8,7 +8,7 @@
8 8
 (function( $, undefined ) {
9 9
 
10 10
 //auto self-init widgets
11  
-$( document ).bind( "pagecreate enhance", function( e ){
  11
+$( document ).bind( "pagecreate create", function( e ){
12 12
 	$( "input[type='checkbox'],input[type='radio']", e.target )
13 13
 		.not( ":jqmData(role='none'), :jqmData(role='nojs')" )
14 14
 		.checkboxradio();
2  js/jquery.mobile.forms.select.js
@@ -8,7 +8,7 @@
8 8
 (function( $, undefined ) {
9 9
 
10 10
 //auto self-init widgets
11  
-$( document ).bind( "pagecreate enhance", function( e ){
  11
+$( document ).bind( "pagecreate create", function( e ){
12 12
 	$( "select:not(:jqmData(role='slider'))", e.target )
13 13
 		.not( ":jqmData(role='none'), :jqmData(role='nojs')" )
14 14
 		.selectmenu();
2  js/jquery.mobile.forms.slider.js
@@ -8,7 +8,7 @@
8 8
 ( function( $, undefined ) {
9 9
 
10 10
 //auto self-init widgets
11  
-$( document ).bind( "pagecreate enhance", function( e ){
  11
+$( document ).bind( "pagecreate create", function( e ){
12 12
 
13 13
 	var nativeSel = ":jqmData(role='none'), :jqmData(role='nojs')";
14 14
 
2  js/jquery.mobile.forms.textinput.js
@@ -8,7 +8,7 @@
8 8
 (function( $, undefined ) {
9 9
 
10 10
 //auto self-init widgets
11  
-$( document ).bind( "pagecreate enhance", function( e ){
  11
+$( document ).bind( "pagecreate create", function( e ){
12 12
 	$( "input[type='text'], input[type='search'], input[type='number'], input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea", e.target )
13 13
 		.not( ":jqmData(role='none'), :jqmData(role='nojs')" )
14 14
 		.textinput();
2  js/jquery.mobile.links.js
@@ -7,7 +7,7 @@
2  js/jquery.mobile.listview.js
@@ -8,7 +8,7 @@
8 8
 (function( $, undefined ) {
9 9
 
10 10
 //auto self-init widgets
11  
-$( document ).bind( "pagecreate enhance", function( e ){
  11
+$( document ).bind( "pagecreate create", function( e ){
12 12
 	$( ":jqmData(role='listview')", e.target ).listview();
13 13
 });
14 14
 
2  js/jquery.mobile.navbar.js
@@ -8,7 +8,7 @@
8 8
 (function( $, undefined ) {
9 9
 
10 10
 //auto self-init widgets
11  
-$( document ).bind( "pagecreate enhance", function( e ){
  11
+$( document ).bind( "pagecreate create", function( e ){
12 12
 	$( ":jqmData(role='navbar')", e.target ).navbar();
13 13
 });
14 14
 
2  js/jquery.mobile.nojs.js
@@ -7,7 +7,7 @@
7 7
 
8 8
 (function( $, undefined ) {
9 9
 
10  
-$( document ).bind( "pagecreate enhance", function( e ){
  10
+$( document ).bind( "pagecreate create", function( e ){
11 11
 	$( ":jqmData(role='nojs')", e.target ).addClass( "ui-nojs" );
12 12
 	
13 13
 });
4  tests/unit/checkboxradio/checkboxradio_core.js
@@ -110,9 +110,9 @@
110 110
 
111 111
 	});
112 112
 	
113  
-	test( "checkboxradio controls will create when inside a container that receives an 'enhance' event", function(){
  113
+	test( "checkboxradio controls will create when inside a container that receives a 'create' event", function(){
114 114
 		ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-checkbox").length, "did not have enhancements applied" );
115  
-		ok( $("#enhancetest").trigger("enhance").find(".ui-checkbox").length, "enhancements applied" );
  115
+		ok( $("#enhancetest").trigger("create").find(".ui-checkbox").length, "enhancements applied" );
116 116
 	});
117 117
 	
118 118
 	
4  tests/unit/controlgroup/controlgroup_core.js
@@ -119,9 +119,9 @@
119 119
 	});
120 120
 
121 121
 
122  
-	test( "controlgroups will create when inside a container that receives an 'enhance' event", function(){
  122
+	test( "controlgroups will create when inside a container that receives a 'create' event", function(){
123 123
 		ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-controlgroup").length, "did not have enhancements applied" );
124  
-		ok( $("#enhancetest").trigger("enhance").find(".ui-controlgroup").length, "enhancements applied" );
  124
+		ok( $("#enhancetest").trigger("create").find(".ui-controlgroup").length, "enhancements applied" );
125 125
 	});
126 126
 
127 127
 
4  tests/unit/fieldContain/fieldContain_events.js
@@ -8,9 +8,9 @@
8 8
 		ok($('#test-fieldcontain').hasClass('ui-field-contain ui-body ui-br'), 'A fieldcontain element must contain styles "ui-field-contain ui-body ui-br"');
9 9
 	});
10 10
 	
11  
-	test( "Field container will create when inside a container that receives an 'enhance' event", function(){
  11
+	test( "Field container will create when inside a container that receives a 'create' event", function(){
12 12
 		ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-field-contain").length, "did not have enhancements applied" );
13  
-		ok( $("#enhancetest").trigger("enhance").find(".ui-field-contain").length, "enhancements applied" );
  13
+		ok( $("#enhancetest").trigger("create").find(".ui-field-contain").length, "enhancements applied" );
14 14
 	});
15 15
 	
16 16
 })(jQuery);
4  tests/unit/listview/listview_core.js
@@ -484,9 +484,9 @@
484 484
 		]);
485 485
 	});
486 486
 	
487  
-	test( "Listview will create when inside a container that receives an 'enhance' event", function(){
  487
+	test( "Listview will create when inside a container that receives a 'create' event", function(){
488 488
 		ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-listview").length, "did not have enhancements applied" );
489  
-		ok( $("#enhancetest").trigger("enhance").find(".ui-listview").length, "enhancements applied" );
  489
+		ok( $("#enhancetest").trigger("create").find(".ui-listview").length, "enhancements applied" );
490 490
 	});
491 491
 
492 492
 
4  tests/unit/select/select_events.js
@@ -48,9 +48,9 @@
48 48
 		same($("#select-choice-native-container div.ui-btn select").length, 1);
49 49
 	});
50 50
 	
51  
-	test( "select controls will create when inside a container that receives an 'enhance' event", function(){
  51
+	test( "select controls will create when inside a container that receives a 'create' event", function(){
52 52
 		ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-select").length, "did not have enhancements applied" );
53  
-		ok( $("#enhancetest").trigger("enhance").find(".ui-select").length, "enhancements applied" );
  53
+		ok( $("#enhancetest").trigger("create").find(".ui-select").length, "enhancements applied" );
54 54
 	});
55 55
 	
56 56
 })(jQuery);
4  tests/unit/slider/slider_events.js
@@ -157,8 +157,8 @@
157 157
 	});
158 158
 	
159 159
 	
160  
-	test( "slider controls will create when inside a container that receives an 'enhance' event", function(){
  160
+	test( "slider controls will create when inside a container that receives a 'create' event", function(){
161 161
 		ok( !$("#enhancetest").appendTo(".ui-page-active").find(".ui-slider").length, "did not have enhancements applied" );
162  
-		ok( $("#enhancetest").trigger("enhance").find(".ui-slider").length, "enhancements applied" );
  162
+		ok( $("#enhancetest").trigger("create").find(".ui-slider").length, "enhancements applied" );
163 163
 	});
164 164
 })(jQuery);

0 notes on commit fdb77bf

Please sign in to comment.
Something went wrong with that request. Please try again.