Debian Codegraph @

dojox/mobile/tests/doh/button/Button.html

raw symbols SCIP
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
5 <meta name="apple-mobile-web-app-capable" content="yes" />
6 <title>Button</title>
7 <link href="../../../themes/iphone/iphone.css" rel="stylesheet"/>
8 <style>
9 .redButton {
10 border-color: #cc3333;
11 background-image: url(../../images/red-button-bg.png);
12 background: -webkit-gradient(linear, left top, left bottom, from(#D3656D), to(#BC1320), color-stop(0.5, #C9404B), color-stop(0.5, #BC1421));
13 }
14 .redButtonSelected {
15 background-image: url(../../images/red-button-sel-bg.png);
16 background: -webkit-gradient(linear, left top, left bottom, from(#AF333C), to(#880E17), color-stop(0.5, #952B33), color-stop(0.5, #870F18));
17 }
18 </style>
19 <script type="text/javascript" src="../../../../../dojo/dojo.js" data-dojo-config="parseOnLoad: true"></script>
20
21 <script language="JavaScript" type="text/javascript">
22 //dojo.require("dojo.parser"); // Use the lightweight parser.
23 dojo.require("dojox.mobile.parser");
24 dojo.require("dojox.mobile");
25 dojo.require("dojox.mobile.Button");
26 dojo.requireIf(!dojo.isWebKit, "dojox.mobile.compat");
27
28 dojo.require("doh.runner");
29
30 dojo.addOnLoad(function(){
31 doh.register("dojox.mobile.test.doh.Button", [
32 function test_Button_Verification(){
33 var demoWidget = dijit.byId("btn1");
34 doh.assertEqual('mblButton mblBlueButton', demoWidget.domNode.className);
35 doh.assertEqual('Default Button', demoWidget.domNode.childNodes[0].nodeValue);
36 demoWidget = dijit.byId("btn2");
37 doh.assertEqual('mblButton redButton', demoWidget.domNode.className);
38 doh.assertEqual('Custom Button', demoWidget.domNode.childNodes[0].nodeValue);
39 }
40 ]);
41 doh.run();
42 });
43 </script>
44 </head>
45 <body style="padding: 20px;visibility:visible">
46 <button id="btn1" dojoType="dojox.mobile.Button" class="mblBlueButton" style="width:120px">Default Button</button>
47 <p></p>
48 <button id="btn2" dojoType="dojox.mobile.Button" class="redButton" style="width:120px">Custom Button</button>
49 </body>
50 </html>