-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
225 lines (215 loc) · 7.06 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>mooPrompt</title>
<script type="text/javascript" src="js/mootools.js"></script>
<script type="text/javascript" src="js/mooprompt.js"></script>
<style type="text/css">
* {margin:0; padding:0;}
html {font-size:62.5%; font-family: verdana, arial;}
input {font-size:1em; font-family: verdana, arial; margin: 5px;}
.cbOverlay {
background-color: #000;
}
.cbContainer {
padding:5px;
background-color:white;
}
.cbBox h3 {
font-size:1.4em;
margin:2px;
background-color:#ccc;
}
.cbBox p {
margin:3px;
}
.cbBox .cbButtons {
text-align:center;
}
li {margin:1ex 0 1ex 2em;}
#examples li {
cursor:pointer;
text-decoration:underline;
}
pre {font-family: monospace;
border:1px solid #ccc;
height:300px;
overflow:auto;
font-size:1.2em;
background-color:#eee;
min-width:600px;
}
.closeButton {
position:absolute;
top:10px;
right:10px;
}
</style>
</head>
<body>
<ul id="examples">
<table width="100%" border="0">
<tbody><tr>
<td>
<li id="box1">Notice box</li>
<li id="box2">Yes/No box</li>
<li id="box3">Yes/No/Cancel box</li>
<li id="boxHtml">HTML element - Login form</li>
<li id="boxHtml2">HTML element + Img button - Report form</li>
</td>
<td>
<li id="box4">Slide - Top Left</li>
<li id="box5">Slide - Top Center</li>
<li id="box6">Slide - Top Right</li>
<li id="box7">Slide - Middle Left</li>
<li id="box8">Slide - Middle Center</li>
</td>
<td>
<li id="box9">Slide - Middle Right</li>
<li id="box10">Slide - Bottom Left</li>
<li id="box11">Slide - Bottom Center</li>
<li id="box12">Slide - Bottom Right</li>
</td>
<td>
Credits:
<p class="credits">
mooPrompt v.0.14<br>
�crazydave - <a href="http://www.clanccc.co.uk/box/box.html" rel="external">http://forum.mootools.net/topic.php?id=421</a><br>
Feel free to use and modify but please provide credits in source.<br>
</p>
</td>
</tr>
</tbody></table>
</ul>
<script type="text/javascript">
$('box1').onclick = function() {
var boxA = new MooPrompt('Notice', 'This is a simple notice box', {
buttons: 1,
width:200,
button1: 'Okay',
onButton1: function() {
window.status = 'You just clicked okay.';
}
});
};
$('box2').onclick = function() {
var boxB = new MooPrompt('Yes or No?', 'Please click either yes or no. lots of test text just to fill the box out a bit so I think I will just rattle on for a bit about nothing really just so there is lots of pointless text contained within this box thingy.', {
buttons: 2,
width:150,
height:100,
button1: 'Yes',
button2: 'No',
onButton1: function() {
window.status = 'You just clicked yes.';
},
onButton2: function() {
window.status = 'You just clicked no.';
}
});
};
$('box3').onclick = function() {
var boxC = new MooPrompt('Yes, No and Cancel', 'This box also has a close delay of 5 seconds... Here you have the choice of either yes, no or cancel.', {
buttons: 3,
width:200,
button1: 'Yes',
button2: 'No',
button3: 'Cancel',
onButton1: function() {
window.status = 'You just clicked yes.';
},
onButton2: function() {
window.status = 'You just clicked no.';
},
onButton3: function() {
window.status = 'You just clicked cancel.';
},
delay: 5000
});
};
$('boxHtml').onclick = function() {
var userForm = new Element('form').setProperties({
'action': 'box.html',
'method': 'post',
'id': 'loginForm'
});
userForm.innerHTML = 'Username<br /><input type="text" name="username" id="username" /><br />Password<br /><input type="password" name="password" id="password" />';
var boxHtml = new MooPrompt('Login prompt', userForm, {
buttons: 2,
button1: 'Login',
button2: 'Cancel',
onButton1: function() {
window.status = 'The form would have submitted Username: '+$('username').value+' Password: '+$('password').value;
}
});
};
$('boxHtml2').onclick = function() {
var userForm = new Element('form').setProperties({
'action': 'box.html',
'method': 'post',
'id': 'reportForm'
});
userForm.innerHTML = '<textarea style="width:290px;" rows="5" cols="50" name="report" id="report"></textarea>';
imgButton = new Element('img').setProperties({
'src': 'images/x.png',
'height' : 9,
'width': 9,
'class': 'closeButton'
});
var boxHtml = new MooPrompt('Login prompt', userForm, {
buttons: 3,
button1: 'Report',
button2: 'Cancel',
button3: imgButton,
onButton1: function() {
window.status = 'The form would have submitted report: '+$('report').value;
}
});
};
$('box4').onclick = function() {
var boxD = new MooPrompt('Testing...', 'Mootools is great, I love it to bits.. blah blah blah...', {
buttons: 1, horizontal: 'left', vertical: 'top', effect:'slide'
});
};
$('box5').onclick = function() {
var boxE = new MooPrompt('Testing...', 'Mootools is great, I love it to bits.. blah blah blah...', {
buttons: 1, horizontal: 'center', vertical: 'top', effect:'slide'
});
};
$('box6').onclick = function() {
var boxF = new MooPrompt('Testing...', 'Mootools is great, I love it to bits.. blah blah blah...', {
buttons: 1, horizontal: 'right', vertical: 'top', effect:'slide'
});
};
$('box7').onclick = function() {
var boxG = new MooPrompt('Testing...', 'Mootools is great, I love it to bits.. blah blah blah...', {
buttons: 1, horizontal: 'left', vertical: 'middle', effect:'slide'
});
};
$('box8').onclick = function() {
var boxH = new MooPrompt('Testing...', 'Mootools is great, I love it to bits.. blah blah blah...', {
buttons: 1, horizontal: 'center', vertical: 'middle', effect:'slide'
});
};
$('box9').onclick = function() {
var boxI = new MooPrompt('Testing...', 'Mootools is great, I love it to bits.. blah blah blah...', {
buttons: 1, horizontal: 'right', vertical: 'middle', effect:'slide'
});
};
$('box10').onclick = function() {
var boxJ = new MooPrompt('Testing...', 'Mootools is great, I love it to bits.. blah blah blah...', {
buttons: 1, horizontal: 'left', vertical: 'bottom', effect:'slide'
});
};
$('box11').onclick = function() {
var boxK = new MooPrompt('Testing...', 'Mootools is great, I love it to bits.. blah blah blah...', {
buttons: 1, horizontal: 'center', vertical: 'bottom', effect:'slide'
});
};
$('box12').onclick = function() {
var boxL = new MooPrompt('Testing...', 'Mootools is great, I love it to bits.. blah blah blah...', {
buttons: 1, horizontal: 'right', vertical: 'bottom', effect:'slide'
});
};
</script>
</body></html>