-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
66 lines (66 loc) · 2.97 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>My First Application</title>
<link rel="stylesheet" type="text/css" href="css/dx.common.css" />
<link rel="stylesheet" type="text/css" href="css/dx.ios.default.css" />
<link rel="stylesheet" type="text/css" href="css/dx.android.holo-dark.css" />
<link rel="stylesheet" type="text/css" href="css/dx.tizen.black.css" />
<link rel="stylesheet" type="text/css" href="css/dx.generic.light.css" />
<link rel="stylesheet" type="text/css" href="css/dx.win8.black.css" />
<script type="text/javascript" src="js/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="js/knockout-3.0.0.js"></script>
<script type="text/javascript" src="js/globalize.min.js"></script>
<script type="text/javascript" src="js/dx.phonejs.js"></script>
<!-- Layouts -->
<script type="text/javascript" src="layouts/Simple/SimpleLayout.js"></script>
<link rel="stylesheet" type="text/css" href="layouts/Simple/SimpleLayout.css" />
<link rel="dx-template" type="text/html" href="layouts/Simple/SimpleLayout.html"/>
<script type="text/javascript">
window.AppNamespace = {};
$(function () {
AppNamespace.app = new DevExpress.framework.html.HtmlApplication({
namespace: AppNamespace,
navigationType: "simple"
});
AppNamespace.app.router.register(":view/:name", { view: "home", name: '' });
AppNamespace.app.navigate();
});
AppNamespace.home = function () {
var viewModel = {
message: ko.observable('Welcome!'),
name: ko.observable(''),
sayHello: function () {
this.message("Hello " + this.name() + '!');
},
greet: function () {
AppNamespace.app.navigate("greeting/" + this.name());
}
};
return viewModel;
};
AppNamespace.greeting = function (params) {
var viewModel = {
message: ko.observable('Hello ' + params.name + '!'),
};
return viewModel;
};
</script>
</head>
<body>
<div data-options="dxView : { name: 'home', title: 'Home' } " >
<div data-options="dxContent : { targetPlaceholder: 'content' } " >
<h1 data-bind="text: message"></h1>
Enter your name: <div data-bind="dxTextBox: { value: name }" style="width: 200px"></div>
<div data-bind="dxButton: { text: 'Say Hello', clickAction: sayHello }"></div>
<div data-bind="dxButton: { text: 'Greet', clickAction: greet }"></div>
</div>
</div>
<div data-options="dxView : { name: 'greeting', title: 'Greeting' } " >
<div data-options="dxContent : { targetPlaceholder: 'content' } " >
<h1 data-bind="text: message"></h1>
</div>
</div>
</body>
</html>