mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-25 00:24:44 +00:00
backed out autoInitialize moving to feature request backlog
This commit is contained in:
parent
cbd1eb7ac9
commit
a025c0bffc
2 changed files with 2 additions and 21 deletions
|
|
@ -56,9 +56,6 @@
|
|||
return $.support.mediaquery;
|
||||
},
|
||||
|
||||
//automatically initialize first pages or not.
|
||||
autoInitialize: true,
|
||||
|
||||
//TODO might be useful upstream in jquery itself ?
|
||||
keyCode: {
|
||||
ALT: 18,
|
||||
|
|
@ -203,13 +200,9 @@
|
|||
});
|
||||
|
||||
//dom-ready inits
|
||||
if($.mobile.autoInitialize){
|
||||
$($.mobile.initializePage);
|
||||
}
|
||||
|
||||
$($.mobile.initializePage);
|
||||
|
||||
//window load event
|
||||
//hide iOS browser chrome on load
|
||||
$window.load( $.mobile.silentScroll );
|
||||
|
||||
})( jQuery, this );
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
test( "loading the core library triggers mobilinit on the document", function(){
|
||||
expect( 1 );
|
||||
|
||||
$(window.document).one('mobileinit', function(event){
|
||||
$(window.document).bind('mobileinit', function(event){
|
||||
ok(true);
|
||||
});
|
||||
|
||||
|
|
@ -145,17 +145,5 @@
|
|||
stop();
|
||||
$.testHelper.reloadLib(libName);
|
||||
});
|
||||
|
||||
test( "auto initialization does not occur when set to false", function(){
|
||||
$(window.document).one('mobileinit', function(event){
|
||||
$.mobile.autoInitialize = false;
|
||||
});
|
||||
|
||||
$.testHelper.reloadLib(libName);
|
||||
|
||||
ok($("html").hasClass("ui-mobile-rendering"), "Still in rendering state after library load.");
|
||||
$.mobile.initializePage();
|
||||
ok(!$("html").hasClass("ui-mobile-rendering"), "Rendered ok after call to initializePage");
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
Loading…
Reference in a new issue