-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·163 lines (148 loc) · 6.09 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.css" />
<link rel="stylesheet" type="text/css" href="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.css" />
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog2.min.js"></script>
<script>
$(document).bind("ready", function(){
});
function tryModal()
{
$( "#popupDialog" ).popup( "open" )
}
var nextDialogFunction = null;
function processDialogCancel()
{
if (nextDialogFunction != null)
nextDialogFunction();
nextDialogFunction = null;
}
function invokeDialog( event, nextTarget )
{
event.preventDefault();
nextDialogFunction = nextTarget;
$('<div>').simpledialog2({
mode: 'blank',
headerText: 'Some Stuff',
headerClose: false,
blankContent :
"<p>This is a dialog with a message</p><br/>" +
// NOTE: the use of rel="close" causes this button to close the dialog.
"<a rel='close' onclick='processDialogCancel()' data-role='button' href='#'>Close</a>"
});
return false;
}
function b1target()
{
$.mobile.changePage("#b1Page")
}
function b2target()
{
$.mobile.changePage("#b2Page")
}
</script>
</head>
<body>
<div data-role="page" id="page1">
<div data-role="header">
<h3>
Page 1
</h3>
</div>
<div data-role="content" id="main">
<a data-role="button" href="#page2" data-transition="flip" >
Go to Page 2
</a>
<a data-role="button" onclick="tryModal()" >Modal Popup</a>
<a href="#dialog" data-role="button" data-inline="true" data-rel="dialog" data-transition="pop">Open dialog</a>
<a href="#popupLogin" data-rel="popup" data-position-to="window" data-role="button" data-inline="true">Form</a>
<a href="#popupDialog" data-rel="popup" data-position-to="window" data-role="button" data-inline="true" data-transition="pop">Open Popup Dialog</a>
<div data-role="popup" id="popupDialog" data-overlay-theme="a" data-theme="c" style="max-width:400px;" class="ui-corner-all">
<div data-role="header" data-theme="a" class="ui-corner-top">
<h1>Delete Page?</h1>
</div>
<div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
<h3 class="ui-title">Are you sure you want to delete this page?</h3>
<p>This action cannot be undone.</p>
<a href="#" data-role="button" data-inline="true" data-rel="back" data-theme="c">Cancel</a>
<a href="#" data-role="button" data-inline="true" data-rel="back" data-transition="flow" data-theme="b">Delete</a>
</div>
</div>
<div data-role="popup" id="popupLogin" data-overlay-theme="a" data-theme="a" class="ui-corner-all">
<form>
<div style="padding:10px 20px;">
<h3>Please sign in</h3>
<label for="un" class="ui-hidden-accessible">Username:</label>
<input type="text" name="user" id="un" value="" placeholder="username" data-theme="a" />
<label for="pw" class="ui-hidden-accessible">Password:</label>
<input type="password" name="pass" id="pw" value="" placeholder="password" data-theme="a" />
<button type="submit" data-theme="b">Sign in</button>
</div>
</form>
</div>
</div>
</div>
<div data-role="page" id="page2">
<div data-role="header">
<h3>
Page 2
</h3>
<a data-role="button" data-direction="reverse" data-rel="back"
href="#page2" data-icon="arrow-l" data-iconpos="left">
Back
</a>
</div>
<div data-role="content">
<a href="javascript:void(0);" data-role="button" data-inline="true" onclick="return invokeDialog(event,b1target);">b1</a>
<a href="javascript:void(0);" data-role="button" data-inline="true" onclick="return invokeDialog(event,b2target);">b2</a>
</div>
</div>
<div data-role="page" id="b1Page">
<div data-role="header">
<h3>
B1 Page
</h3>
<a data-role="button" data-direction="reverse" data-rel="back"
href="#page2" data-icon="arrow-l" data-iconpos="left">
Back
</a>
</div>
<div data-role="content">
<a href="#page1" data-role="button" data-inline="true" >Page 1</a>
</div>
</div>
<div data-role="page" id="b2Page">
<div data-role="header">
<h3>
B2 Page
</h3>
<a data-role="button" data-direction="reverse" data-rel="back"
href="#page2" data-icon="arrow-l" data-iconpos="left">
Back
</a>
</div>
<div data-role="content">
<a href="#page1" data-role="button" data-inline="true" >Page 1</a>
</div>
</div>
<div data-role="dialog" id="dialog" >
<div data-role="header" data-theme="a" class="ui-corner-top">
<h1>Dialog Title</h1>
</div>
<div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
<h3 class="ui-title">Are you sure you want to delete this page?</h3>
<p>This action cannot be undone.</p>
<a href="#" data-role="button" data-inline="true" data-rel="back" data-theme="c">Cancel</a>
<a href="#" data-role="button" data-inline="true" data-rel="back" data-transition="flow" data-theme="b">Delete</a>
</div>
</div>
<script>
//App custom javascript
</script>
</body>
</html>