Debian Codegraph @

docs/example-widget-view.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>jQuery tablesorter 2.0 - View Widget</title>
6
7 <!-- jQuery -->
8 <script src="js/jquery-latest.min.js"></script>
9 <script src="js/jquery-ui.min.js"></script>
10
11 <!-- Demo stuff -->
12 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">
13 <link class="ui-theme" rel="stylesheet" href="css/jquery-ui.min.css">
14 <link rel="stylesheet" href="css/jq.css">
15 <link rel="stylesheet" href="css/prettify.css">
16 <script src="js/prettify.js"></script>
17 <script src="js/docs.js"></script>
18 <!--<link rel="stylesheet" href="css/bootstrap-v3.min.css">-->
19 <!--<script src="js/bootstrap.min.js"></script>-->
20
21 <!-- Tablesorter: required -->
22 <link rel="stylesheet" href="../css/theme.blue.css">
23 <script src="../js/jquery.tablesorter.js"></script>
24 <script src="../js/widgets/widget-storage.js"></script>
25
26 <script src="../js/widgets/widget-pager.js"></script>
27 <script src="../js/widgets/widget-filter.js"></script>
28 <script src="../js/widgets/widget-view.js"></script>
29
30 <style>
31 h1 { font-size: 28px; }
32 /* override jQuery UI overriding Bootstrap */
33 .accordion .ui-widget-content a {
34 color: #337ab7;
35 }
36 /* .spacer in docs css is set to height:800px for stickyHeader demo */
37 #pager .spacer { height: auto; }
38 .wrapper { padding: 5px; }
39
40 /* override doc style; not sure why form > font-size: 10pt?! */
41 #pager form { font-size: 16px; }
42 .thumb { width: 135px; }
43 .part-number { width: 10%; }
44 .part-name { width: 10%; }
45 .part-price { width: 10%; }
46 </style>
47
48 <style id="css">#demo {
49 font-size: 12px;
50 font-family: Tahoma, Arial, sans-serif;
51 color: #333;
52 }
53
54 #demo img {
55 border: 0;
56 }
57
58 #demo h1,
59 #demo h3 {
60 font-weight: normal;
61 line-height: 1em;
62 color: #545454;
63 letter-spacing: -0.04em;
64 padding: 0;
65 margin: 0;
66 text-decoration: none;
67 border: none !important;
68 white-space: nowrap;
69 }
70
71 #demo h1 {
72 font-size: 3em;
73 position: relative;
74 top: 8px;
75 }
76
77 #demo .filtered {
78 display: none !important;
79 }
80
81 #viewHeader {
82 position: relative;
83 height: 35px;
84 }
85
86 #viewHeader section.left {
87 display: block;
88 float: left;
89 width: 200px;
90 position: relative;
91 padding-left: 20px;
92 }
93
94 #viewHeader section.right {
95 display: block;
96 float: right;
97 margin-right: 10px;
98 width: 400px;
99 text-align: right;
100 }
101
102 .hasPrice:before {
103 content: attr(data-currencysym) " ";
104 }
105
106 .hasPrice:after {
107 content: " " attr(data-currencycode);
108 }
109
110 #pager {
111 width: 100%;
112 text-align: center;
113 font-size: 1.35em;
114 }
115
116 #tablesearch {
117 font-size: 1.5em;
118 }
119
120 #ts-view {
121 width: 100%;
122 display: block;
123 }
124
125 #ts-view-toolbar {
126 display: inline-block;
127 }
128
129 .ts-view-switcher {
130 font-size: 24px;
131 color: #fff;
132 padding-left: 5px;
133 }
134
135 .ts-view-switcher:last-child {
136 padding-right: 15px;
137 }
138
139 .ts-view-switcher i,
140 .mybutton {
141 padding: 5px;
142 border-radius: 5px;
143 text-shadow: 0 1px 1px #777;
144 box-shadow: 0 1px 2px 0 #777;
145 color: #fff;
146 text-transform: uppercase;
147 border: 0;
148 background: rgb(70, 74, 88);
149 background: -webkit-linear-gradient(top, rgba(70, 74, 88, 1) 0%, rgba(43, 47, 58, 1) 100%);
150 background: linear-gradient(to bottom, rgba(70, 74, 88, 1) 0%, rgba(43, 47, 58, 1) 100%);
151 filter: progid: DXImageTransform.Microsoft.gradient( startColorstr='#464a58', endColorstr='#2b2f3a', GradientType=0);
152 }
153
154 .ts-view-switcher:hover i,
155 .mybutton:not(.nohover):hover {
156 background: rgb(252, 172, 94);
157 background: -webkit-linear-gradient(top, rgba(252, 172, 94, 1) 0%, rgba(221, 135, 49, 1) 100%);
158 background: linear-gradient(to bottom, rgba(252, 172, 94, 1) 0%, rgba(221, 135, 49, 1) 100%);
159 filter: progid: DXImageTransform.Microsoft.gradient( startColorstr='#fcac5e', endColorstr='#dd8731', GradientType=0);
160 }
161
162 .ts-view-switcher.active i,
163 .mybutton.active {
164 background: rgb(235, 181, 111);
165 background: -webkit-linear-gradient(top, rgba(235, 181, 111, 1) 0%, rgba(203, 145, 68, 1) 100%);
166 background: linear-gradient(to bottom, rgba(235, 181, 111, 1) 0%, rgba(203, 145, 68, 1) 100%);
167 filter: progid: DXImageTransform.Microsoft.gradient( startColorstr='#ebb56f', endColorstr='#cb9144', GradientType=0);
168 }
169
170 .mybutton {
171 margin-left: 8px;
172 padding: 8px;
173 width: 100px;
174 cursor: pointer;
175 }
176
177 /** list view **/
178 ul.list {
179 list-style: none;
180 width: 100%;
181 padding: 0;
182 padding-bottom: 10px;
183 }
184
185 ul.list li {
186 display: block;
187 background: #c9d0d1;
188 padding: 10px 15px;
189 }
190
191 ul.list li.odd {
192 background: #d7dfe0;
193 }
194
195 ul.list li section.left {
196 display: block;
197 float: left;
198 width: 70%;
199 position: relative;
200 padding-left: 20px;
201 }
202
203 ul.list li section.right {
204 display: block;
205 float: right;
206 margin-right: 10px;
207 width: 250px;
208 text-align: right;
209 }
210
211 ul.list li section.left img.thumb {
212 float: left;
213 margin-right: 10px;
214 width: 80px;
215 }
216
217 ul.list li section.left img.featured-banner {
218 position: absolute;
219 left: -18px;
220 top: -3px;
221 width: 100px;
222 }
223
224 ul.list li section.left h3 {
225 font-family: "Trebuchet MS", Arial, sans-serif;
226 font-weight: bold;
227 text-transform: uppercase;
228 color: #707375;
229 font-size: 1.4em;
230 line-height: 1.6em;
231 }
232
233 ul.list li section.left span.meta {
234 color: #93989b;
235 font-weight: normal;
236 font-size: 1.1em;
237 }
238
239 ul.list li section.right span.price {
240 font-weight: bold;
241 display: block;
242 margin-bottom: 15px;
243 color: #ad3939;
244 font-size: 1.6em;
245 text-align: right;
246 }
247
248 ul.list li section.right a.firstbtn {
249 margin-right: 7px;
250 }
251
252 /** grid view **/
253 ul.grid {
254 list-style: none;
255 margin: 0 auto;
256 padding: 0;
257 padding-top: 10px;
258 padding-bottom: 10px;
259 display: block;
260 width: 680px;
261 }
262
263 ul.grid li {
264 position: relative;
265 display: inline-table;
266 width: 220px;
267 height: 200px;
268 border-right: 1px solid #b6bdbe;
269 padding: 5px 22px;
270 margin-bottom: 20px;
271 box-sizing: border-box;
272 -moz-box-sizing: border-box;
273 -webkit-box-sizing: border-box;
274 }
275
276 ul.grid li:nth-child(3n+3) {
277 border: 0;
278 }
279
280 ul.grid li section.left {
281 position: relative;
282 }
283
284 ul.grid li section.right {
285 /* nothing */
286 }
287
288 ul.grid li section.left img.thumb {
289 margin: 0 18px;
290 width: 140px;
291 }
292
293 ul.grid li section.left img.featured-banner {
294 position: absolute;
295 top: -3px;
296 left: 16px;
297 }
298
299 ul.grid li section.left h3 {
300 font-family: "Trebuchet MS", Arial, sans-serif;
301 font-weight: bold;
302 text-transform: uppercase;
303 color: #707375;
304 font-size: 1.4em;
305 line-height: 1.5em;
306 }
307
308 ul.grid li section.left span.meta {
309 display: block;
310 color: #93989b;
311 font-weight: normal;
312 font-size: 1.1em;
313 margin-bottom: 7px;
314 }
315
316 ul.grid li section.right span.price {
317 font-weight: bold;
318 display: block;
319 margin-bottom: 5px;
320 color: #ad3939;
321 font-size: 1.75em;
322 }
323
324 ul.grid li section.right span.darkview {
325 opacity: 0;
326 margin: 0;
327 position: absolute;
328 top: 0;
329 left: 0;
330 width: 190px;
331 height: 100%;
332 margin: 0 15px;
333 border-radius: 6px;
334 background: rgba(40, 45, 55, 0.75);
335 overflow: hidden;
336 text-align: center;
337 padding-top: 35px;
338 box-sizing: border-box;
339 -moz-box-sizing: border-box;
340 -webkit-box-sizing: border-box;
341 transition: opacity 0.2s linear 0s;
342 -webkit-transition: opacity 0.2s linear 0s;
343 }
344
345 ul.grid li:hover section.right span.darkview {
346 opacity: 1;
347 }
348
349 ul.grid li section.right span.darkview a.firstbtn {
350 display: block;
351 margin-bottom: 10px;
352 }
353
354 /** clearfix **/
355 .clearfix:after {
356 content: ".";
357 display: block;
358 clear: both;
359 visibility: hidden;
360 line-height: 0;
361 height: 0;
362 }
363
364 .clearfix {
365 display: inline-block;
366 }
367
368 html[xmlns] .clearfix {
369 display: block;
370 }
371
372 * html .clearfix {
373 height: 1%;
374 }
375 </style>
376 </head>
377 <body>
378 <div id="banner">
379 <h1>table<em>sorter</em></h1>
380 <h2>View Widget (beta)</h2>
381 <h3>Flexible client-side table sorting</h3>
382 <a href="index.html">Back to documentation</a>
383 </div>
384 <div id="main">
385 <p></p>
386 <br>
387 <div id="root" class="accordion">
388
389 <h3 id="notes"><a href="#">Notes</a></h3>
390 <div>
391 <ul>
392 <li>This widget will <strong>only work</strong> in tablesorter version 2.24.0+ and jQuery version 1.7+.</li>
393 <li>When it's done building the view 'viewComplete' will be tiggered</li>
394 <li>{coln} will be replaced with the row/coln value wrapped by a span that has the classes/attributes of the original unless :raw is use, then the text value of row/coln will be used. ie: {col0:raw}</li>
395 </ul>
396 </div>
397
398 <h3 id="options"><a href="#">Options</a></h3>
399 <div>
400 <div>
401 <span class="label label-info">TIP!</span> Click on the link in the function column to reveal full details (or <a href="#" class="toggleAll">toggle</a>|<a href="#" class="showAll">show</a>|<a href="#" class="hideAll">hide</a> all) or double click to update the browser location.
402 </div>
403
404 <table class="options tablesorter-blue">
405 <thead>
406 <tr>
407 <th class="option">Option</th>
408 <th class="defaults">Default</th>
409 <th class="sorter-false">Description</th>
410 </tr>
411 </thead>
412 <tbody>
413
414 <tr id="view-toolbar">
415 <td><a href="#" class="permalink">view_toolbar</a></td>
416 <td>'#ts-view-toolbar'</td>
417 <td>Element to insert toolbar (view buttons) into.
418 <div class="collapsible">
419 <p></p>
420 This option allows you to select which element the view buttons will be injected into.
421 </div>
422 </td>
423 </tr>
424
425 <tr id="view-container">
426 <td><a href="#" class="permalink">view_container</a></td>
427 <td>'#ts-view'</td>
428 <td>Element to insert the view into.
429 <div class="collapsible">
430 <p></p>
431 This option allows you to select which element the view will be injected into.
432 </div>
433 </td>
434 </tr>
435
436 <tr id="view-caption">
437 <td><a href="#" class="permalink">view_caption</a></td>
438 <td>'#ts-view-caption'</td>
439 <td>Element to copy the tabel caption into curing views.
440 <div class="collapsible">
441 <p></p>
442 This option allows you to select which element to copy thre caption into during views.
443 </div>
444 </td>
445 </tr>
446
447 <tr id="view-switcher-class">
448 <td><a href="#" class="permalink">view_switcher_class</a></td>
449 <td>'ts-view-switcher'</td>
450 <td>Class name to be added to all view buttons.
451 <div class="collapsible">
452 <p></p>
453 Name of the class to be added to all view buttons.
454 <p></p>
455 <span class="label warning">* Note *</span> Just put in the name of the class do NOT put a . in front of it.
456 </div>
457 </td>
458 </tr>
459
460 <tr id="view-layout">
461 <td><a href="#" class="permalink">view_layout</a></td>
462 <td>false</td>
463 <td>Default view to display on startup.
464 <div class="collapsible">
465 <p></p>
466 Default view to display on startup, false means none. The value must be an object in <a href="#view-layouts">view_layouts</a>.
467 </div>
468 </td>
469 </tr>
470
471 <tr id="view-layouts">
472 <td><a href="#" class="permalink">view_layouts</a></td>
473 <td>{&nbsp;'view':&nbsp;{&nbsp;&lt;options&gt;&nbsp;}&nbsp;}</td>
474 <td>List of available layouts and it's options.
475 <div class="collapsible">
476 <p></p>
477 In this object you setup each view.
478 <ul>
479 <li><code>icon</code> - This is the class for the view button</li>
480 <li><code>title</code> - Title of this view</li>
481 <li><code>container</code> - Wrapper node for this view</li>
482 <li><code>tpml</code> - HTML layout for this view, {col<i>n</i>} will be replaced with the value in that col <i>n</i></li>
483 <li><code>raw</code> - This is in case you want the raw table data, <code>container</code> and <code>tpml</code> are ignored when raw is <code>true</code>.</li>
484 </ul>
485 </div>
486 </td>
487 </tr>
488
489 </tbody>
490 </table>
491 </div>
492
493 </div>
494 <p></p>
495
496 <h1>View Demo</h1>
497 <p></p>
498 <div id="demo"><!-- View Widget -->
499 <div>
500 <div id="viewHeader">
501 <section class="left">
502 <h1 id="ts-view-caption"></h1>
503 </section>
504 <section class="right">
505 <input type="search" id="tablesearch" placeholder="Search..." data-column="1,2,3" />
506 <div id="ts-view-toolbar"></div>
507 </section>
508 </div>
509 <div id="ts-view"></div>
510 </div>
511
512 <!-- Table -->
513 <table id="table" class="tablesorter">
514 <caption>Our Products</caption>
515 <thead>
516 <tr>
517 <th class="thumb"></th>
518 <th class="part-number">PN</th>
519 <th class="part-name">Name</th>
520 <th class="part-descript">Description</th>
521 <th class="part-price">Price</th>
522 </tr>
523 </thead>
524 <tbody>
525 <tr>
526 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
527 <td>001-10001</td>
528 <td>Widget 1</td>
529 <td>This is Widget 1, it's nice soft and unique.</td>
530 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">19.99</td>
531 </tr>
532 <tr>
533 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
534 <td>001-10002</td>
535 <td>Widget 2</td>
536 <td>This is Widget 2, it's nice fluffy and unique.</td>
537 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">1.99</td>
538 </tr>
539 <tr>
540 <td>
541 <img src="img/sale-banner.png" alt="on sale" class="featured-banner">
542 <img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" />
543 </td>
544 <td>001-10003</td>
545 <td>Widget 3</td>
546 <td>This is Widget 3, it's nice soft and unique.</td>
547 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">89.99</td>
548 </tr>
549 <tr>
550 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
551 <td>001-10004</td>
552 <td>Widget 4</td>
553 <td>This is Widget 4, it's nice soft and unique. I'ts also a little fluffy but not nice and fluffy.</td>
554 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">49.99</td>
555 </tr>
556 <tr>
557 <td>
558 <img src="img/new-product-banner.png" alt="on sale" class="featured-banner">
559 <img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" />
560 </td>
561 <td>001-10005</td>
562 <td>Widget 5</td>
563 <td>This is Widget 5, it's nice soft and unique. This one also have a unique smell and texture. Not for human consumption.</td>
564 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">18.49</td>
565 </tr>
566 <tr>
567 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
568 <td>001-10006</td>
569 <td>Widget 6</td>
570 <td>This is Widget 6, it's nice soft and unique. Nothing special here but I do want a longer description so I can see how things line up, or in this case don't line up. Oh but this is the only Widget we have in purple!</td>
571 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">69.98</td>
572 </tr>
573 <tr>
574 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
575 <td>001-10007</td>
576 <td>Widget 7</td>
577 <td>This is Widget 7, it's nice soft and unique.</td>
578 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">4.99</td>
579 </tr>
580 <tr>
581 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
582 <td>001-10008</td>
583 <td>Widget 8</td>
584 <td>This is Widget 8, it's nice soft and unique.</td>
585 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">17.89</td>
586 </tr>
587 <tr>
588 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
589 <td>001-10009</td>
590 <td>Widget 9</td>
591 <td>This is Widget 9, it's nice soft and unique.</td>
592 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">17.49</td>
593 </tr>
594 <tr>
595 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
596 <td>001-10010</td>
597 <td>Widget 10</td>
598 <td>This is Widget 10, it's nice soft and unique.</td>
599 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">119.99</td>
600 </tr>
601 <tr>
602 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
603 <td>001-10011</td>
604 <td>Widget 11</td>
605 <td>This is Widget 11, it's nice soft and unique.</td>
606 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">18.88</td>
607 </tr>
608 <tr>
609 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
610 <td>001-10012</td>
611 <td>Widget 12</td>
612 <td>This is Widget 12, it's nice soft and unique.</td>
613 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">19.97</td>
614 </tr>
615 <tr>
616 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
617 <td>001-10013</td>
618 <td>Widget 13</td>
619 <td>This is Widget 13, it's nice soft and unique.</td>
620 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">9.98</td>
621 </tr>
622 <tr>
623 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
624 <td>001-10014</td>
625 <td>Widget 14</td>
626 <td>This is Widget 14, it's nice soft and unique.</td>
627 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">29.99</td>
628 </tr>
629 <tr>
630 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
631 <td>001-10015</td>
632 <td>Widget 15</td>
633 <td>This is Widget 15, it's nice soft and unique.</td>
634 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">44.95</td>
635 </tr>
636 <tr>
637 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
638 <td>001-10016</td>
639 <td>Widget 16</td>
640 <td>This is Widget 16, it's nice soft and unique.</td>
641 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">8.69</td>
642 </tr>
643 <tr>
644 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
645 <td>001-10017</td>
646 <td>Widget 17</td>
647 <td>This is Widget 17, it's nice soft and unique.</td>
648 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">17.99</td>
649 </tr>
650 <tr>
651 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
652 <td>001-10018</td>
653 <td>Widget 18</td>
654 <td>This is Widget 18, it's nice soft and unique.</td>
655 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">219.99</td>
656 </tr>
657 <tr>
658 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
659 <td>001-10019</td>
660 <td>Widget 19</td>
661 <td>This is Widget 19, it's nice soft and unique.</td>
662 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">1.98</td>
663 </tr>
664 <tr>
665 <td><img src="img/grid-default-thumb.png" alt="default thumb" class="thumb" /></td>
666 <td>001-10020</td>
667 <td>Widget 20</td>
668 <td>This is Widget 20, it's nice soft and unique.</td>
669 <td class="hasPrice" data-currencysym="$" data-currencycode="CAD">9.97</td>
670 </tr>
671 </tbody>
672 </table>
673
674 <!-- Pager -->
675 <div id="pager" class="pager">
676 <form>
677 <i class="fa fa-step-backward first clickable" title="First page"></i>
678 <i class="fa fa-backward prev clickable" title="Previous page"></i>
679 <span class="pagedisplay"></span>
680 <i class="fa fa-forward next clickable" title="Next page"></i>
681 <i class="fa fa-step-forward last clickable" title="Last page"></i>
682 <select class="pagesize">
683 <option value="6">6</option>
684 <option value="9">9</option>
685 <option value="12">12</option>
686 </select>
687 </form>
688 </div>
689 </div>
690
691 <h1>Page Header</h1>
692 <div>
693 <pre class="prettyprint lang-html">
694 &lt;!-- jQuery --&gt;
695 &lt;script src=&quot;js/jquery-latest.min.js&quot;&gt;&lt;/script&gt;
696
697 &lt;!-- Demo stuff --&gt;
698 &lt;link rel=&quot;stylesheet&quot; href=&quot;//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css&quot;&gt;
699
700 &lt;!-- Tablesorter: required --&gt;
701 &lt;link rel=&quot;stylesheet&quot; href=&quot;../css/theme.blue.css&quot;&gt;
702 &lt;script src=&quot;../js/jquery.tablesorter.js&quot;&gt;&lt;/script&gt;
703 &lt;script src=&quot;../js/widgets/widget-view.js&quot;&gt;&lt;/script&gt;
704
705 &lt;!-- Tablesorter: optional --&gt;
706 &lt;script src=&quot;../js/jquery.tablesorter.widgets.js&quot;&gt;&lt;/script&gt;
707 &lt;script src=&quot;../js/widgets/widget-filter.js&quot;&gt;&lt;/script&gt;
708 &lt;script src=&quot;../js/widgets/widget-pager.js&quot;&gt;&lt;/script&gt;</pre>
709 </div>
710
711 <h1>Javascript</h1>
712 <div id="javascript">
713 <pre class="prettyprint lang-javascript"></pre>
714 </div>
715
716 <h1>CSS</h1>
717 <div id="css">
718 <pre class="prettyprint lang-css"></pre>
719 </div>
720
721 <h1>HTML</h1>
722 <div id="html">
723 <pre class="prettyprint lang-html"></pre>
724 </div>
725
726 </div>
727
728 <script id="js">$(function() {
729 /* Initial settings */
730 var template = '<li class="clearfix">' +
731 '<section class="left">{col0}' +
732 '<h3>{col2}</h3>' +
733 '<span class="meta">Product ID: {col1}</span>' +
734 '<p>{col3}</p>' +
735 '</section>' +
736 '<section class="right">' +
737 '<span class="price">{col4}</span>' +
738 '<span class="darkview">' +
739 '<button type="button" class="mybutton nohover" title="Read More..." >More</button>' +
740 '<button type="button" class="mybutton nohover active" title="Add to Cart" >Add To Cart</button>' +
741 '</span>' +
742 '</section>' +
743 '</li>',
744
745 views = {
746 grid: {
747 icon: 'fa fa-th',
748 title: 'GridView',
749 container: '<ul>',
750 tmpl: template
751 },
752
753 list: {
754 icon: 'fa fa-th-list',
755 title: 'ListView',
756 container: '<ul>',
757 tmpl: template
758 },
759
760 table: {
761 icon: 'fa fa-table',
762 title: 'Orignal TableSorter View',
763 raw: true
764 }
765
766 };
767
768 $('#table').tablesorter({
769 theme: 'blue',
770 widthFixed: true,
771 sortList: [[1, 0]],
772 widgets: ['pager', 'zebra', 'filter', 'view'],
773 widgetOptions: {
774 filter_external: '#tablesearch',
775 filter_columnFilters: false,
776
777 pager_selectors: { container: '#pager' },
778 pager_output: 'Showing {startRow} to {endRow} of {filteredRows} results',
779 pager_size: 6,
780
781 view_layout: 'list',
782 view_layouts: views
783 }
784 });
785
786 });</script>
787
788 <script>
789 $(function() {
790 $('[data-toggle="tooltip"]').tooltip();
791 });
792 </script>
793
794 </body>
795 </html>