Debian Codegraph @

dojox/mobile/tests/doh/toolbarbutton/ToolBarButton_Programmatic.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>ToolBarButton</title>
7 <link href="../../../themes/iphone/base.css" rel="stylesheet"/>
8 <link href="../../../themes/iphone/TabBar.css" rel="stylesheet"/>
9 <link href="../../../themes/common/domButtons.css" rel="stylesheet"/>
10
11 <script type="text/javascript" src="../../../../../dojo/dojo.js" data-dojo-config="parseOnLoad: true"></script>
12
13 <script language="JavaScript" type="text/javascript">
14 //dojo.require("dojo.parser"); // Use the lightweight parser.
15 dojo.require("dojox.mobile.parser");
16 dojo.require("dojox.mobile");
17 dojo.require("dojox.mobile.TabBar");
18 dojo.requireIf(!dojo.isWebKit, "dojox.mobile.compat");
19
20 dojo.require("doh.runner");
21 dojo.addOnLoad(function(){
22
23 var view = dijit.byId("general");
24 var demoWidget = new dojox.mobile.Heading({label:"World Clock"});
25 // view.addChild(demoWidget);
26 demoWidget.placeAt(view.containerNode);
27 demoWidget.startup();
28 var childWidget = new dojox.mobile.ToolBarButton({id:"btn1", label:"Edit", style:{padding:"0px 14px"}});
29 childWidget.placeAt(demoWidget.containerNode);
30 childWidget.startup();
31 childWidget = new dojox.mobile.ToolBarButton({icon:"mblDomButtonWhitePlus", style:"float:right;", onclick:"console.log('+ was clicked')"});
32 childWidget.placeAt(demoWidget.containerNode);
33 childWidget.startup();
34
35 demoWidget = new dojox.mobile.Heading({label:"Alarm Clock"});
36 // view.addChild(demoWidget);
37 demoWidget.placeAt(view.containerNode);
38 demoWidget.startup();
39 childWidget = new dojox.mobile.ToolBarButton({label:"Edit", style:{padding:"0px 14px"}});
40 childWidget.placeAt(demoWidget.containerNode);
41 childWidget.startup();
42 childWidget = new dojox.mobile.ToolBarButton({icon:"mblDomButtonWhitePlus", style:{float:"right"}});
43 childWidget.placeAt(demoWidget.containerNode);
44 childWidget.startup();
45
46 demoWidget = new dojox.mobile.Heading({label:"Voice Memos"});
47 // view.addChild(demoWidget);
48 demoWidget.placeAt(view.containerNode);
49 demoWidget.startup();
50 childWidget = new dojox.mobile.ToolBarButton({label:"Speaker"});
51 childWidget.placeAt(demoWidget.containerNode);
52 childWidget.startup();
53 childWidget = new dojox.mobile.ToolBarButton({label:"Done", btnClass:"mblColorBlue", style:{float:"right"}});
54 dojo.removeClass(childWidget.domNode, "mblColorDefault ");
55 childWidget.placeAt(demoWidget.containerNode);
56 childWidget.startup();
57
58 demoWidget = new dojox.mobile.Heading({label:"Updatess"});
59 // view.addChild(demoWidget);
60 demoWidget.placeAt(view.containerNode);
61 demoWidget.startup();
62 childWidget = new dojox.mobile.ToolBarButton({label:"Update All", style:{float:"right"}});
63 childWidget.placeAt(demoWidget.containerNode);
64 childWidget.startup();
65
66 demoWidget = new dojox.mobile.Heading({label:"News", back:"Bookmarks", moveTo:"bookmarks"});
67 // view.addChild(demoWidget);
68 demoWidget.placeAt(view.containerNode);
69 demoWidget.startup();
70 childWidget = new dojox.mobile.ToolBarButton({label:"Done", btnClass:"mblColorBlue", style:{float:"right"}});
71 dojo.removeClass(childWidget.domNode, "mblColorDefault ");
72 childWidget.placeAt(demoWidget.containerNode);
73 childWidget.startup();
74
75 demoWidget = new dojox.mobile.Heading();
76 // view.addChild(demoWidget);
77 demoWidget.placeAt(view.containerNode);
78 demoWidget.startup();
79 childWidget = new dojox.mobile.ToolBarButton({label:"Done", btnClass:"mblColorBlue"});
80 dojo.removeClass(childWidget.domNode, "mblColorDefault ");
81 childWidget.placeAt(demoWidget.containerNode);
82 childWidget.startup();
83 childWidget = new dojox.mobile.ToolBarButton({label:"New Folder", style:{float:"right"}});
84 childWidget.placeAt(demoWidget.containerNode);
85 childWidget.startup();
86
87 demoWidget = new dojox.mobile.Heading();
88 // view.addChild(demoWidget);
89 demoWidget.placeAt(view.containerNode);
90 demoWidget.startup();
91 childWidget = new dojox.mobile.ToolBarButton({label:"New", toggle:"true"});
92 childWidget.placeAt(demoWidget.containerNode);
93 childWidget.startup();
94 childWidget = new dojox.mobile.ToolBarButton({label:"Toggle", toggle:"true"});
95 childWidget.placeAt(demoWidget.containerNode);
96 childWidget.startup();
97 childWidget = new dojox.mobile.ToolBarButton({icon:"../../images/a-icon-12.png", moveTo:"view3"});
98 childWidget.placeAt(demoWidget.containerNode);
99 childWidget.startup();
100 childWidget = new dojox.mobile.ToolBarButton({icon:"../../images/tab-icons.png", iconPos:"29,0,29,29", moveTo:"view3"});
101 childWidget.placeAt(demoWidget.containerNode);
102 childWidget.startup();
103 childWidget = new dojox.mobile.ToolBarButton({icon:"mblDomButtonWhitePlus", iconPos:"29,0,29,29", style:{float:"right"}});
104 childWidget.placeAt(demoWidget.containerNode);
105 childWidget.startup();
106
107 demoWidget = new dojox.mobile.Heading();
108 // view.addChild(demoWidget);
109 demoWidget.placeAt(view.containerNode);
110 demoWidget.startup();
111 childWidget = new dojox.mobile.ToolBarButton({icon:"mblDomButtonWhiteSearch", style:{float:"right"}});
112 childWidget.placeAt(demoWidget.containerNode);
113 childWidget.startup();
114
115 demoWidget = new dojox.mobile.Heading({align:"center"});
116 // view.addChild(demoWidget);
117 demoWidget.placeAt(view.containerNode);
118 demoWidget.startup();
119 childWidget = new dojox.mobile.ToolBarButton({icon:"mblDomButtonWhitePlus"});
120 childWidget.placeAt(demoWidget.containerNode);
121 childWidget.startup();
122 childWidget = new dojox.mobile.ToolBarButton({icon:"../../images/tab-icon-15h.png", style:{float:"right"}});
123 childWidget.placeAt(demoWidget.containerNode);
124 childWidget.startup();
125
126 demoWidget = new dojox.mobile.Heading({label:"Inbox(32)", back:"Top"});
127 // view.addChild(demoWidget);
128 demoWidget.placeAt(view.containerNode);
129 demoWidget.startup();
130 childWidget = new dojox.mobile.ToolBarButton({icon:"mblDomButtonWhiteSearch", style:{float:"right"}});
131 childWidget.placeAt(demoWidget.containerNode);
132 childWidget.startup();
133 childWidget = new dojox.mobile.ToolBarButton({icon:"mblDomButtonWhiteUpArrow", style:{float:"right"}});
134 childWidget.placeAt(demoWidget.containerNode);
135 childWidget.startup();
136 childWidget = new dojox.mobile.ToolBarButton({icon:"mblDomButtonWhiteDownArrow", style:{float:"right"}});
137 childWidget.placeAt(demoWidget.containerNode);
138 childWidget.startup();
139
140 // Test cases for #16771
141 // a) With arrow but no label (nor icon)
142 demoWidget = new dojox.mobile.Heading();
143 demoWidget.placeAt(view.containerNode);
144 demoWidget.startup();
145 childWidget = new dojox.mobile.ToolBarButton({arrow:"left"});
146 childWidget.placeAt(demoWidget.containerNode);
147 childWidget.startup();
148
149 demoWidget = new dojox.mobile.Heading();
150 demoWidget.placeAt(view.containerNode);
151 demoWidget.startup();
152 childWidget = new dojox.mobile.ToolBarButton({arrow:"right"});
153 childWidget.placeAt(demoWidget.containerNode);
154 childWidget.startup();
155
156 // b) With arrow, icon and label
157 demoWidget = new dojox.mobile.Heading();
158 demoWidget.placeAt(view.containerNode);
159 demoWidget.startup();
160 childWidget = new dojox.mobile.ToolBarButton({arrow:"left", icon:"mblDomButtonWhiteDownArrow", label:"some label"});
161 childWidget.placeAt(demoWidget.containerNode);
162 childWidget.startup();
163
164 demoWidget = new dojox.mobile.Heading();
165 demoWidget.placeAt(view.containerNode);
166 demoWidget.startup();
167 childWidget = new dojox.mobile.ToolBarButton({arrow:"right", icon:"mblDomButtonWhiteDownArrow", label:"some label"});
168 childWidget.placeAt(demoWidget.containerNode);
169 childWidget.startup();
170 // end of test cases for #16771
171 });
172 </script>
173 <script type="text/javascript" src="../TestUtil.js"></script>
174 <script type="text/javascript" src="ToolBarButton.js"></script>
175 </head>
176 <body>
177 <div id="general" dojoType="dojox.mobile.View" selected="true">
178 </div>
179
180 </body>
181 </html>