| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> |
| 5 | <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/> |
| 6 | <meta name="apple-mobile-web-app-capable" content="yes"/> |
| 7 | <title>Simple Dialog Test</title> |
| 8 | |
| 9 | <link href="../themes/common/domButtons.css" rel="stylesheet"/> |
| 10 | <script type="text/javascript" src="../deviceTheme.js" data-dojo-config="mblThemeFiles: ['base','SimpleDialog','TextBox','Button','Slider']"></script> |
| 11 | <script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: true"></script> |
| 12 | |
| 13 | <script type="text/javascript"> |
| 14 | require([ |
| 15 | "dojo/dom", |
| 16 | "dijit/registry", |
| 17 | "dojox/mobile/ProgressIndicator", |
| 18 | "dojox/mobile/parser", |
| 19 | "dojox/mobile", |
| 20 | "dojox/mobile/compat", |
| 21 | "dojox/mobile/SimpleDialog", |
| 22 | "dojox/mobile/TextBox", |
| 23 | "dojox/mobile/Button", |
| 24 | "dojox/mobile/Slider", |
| 25 | "dojox/mobile/_ContentPaneMixin" |
| 26 | ], function(dom, registry, ProgressIndicator){ |
| 27 | show = function(dlg){ |
| 28 | registry.byId(dlg).show(); |
| 29 | } |
| 30 | hide = function(dlg){ |
| 31 | registry.byId(dlg).hide(); |
| 32 | } |
| 33 | var prog; |
| 34 | show_progress_indicator = function(dlg,cont){ |
| 35 | show(dlg); |
| 36 | var container = dom.byId(cont); |
| 37 | prog = ProgressIndicator.getInstance(); |
| 38 | container.appendChild(prog.domNode); |
| 39 | prog.start(); |
| 40 | setTimeout(function(){ |
| 41 | hide_progress_indicator(dlg); |
| 42 | }, 5000); |
| 43 | } |
| 44 | hide_progress_indicator = function(dlg){ |
| 45 | prog.stop(); |
| 46 | hide(dlg); |
| 47 | } |
| 48 | }); |
| 49 | |
| 50 | </script> |
| 51 | |
| 52 | <style> |
| 53 | .mblSimpleDialogInput { |
| 54 | margin: 7px 0 14px; |
| 55 | width: 260px; |
| 56 | } |
| 57 | .mblSimpleDialogButton { |
| 58 | margin: 7px 0 0; |
| 59 | width: 262px; |
| 60 | font-size: 17px; |
| 61 | font-weight: bold; |
| 62 | opacity: 0.95; |
| 63 | } |
| 64 | .mblSimpleDialogButton2l { |
| 65 | float: left; |
| 66 | width: 127px; |
| 67 | margin: 7px 0 0; |
| 68 | font-size: 17px; |
| 69 | font-weight: bold; |
| 70 | opacity: 0.95; |
| 71 | } |
| 72 | .mblSimpleDialogButton2r { |
| 73 | float: right; |
| 74 | width: 127px; |
| 75 | margin: 7px 0 0; |
| 76 | font-size: 17px; |
| 77 | font-weight: bold; |
| 78 | opacity: 0.95; |
| 79 | } |
| 80 | .mblSimpleDialog .mblProgressIndicator { |
| 81 | position: relative; |
| 82 | margin: 14px 0 7px; |
| 83 | top: 0; |
| 84 | } |
| 85 | |
| 86 | .mblSimpleDialog .mblListItem { |
| 87 | text-align: left; |
| 88 | } |
| 89 | |
| 90 | .windows_theme .mblDomButtonSilverCircleGrayButton > div, |
| 91 | .windows_theme .mblDomButtonSilverCircleGreenButton > div { |
| 92 | background-color: transparent !important; |
| 93 | background-image: none !important; |
| 94 | border: 2px solid white; |
| 95 | border-radius: 25px; |
| 96 | } |
| 97 | .windows_theme .mblDomButtonSilverCircleGrayButton > div > div { |
| 98 | background-color: transparent !important; |
| 99 | background-image: none !important; |
| 100 | border: none !important; |
| 101 | } |
| 102 | .windows_theme .mblDomButtonSilverCircleGreenButton > div > div { |
| 103 | background-color: white !important; |
| 104 | } |
| 105 | </style> |
| 106 | </head> |
| 107 | <body style="visibility:hidden;"> |
| 108 | <div id="dlg_message" |
| 109 | data-dojo-type="dojox.mobile.SimpleDialog" |
| 110 | data-dojo-mixins="dojox.mobile._ContentPaneMixin" |
| 111 | data-dojo-props='href:"data/dialog1.html"'></div> |
| 112 | |
| 113 | <div id="dlg_confirm" |
| 114 | data-dojo-type="dojox.mobile.SimpleDialog" |
| 115 | data-dojo-mixins="dojox.mobile._ContentPaneMixin" |
| 116 | data-dojo-props='href:"data/dialog2.html"'></div> |
| 117 | |
| 118 | <div id="dlg_login" |
| 119 | data-dojo-type="dojox.mobile.SimpleDialog" |
| 120 | data-dojo-mixins="dojox.mobile._ContentPaneMixin" |
| 121 | data-dojo-props='href:"data/dialog3.html"'></div> |
| 122 | |
| 123 | <div id="dlg_progress" |
| 124 | data-dojo-type="dojox.mobile.SimpleDialog" |
| 125 | data-dojo-mixins="dojox.mobile._ContentPaneMixin" |
| 126 | data-dojo-props='href:"data/dialog4.html"'></div> |
| 127 | |
| 128 | <div id="dlg_volume" |
| 129 | data-dojo-type="dojox.mobile.SimpleDialog" |
| 130 | data-dojo-mixins="dojox.mobile._ContentPaneMixin" |
| 131 | data-dojo-props='href:"data/dialog5.html"'></div> |
| 132 | |
| 133 | <div id="dlg_select" |
| 134 | data-dojo-type="dojox.mobile.SimpleDialog" |
| 135 | data-dojo-mixins="dojox.mobile._ContentPaneMixin" |
| 136 | data-dojo-props='href:"data/dialog6.html"'></div> |
| 137 | |
| 138 | <div id="view" data-dojo-type="dojox.mobile.View" data-dojo-props='selected:true'> |
| 139 | <div data-dojo-type="dojox.mobile.RoundRect" data-dojo-props='shadow:true'> |
| 140 | Message Box <button onclick="show('dlg_message')">Show Dialog</button> |
| 141 | </div> |
| 142 | <div data-dojo-type="dojox.mobile.RoundRect" data-dojo-props='shadow:true'> |
| 143 | Confirmation Dialog <button onclick="show('dlg_confirm')">Show Dialog</button> |
| 144 | </div> |
| 145 | <div data-dojo-type="dojox.mobile.RoundRect" data-dojo-props='shadow:true'> |
| 146 | Login Dialog <button onclick="show('dlg_login')">Show Dialog</button> |
| 147 | </div> |
| 148 | <div data-dojo-type="dojox.mobile.RoundRect" data-dojo-props='shadow:true'> |
| 149 | Progress Indicator <button onclick="show_progress_indicator('dlg_progress','progress_indicator_container')">Show Dialog</button> |
| 150 | </div> |
| 151 | <div data-dojo-type="dojox.mobile.RoundRect" data-dojo-props='shadow:true'> |
| 152 | Volume Control <button onclick="show('dlg_volume')">Show Dialog</button> |
| 153 | </div> |
| 154 | <div data-dojo-type="dojox.mobile.RoundRect" data-dojo-props='shadow:true'> |
| 155 | Selectable List <button onclick="show('dlg_select')">Show Dialog</button> |
| 156 | </div> |
| 157 | </div> |
| 158 | |
| 159 | </body> |
| 160 | </html> |