-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.html
200 lines (200 loc) · 10.7 KB
/
api.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
<!DOCTYPE html>
<html>
<head>
<title>Quodo 2</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/screen.css">
<script src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/highlight.min.js"></script>
<script src="http://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="http://ricostacruz.com/jquery.transit/jquery.transit.min.js"></script>
<script src="http://underscorejs.org/underscore.js"></script>
<script src="js/ui.js"></script>
<script src="js/demo.js"></script>
</head>
<body>
<div class="wrap">
<main>
<div class="limiter">
<div class="grid">
<div class="col-6"><a href="index.html" class="color-dark-gray-dark">
<div class="logo">Quodo<i class="fa fa-rocket color-cold-dark"></i>2</div>
<p class="logo-p">Application UI library</p></a>
<nav data-collapse="false" data-collapsed-text="Sections" class="nav fat bordered"><a href="index.html">Components</a><a href="typography.html">Typography</a><a href="colors.html">Colors</a><a href="grid.html">Grid</a><a href="api.html" class="active">API</a><a href="roadmap.html">Roadmap</a></nav>
</div>
<div class="col-18">
<h1>JavaScript API</h1>
<nav class="breadcrumbs"><a href="index.html">Main page</a><a href="api.html">API</a>
</nav>
<hr>
<!-- Popup--><a name="Template"></a>
<h2>UI.Template</h2>
<pre class="code-multiline"><code class="javascript">var Template = new UI.Template(templateName);</code></pre><br>
<div class="bullet"><code>Template.render()</code></div>
<hr><a name="Animate"></a>
<h2>UI.Animate</h2>
<pre class="code-multiline"><code class="javascript">var Animate = new UI.Animate({
$element: $('#my-element'),
animationDuration: 300
});</code></pre><br>
<div class="bullet"><code>Animate.play(animationMethod, onDone)</code></div>
<h4>Animation methods</h4>
<div class="bullet bg-mix-light"><code>fadeIn</code></div>
<div class="bullet bg-mix-light"><code>fadeOut</code></div>
<div class="bullet bg-mix-light"><code>appear</code></div>
<div class="bullet bg-mix-light"><code>disappear</code></div>
<div class="bullet bg-mix-light"><code>slideDown</code></div>
<div class="bullet bg-mix-light"><code>slideUp</code></div>
<hr><a name="ClickOutside"></a>
<h2>UI.ClickOutside</h2>
<pre class="code-multiline"><code class="javascript">var ClickOutside = new UI.ClickOutside({
selector: '#my-element',
onClickOutside: function($target){}
})</code></pre><br>
<div class="bullet"><code>ClickOutside.bind()</code></div>
<div class="bullet"><code>ClickOutside.unbind()</code></div>
<hr>
<!-- Popup--><a name="Popup"></a>
<h2>UI.Popup</h2>
<pre class="code-multiline"><code class="javascript">var Popup = new UI.Popup({
width: 500,
modal: false,
animationDuration: 500,
onBeforeShow: function(instance){},
onShow: function(instance){},
onHide: function(instance){}
});</code></pre><br>
<div class="bullet"><code>Popup.show(title, content)</code></div>
<div class="bullet"><code>Popup.hide()</code></div>
<div class="bullet"><code>Popup.showMessage(type, timeout, content)</code></div>
<div class="bullet"><code>Popup.hideMessage()</code></div>
<div class="bullet"><code>Popup.changeContent(html)</code></div>
<div class="bullet"><code>Popup.changeTitle(html)</code></div>
<div class="bullet"><code>Popup.setWaitingMode(timeout, done)</code></div>
<div class="bullet"><code>Popup.removeWaitingMode()</code></div>
<hr>
<!-- Popup--><a name="Tabs"></a>
<h2>UI.Tabs</h2>
<pre class="code-multiline"><code class="javascript">var Tabs = new UI.Tabs({
tabsSelector: '#tabs',
tabsContentSelector: '#tabs-content',
sliding: true,
onTabOpen: function(name){}
});</code></pre><br>
<div class="bullet"><code>Tabs.openTab(name)</code></div>
<div class="bullet"><code>Tabs.next()</code></div>
<div class="bullet"><code>Tabs.prev()</code></div>
<div class="bullet"><code>Tabs.getActive()</code></div>
<hr>
<!-- Fullscreen--><a name="Fullscreen"></a>
<h2>UI.Fullscreen</h2>
<pre class="code-multiline"><code class="javascript">var Fullscreen = new UI.Fullscreen({
animationDuration: 500,
onBeforeShow: function(instance){},
onShow: function(instance){},
onHide: function(instance){}
});</code></pre><br>
<div class="bullet"><code>Fullscreen.hide()</code></div>
<div class="bullet"><code>Fullscreen.setWaitingMode()</code></div>
<div class="bullet"><code>Fullscreen.removeWaitingMode()</code></div>
<div class="bullet"><code>Fullscreen.prepare()</code></div>
<div class="bullet"><code>Fullscreen.render(data, templateName)</code></div>
<div class="bullet"><code>Fullscreen.show()</code></div>
</div>
</div>
</div>
</main>
<div class="push"></div>
</div>
<footer class="footer">
<div class="limiter">
<div class="grid">
<div class="col-6"><a href="index.html" class="color-white">
<div class="logo">Quodo<i class="fa fa-rocket color-cold-dark"></i>2</div>
<p class="logo-p">Application UI library</p></a>
<p><a href="https://github.com/ruslanchek/Quodo-2"><i class="fa fa-github"></i> GitHub</a></p>
</div>
<div class="col-18">
<nav class="nav white">
<div class="grid marginless">
<div class="col-6"><a href="index.html">Components</a><a href="typography.html">Typography</a><a href="colors.html">Colors</a><a href="grid.html">Grid</a></div>
<div class="col-6"><a href="api.html" class="active">API</a><a href="roadmap.html">Roadmap</a></div>
</div>
</nav>
</div>
</div>
</div>
</footer>
<script type="text/x-handlebars-template" id="template-ui-popup">
<div id="{{_id}}" class="popup {{overlay}}">
<div class="overlay"></div>
<div class="window"><a href="#" class="close"> <i class="fa fa-close"></i></a>
<div class="title">
<div class="text">{{title}}</div>
<div class="wait-indicator"></div>
</div>
<div class="messages"></div>
<div class="content">{{content}}</div>
</div>
</div>
</script>
<script type="text/x-handlebars-template" id="template-ui-popup-message">
<div class="message {{className}}">{{content}}</div>
</script>
<script type="text/x-handlebars-template" id="template-ui-fullscreen">
<div class="fullscreen">
<div class="overlay"></div>
<div class="loading">
<div class="animation tween-spin"></div>
</div>
<div class="window">
<div class="limiter">
<div class="viewport"></div>
</div>
</div>
</div>
</script>
<script type="text/x-handlebars-template" id="template-ui-fullscreen-content">
<h3 class="title">{{title}}
<p class="subtitle">{{subtitle}}</p>
</h3><a href="#" class="close">×</a>
<div class="grid">
<div class="col-18">
<div class="content">{{content}}</div>
</div>
<div class="col-6">
<div class="toolbar">{{toolbar}}</div>
</div>
</div>
</script>
<script type="text/x-handlebars-template" id="template-demo-popup-1-content">
<p>This example will show you, how the popup can appear and disappear, and how it play its own waiting animation. Also you can set a timeout, that automatically removes waiting mode from a popup window.</p>
<div id="popup-sample-waiting-checker" class="checker"><a href="#" data-toggled-content="Switch waiting mode off">Switch waiting mode on</a></div>
</script>
<script type="text/x-handlebars-template" id="template-demo-popup-2-content">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
<div class="checker"><a id="popup-sample-messages-error" href="#">Error message</a><a id="popup-sample-messages-success" href="#">Success message</a></div>
</script>
<script type="text/x-handlebars-template" id="template-demo-popup-3-content">
<p>Click anywhere outside this window to close it.</p>
</script>
<script type="text/x-handlebars-template" id="template-demo-popup-4-content">
<div id="tabs-popup" class="tabs fat"><i class="marker"></i><a href="#about" class="active">About</a><a href="#contacts">Contacts</a><a href="#media">Media</a></div>
<div id="tabs-popup-content" class="tabs-content">
<div data-role="tab-page" data-tab="about" class="page">
<p>Your bones don't break, mine do. That's clear. Your cells react to bacteria and viruses differently than mine. You don't get sick, I do. That's also clear. But for some reason, you and I react the exact same way to water. We swallow it too fast, we choke. We get some in our lungs, we drown. However unreal it may seem, we are connected, you and I. We're on the same curve, just on opposite ends.</p>
</div>
<div data-role="tab-page" data-tab="contacts" class="page active">
<p>Your bones don't break, mine do. That's clear. Your cells react to bacteria and viruses differently than mine. You don't get sick, I do.</p>
<p>That's also clear. But for some reason, you and I react the exact same way to water. We swallow it too fast, we choke. We get some in our lungs, we drown. However unreal it may seem, we are connected, you and I. We're on the same curve, just on opposite ends.</p>
</div>
<div data-role="tab-page" data-tab="media" class="page">
<p>Your bones don't break, mine do. That's clear. Your cells react to bacteria and viruses differently than mine. You don't get sick, I do.</p>
<p>That's also clear. But for some reason, you and I react the exact same way to water. We swallow it too fast, we choke. We get some in our lungs, we drown. However unreal it may seem, we are connected, you and I. We're on the same curve, just on opposite ends.</p>
</div>
</div>
</script>
</body>
</html>