037321216e56a090f1d43a0f3e4ebd9323014144
[framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.1.0 / docs / config / loadingMessageTextVisible.html
1 <!DOCTYPE html>
2 <html>
3         <head>
4         <meta charset="utf-8">
5         <meta name="viewport" content="width=device-width, initial-scale=1">
6         <title>jQuery Mobile Docs - Configuration</title>
7         <link rel="stylesheet"  href="../../css/themes/default/jquery.mobile.css" />  
8         <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
9
10         <script src="../../js/jquery.js"></script>
11         <script src="../../docs/_assets/js/jqm-docs.js"></script>
12         <script>
13         $(document).bind("mobileinit", function(){
14                 $.mobile.loadingMessageTextVisible = true;
15         });
16         </script>
17         
18         <script src="../../js/"></script>
19
20 </head>
21 <body>
22
23         <div data-role="page">
24         <script>
25                 $(document).on("click", ".show-page-loading-msg", function() {
26                         var $this = $( this ),
27                                 theme = $this.jqmData("theme") || $.mobile.loadingMessageTheme,
28                                 msgText = $this.jqmData("msgtext") || $.mobile.loadingMessage,
29                                 textonly = !!$this.jqmData("textonly");
30                         $.mobile.showPageLoadingMsg(theme, msgText, textonly);
31                 })
32                 .on("click", ".hide-page-loading-msg", function() {
33                         $.mobile.hidePageLoadingMsg();
34                 });
35         </script>
36
37         <div data-role="header" data-theme="f">
38                 <h1>Config applied</h1>
39                 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
40                 <a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
41         </div><!-- /header -->
42
43         <div data-role="content">
44
45                 <h2>loadingMessage text is now visible</h2>
46                 <p>To test, hit the button below and browse the docs. Note that if a link causes a refresh, this setting will be lost and the default settings will be seen.</p>
47                 <a href="../../index.html" data-role="button" data-icon="arrow-r" data-iconpos="right">Browse docs</a>
48
49                 <p>To display the loading message on demand:</p>
50                 <pre><code>$.mobile.showPageLoadingMsg();</code></pre>
51                 <p>Click the buttons below to show and hide the loading message with the default options.</p>
52                 <div data-role="controlgroup">
53                         <button class="show-page-loading-msg" data-inline="false" data-icon="arrow-r" data-iconpos="right">Show</button>
54                         <button class="hide-page-loading-msg" data-inline="false" data-icon="delete" data-iconpos="right">Hide</button>
55                 </div>
56
57                 <h2>Theming the loading message</h2>
58                 <p>To display the loading message with a different theme and message:</p>
59                 <pre><code>$.mobile.showPageLoadingMsg(<strong>"a", "Loading theme a..."</strong>);</code></pre>
60                 <p>The theme and message can be changed on the fly by calling the method again.  Click the buttons below to see the loading message with the indicated theme.</p>
61                 <div data-role="controlgroup">
62                         <button class="show-page-loading-msg" data-theme="a" data-icon="arrow-r" data-iconpos="right" data-msgtext="Loading theme a...">Theme a</button>
63                         <button class="show-page-loading-msg" data-theme="b" data-icon="arrow-r" data-iconpos="right" data-msgtext="Loading theme b...">Theme b</button>
64                         <button class="show-page-loading-msg" data-theme="c" data-icon="arrow-r" data-iconpos="right" data-msgtext="Loading theme c...">Theme c</button>
65                         <button class="show-page-loading-msg" data-theme="d" data-icon="arrow-r" data-iconpos="right" data-msgtext="Loading theme d...">Theme d</button>
66                         <button class="show-page-loading-msg" data-theme="e" data-icon="arrow-r" data-iconpos="right" data-msgtext="Loading theme e...">Theme e</button>
67                         <button class="hide-page-loading-msg" data-icon="delete" data-iconpos="right">Hide</button>
68                 </div>
69
70                 <h2>Text only messages</h2>
71                 <p>To display the loading message with no spinner:</p>
72                 <pre><code>$.mobile.showPageLoadingMsg("a", "No spinner", <strong>true</strong>);</code></pre>
73                 <p>Click the button below to see the loading message with no spinner.</p>
74                 <div data-role="controlgroup">
75                         <button class="show-page-loading-msg" data-textonly="true" data-msgtext="Look Ma, no spinner!" data-icon="arrow-r" data-iconpos="right">Show</button>
76                         <button class="hide-page-loading-msg" data-inline="false" data-icon="delete" data-iconpos="right">Hide</button>
77                 </div>
78
79
80                 </div><!-- /ui-body wrapper -->
81 </div><!-- /page -->
82
83 </body>
84 </html>