This repository has been archived by the owner on Aug 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdemo.html
89 lines (77 loc) · 3.79 KB
/
demo.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
<!DOCTYPE html>
<html>
<head>
<title>Dialogs.js</title>
<!-- <link rel="stylesheet" href="http://twitter.github.io/bootstrap/assets/css/bootstrap.css" /> -->
<link rel="stylesheet" href="http://designmodo.github.io/Flat-UI/css/flat-ui.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<style>
</style>
<script type="text/javascript" src="http://xoxco.com/js/jquery.min.js"></script>
<script type="text/javascript" src="dialogs.js"></script>
<script type="text/javascript">
$(function() {
console.log('BORT>>>');
var lipsem = '<p>Ad labore kale chips Wes Anderson fingerstache Schlitz, mumblecore sint blue bottle leggings eiusmod bitters cornhole. Lo-fi gentrify sustainable four loko Neutra, literally pickled. Tote bag thundercats asymmetrical, jean shorts bitters narwhal esse leggings. 90\'s consectetur cardigan, whatever stumptown Bushwick chillwave 8-bit synth Marfa sapiente dolor. Minim Brooklyn thundercats Cosby sweater messenger bag viral. Etsy ut bespoke duis voluptate pug. Et cornhole fap, minim Terry Richardson ea shoreditch fugiat culpa.</p><p>Ad labore kale chips Wes Anderson fingerstache Schlitz, mumblecore sint blue bottle leggings eiusmod bitters cornhole. Lo-fi gentrify sustainable four loko Neutra, literally pickled. Tote bag thundercats asymmetrical, jean shorts bitters narwhal esse leggings. 90\'s consectetur cardigan, whatever stumptown Bushwick chillwave 8-bit synth Marfa sapiente dolor. Minim Brooklyn thundercats Cosby sweater messenger bag viral. Etsy ut bespoke duis voluptate pug. Et cornhole fap, minim Terry Richardson ea shoreditch fugiat culpa.</p><p>Ad labore kale chips Wes Anderson fingerstache Schlitz, mumblecore sint blue bottle leggings eiusmod bitters cornhole. Lo-fi gentrify sustainable four loko Neutra, literally pickled. Tote bag thundercats asymmetrical, jean shorts bitters narwhal esse leggings. 90\'s consectetur cardigan, whatever stumptown Bushwick chillwave 8-bit synth Marfa sapiente dolor. Minim Brooklyn thundercats Cosby sweater messenger bag viral. Etsy ut bespoke duis voluptate pug. Et cornhole fap, minim Terry Richardson ea shoreditch fugiat culpa.</p>';
//var content = lipsem;
var content = '<h1>Hello world</h1>';
//var content = '<form><p><label>Email</label><input type="email" /></p><p><label>Password</label><input type="password" /></p></form>';
window.d1 = new Dialog(content,[
'cancel',
{
label: 'Next <span class="fui-arrow-right"></span>',
class: 'btn-primary',
click: function() {
if (!this.ok) {
// chain dialogs together with automatic back buttons
this.ok=this.dialog('Hey ok! How is it going now?',['back','ok','cancel'],{
chained:true,
title: 'Dialog 2',
/*
width:500,
height:200
*/
});
$(this.ok).on('ok',function() {
console.log('CLICKED OK ON INTERIOR DIALOG');
this.third = this.dialog('Woo!',[],{
title: 'Dialog 3',
chained: true
});
});
$(this.ok).on('back',function() {
console.log('CLICKED BACK ON INTERIOR DIALOG');
});
} else {
this.ok.open();
}
}
},'foo'
],{
class: 'md-effect-11',
title: 'Dialog.js',
width: 500,
height: 400
});
// bind to a click event this way
$(d1).on('foo',function() {
console.log('Foo!');
});
$(d1).on('next',function() {
console.log('Next!');
});
$(d1).on('closed',function() {
console.log('closed');
var d2 = new Dialog('Whoa! You can\'t close the dialog!!!');
$(d2).on('closed',function() { d1.open(); });
});
});
</script>
</head>
<body>
<div id="everything">
<h1>Hello!</h1>
<h1>Hello!</h1>
</div>
</body>
</html>