Debian Codegraph @

dojox/mobile/tests/dialogApp/app/assistants/main-assistant.js

raw symbols SCIP
1 dojo.require("dojox.mobile.app.SceneAssistant");
2
3 dojo.declare("MainAssistant", dojox.mobile.app.SceneAssistant, {
4
5 setup: function(){
6 console.log("In main assistant setup");
7
8 // Instantiate widgets in the template HTML.
9 this.controller.parse();
10
11 var appInfoNode = this.controller.query(".appInfoArea")[0];
12
13 appInfoNode.innerHTML =
14 "This app has the following info: \n"
15 + dojo.toJson(dojox.mobile.app.info, true);
16
17 function handleChoose(value){
18 appInfoNode.innerHTML = "Value selected: " + value;
19
20 }
21
22
23 var controller = this.controller;
24
25 console.log("btn1 = ", dijit.byId("btn1"));
26
27 dojo.connect(dijit.byId("btn1"), "onClick", function(){
28 console.log("Clicked btn1");
29 controller.showAlertDialog({
30 title: "First Dialog",
31 text: "This is a simple text message",
32 onChoose: handleChoose,
33
34 buttons: [
35 {
36 label: "Tap Me!",
37 value: "tapped",
38 "class": "mblBlueButton"
39 }
40 ]
41 })
42 });
43
44 dojo.connect(dijit.byId("btn2"), "onClick", function(){
45 console.log("Clicked btn2");
46 controller.showAlertDialog({
47 title: "Second Dialog",
48 text: "These two buttons return different values, 'value one' and 'value two'",
49 onChoose: handleChoose,
50
51 buttons: [
52 {
53 label: "Im Am Button 1",
54 value: "value one",
55 "class": "mblBlueButton"
56 },
57 {
58 label: "Im Am Button 2",
59 value: "value two",
60 "class": "mblBlueButton"
61 }
62 ]
63 })
64 });
65
66 },
67
68 activate: function(){
69 console.log("In main assistant activate");
70
71
72 }
73
74 });