-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrid_live.hbs
314 lines (310 loc) · 18.9 KB
/
grid_live.hbs
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
{{#extend "layout"}}
{{#replace "sidebar"}}
{{> sidebar this conditionClass=conditionClass active="grid_live"}}
{{/replace}}
{{#replace "app_content"}}
<h2 class="page-title">Grid - <span class="fw-semi-bold">Live</span> <small>Draggable widgets. Touch screen support</small></h2>
<div class="row">
<div class="col-md-7 col-lg-offset-1">
<section class="widget">
<header>
<h4>New Widgets <span class="label label-danger">since 2.1</span></h4>
</header>
<div class="body">
<p>
Specially for Light Blue 2.1 we have developed a plugin that allows to easily implement basic widget functions that
lots of our customers have requested. The plugin is called <strong>Widgster</strong>. For now it has the following essential
widget features:
</p>
<ul class="text-list">
<li><strong>Collapse/Expand</strong> - all widgets can be collapsed to fill only header's vertical space;</li>
<li><strong>Close</strong> - closable. Any widget may be removed by clicking the close btn;</li>
<li><strong>Full Screen</strong> - an option to make widget fill the whole window (just like OS);</li>
<li><strong>Ajax Load</strong> - the hottest option allowing to load/reload widget content asynchronously. You just
need to provide an url to fetch the data from. With loader delivered.</li>
</ul>
<p>In the future this plugin may be released under MIT license, but for now it's available exclusively with Light Blue.</p>
<p>
Test it out!
</p>
</div>
</section>
</div>
</div>
<div class="row">
<div class="col-md-6 widget-container">
<section class="widget" id="default-widget" data-widgster-load="server/php/widgets/default.php">
<header>
<h5>Default Widget</h5>
<div class="widget-controls">
<a data-widgster="load" title="Reload" href="#"><i class="glyphicon glyphicon-refresh"></i></a>
<a data-widgster="expand" title="Expand" href="#"><i class="glyphicon glyphicon-plus"></i></a>
<a data-widgster="collapse" title="Collapse" href="#"><i class="glyphicon glyphicon-minus"></i></a>
<a data-widgster="fullscreen" title="Full Screen" href="#"><i class="glyphicon glyphicon-resize-full"></i></a>
<a data-widgster="restore" title="Restore" href="#"><i class="glyphicon glyphicon-resize-small"></i></a>
<a data-widgster="close" title="Close" href="#"><i class="glyphicon glyphicon-remove"></i></a>
</div>
</header>
<div class="body">
<p>A timestamp this widget was created: Apr 24, 19:07:07</p>
<p>A timestamp this widget was updated: Apr 24, 19:07:07</p>
</div>
</section>
<section class="widget" id="shares-widget"
data-widgster-load="server/php/widgets/shares.php">
<header>
<h5>
<span class="label label-primary"><i class="fa fa-facebook"></i></span>
Latest <span class="fw-semi-bold">Shares</span>
</h5>
<div class="widget-controls">
<a data-widgster="load" title="Reload" href="#"><strong class="text-gray-light">Reload</strong></a>
<a data-widgster="close" title="Close" href="#"><strong class="text-gray-light">Close</strong></a>
</div>
</header>
<div class="body no-padding">
<div class="list-group list-group-lg">
<a href="#" class="list-group-item">
<span class="thumb-sm pull-left mr">
<img class="img-circle" src="img/1.png" alt="...">
</span>
<i class="fa fa-circle pull-right text-danger mt-sm"></i>
<h5 class="no-margin">Maikel Basso</h5>
<small class="text-muted">about 2 mins ago</small>
</a>
<a href="#" class="list-group-item">
<span class="thumb-sm pull-left mr">
<img class="img-circle" src="img/2.png" alt="...">
</span>
<i class="fa fa-circle pull-right text-info mt-sm"></i>
<h5 class="no-margin">Ianus Arendse</h5>
<small class="text-muted">about 42 mins ago</small>
</a>
<a href="#" class="list-group-item">
<span class="thumb-sm pull-left mr">
<img class="img-circle" src="img/3.png" alt="...">
</span>
<i class="fa fa-circle pull-right text-success mt-sm"></i>
<h5 class="no-margin">Valdemar Landau</h5>
<small class="text-muted">one hour ago</small>
</a>
<a href="#" class="list-group-item mb-n-md">
<span class="thumb-sm pull-left mr">
<img class="img-circle" src="img/13.png" alt="...">
</span>
<i class="fa fa-circle pull-right text-warning mt-sm"></i>
<h5 class="no-margin">Rick Teagan</h5>
<small class="text-muted">3 hours ago</small>
</a>
</div>
</div>
</section>
<section class="widget" id="autoload-widget"
data-widgster-load="server/php/widgets/autoload.php"
data-widgster-autoload="true"
data-widgster-show-loader="false">
<header>
<h5>Autoload widget</h5>
<div class="widget-controls dropdown">
<span>
<i class="fa fa-spinner fa-lg fade"></i>
</span>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-cog"></i>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a data-widgster="load" title="Reload" href="#">Reload
<span class="badge background-success animated bounceIn"><strong>9</strong></span>
</a>
</li>
<li>
<a data-widgster="fullscreen" title="Full Screen" href="#">Fullscreen</a>
<a data-widgster="restore" title="Restore" href="#">Restore</a>
</li>
<li class="divider"></li>
<li><a data-widgster="close" title="Close" href="#">Close</a></li>
</ul>
</div>
</header>
<div class="body">
<h3 class="text-align-center no-margin">Sign up, it's <strong>free</strong></h3>
<p class="lead text-muted text-align-center">
Faith makes it possible to achieve that which man's mind can conceive and believe.
</p>
<div class="row">
<div class="col-md-10 col-md-offset-1">
<form>
<div class="form-group">
<label for="exampleInputEmail1"><i class="fa fa-circle text-warning"></i> Email address</label>
<input type="email" class="form-control input-transparent" id="exampleInputEmail1"
placeholder="Enter email">
</div>
<div class="form-group">
<label for="exampleInputPassword1"><i class="fa fa-circle text-danger"></i> Password</label>
<input type="password" class="form-control input-transparent" id="exampleInputPassword1"
placeholder="Min 8 characters">
<span></span>
</div>
<p>
To make a widget automatically load it's content you just need to set
<strong>data-widgster-autoload</strong> attribute and provide an url.
</p>
<pre><code>data-widgster-load="server/ajax_widget.php"
data-widgster-autoload="true"</code></pre>
<p>
<strong>data-widgster-autoload</strong> may be set to an integer value. If set, for example, to
2000 will refresh widget every 2 seconds.
</p>
<div class="btn-toolbar pull-right">
<button type="button" class="btn btn-transparent">Cancel</button>
<button type="button" class="btn btn-success"> Submit </button>
</div>
</form>
</div>
</div>
</div>
</section>
<section class="widget" style="min-height: 200px">
<header>
<h5>Custom Loader</h5>
</header>
<div class="body">
<div class="loader animated fadeIn handle">
<span class="spinner">
<i class="fa fa-spinner fa-spin"></i>
</span>
</div>
</div>
</section>
</div>
<div class="col-md-6 widget-container">
<section class="widget" id="news-widget" data-widgster-load="server/php/widgets/news.php">
<header>
<h5>
News <span class="badge badge-success">17</span>
</h5>
<span class="text-muted">spinning refresh button & close prompt</span>
<div class="widget-controls">
<a data-widgster="expand" title="Expand" href="#"><i class="glyphicon glyphicon-plus"></i></a>
<a data-widgster="collapse" title="Collapse" href="#"><i class="glyphicon glyphicon-minus"></i></a>
<a data-widgster="load" title="I am spinning!" href="#"><i class="glyphicon glyphicon-refresh"></i></a>
<a data-widgster="close" title="Close" href="#"><i class="glyphicon glyphicon-remove"></i></a>
</div>
</header>
<div class="body">
<ul class="news-list stretchable">
<li>
<span class="icon background-warning">
<i class="fa fa-star"></i>
</span>
<div class="news-item-info">
<h4 class="name"><a href="#">First Human Colony on Mars</a></h4>
<p>
First 700 people will take part in building first human settlement outside of Earth.
That's awesome, right?
</p>
<div class="time">Mar 20, 18:46</div>
</div>
</li>
<li>
<span class="icon background-info">
<i class="fa fa-microphone"></i>
</span>
<div class="news-item-info">
<h4 class="name"><a href="#">Light Blue reached $300</a></h4>
<p>
Light Blue Inc. shares just hit $300 price. "This was inevitable. It should
have happen sooner or later" - says NYSE expert.
</p>
<div class="time">Sep 25, 11:59</div>
</div>
</li>
<li>
<span class="icon background-lime">
<i class="fa fa-eye"></i>
</span>
<div class="news-item-info">
<h4 class="name"><a href="#">No more spying</a></h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
</p>
<div class="time">Mar 20, 18:46</div>
</div>
</li>
</ul>
</div>
<div id="news-close-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="news-close-modal-label" aria-hidden="true" style="display: none;">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="news-close-modal-label">Sure?</h4>
</div>
<div class="modal-body">
Do you really want to unrevertably remove this super news widget?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
<button type="button" class="btn btn-danger" id="news-widget-remove">Yes, remove widget</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
</section>
<section class="widget locked" data-widgster-collapsed="true">
<header>
<h5>Collapsed by default & locked</h5>
<div class="widget-controls">
<a data-widgster="expand" title="Expand" href="#"><i class="glyphicon glyphicon-plus"></i></a>
<a data-widgster="collapse" title="Collapse" href="#"><i class="glyphicon glyphicon-minus"></i></a>
<a data-widgster="close" title="Close" href="#"><i class="glyphicon glyphicon-remove"></i></a>
</div>
</header>
<div class="body">
<blockquote >
There are no limits. There are plateaus, but you must not stay there, you must go beyond
them. If it kills you, it kills you. A man must constantly exceed his level.
<footer>
Bruce Lee
</footer>
</blockquote>
<p>To make a widget initially collapsed just add <code>data-widgster-collapsed="true"</code> attribute to <code>.widget</code>.</p>
<p>To make it locked (prevent dragging) add <code>.locked</code> class.</p>
</div>
</section>
<section class="widget">
<div class="jumbotron handle">
<div class="container">
<h1>Draggable story!</h1>
<p class="lead">
<em>Build</em> your own
interfaces! Sit back and relax.
</p>
<p class="text-align-center">
<a class="btn btn-danger btn-lg" data-widgster="fullscreen">
Fullscreen me!
<i class="fa fa-check"></i>
</a>
</p>
<a class="btn btn-danger btn-lg" data-widgster="restore">
Want to go back?
</a>
</div>
</div>
</section>
</div>
</div>
{{/replace}}
{{#append "scripts"}}
<!-- page specific libs -->
<script src="lib/jquery-ui/ui/core.js"></script>
<script src="lib/jquery-ui/ui/widget.js"></script>
<script src="lib/jquery-ui/ui/mouse.js"></script>
<script src="lib/jquery-ui/ui/sortable.js"></script>
<script src="lib/jqueryui-touch-punch/jquery.ui.touch-punch.min.js"></script>
<!-- page application js -->
<script src="js/grid-live.js"></script>
{{/append}}
{{/extend}}