File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 3333
3434 //loading div which appears during Ajax requests
3535 //will not appear if $.mobile.loadingMessage is false
36- var $loader = $ . mobile . loadingMessage ? $ ( "<div class='ui-loader ui-body-a ui-corner-all'>" + " <span class='ui-icon ui-icon-loading spin'></span>" + " <h1>" + $ . mobile . loadingMessage + " </h1>" + " </div>" ) : undefined ;
36+ var $loader = $ ( "<div class='ui-loader ui-body-a ui-corner-all'><span class='ui-icon ui-icon-loading spin'></span><h1></h1></div>" ) ;
3737
3838 $ . extend ( $ . mobile , {
3939 // turn on/off page loading message.
4242 var activeBtn = $ ( "." + $ . mobile . activeBtnClass ) . first ( ) ;
4343
4444 $loader
45+ . find ( "h1" )
46+ . text ( $ . mobile . loadingMessage )
47+ . end ( )
4548 . appendTo ( $ . mobile . pageContainer )
4649 //position at y center (if scrollTop supported), above the activeBtn (if defined), or just 100px from top
4750 . css ( {
Original file line number Diff line number Diff line change 201201 start ( ) ;
202202 } , 500 ) ;
203203 } ) ;
204+
205+ asyncTest ( "page loading should contain custom loading message when set during runtime" , function ( ) {
206+ $ . mobile . loadingMessage = "bar" ;
207+ $ . mobile . pageLoading ( false ) ;
208+
209+ setTimeout ( function ( ) {
210+ same ( $ ( ".ui-loader h1" ) . text ( ) , "bar" ) ;
211+ start ( ) ;
212+ } , 500 ) ;
213+ } ) ;
214+
204215 } ) ;
205216} ) ( jQuery ) ;
You can’t perform that action at this time.
0 commit comments