forked from marcopeg/MediaTable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
198 lines (160 loc) · 6.61 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
<!--
Copyright (c) 2012 Marco Pegoraro, http://movableapp.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WHERE TO FIND MEDIA TABLE:
https://github.com/thepeg/MediaTable
http://consulenza-web.com/jquery/MediaTable/
http://www.consulenza-web.com/2012/01/mediatable-jquery-plugin/
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>MediaTable | Responsive Table | Plugin jQuery | www.consulenza-web.com</title>
<meta name="description" content="jQUery Plugin Media Table: adapt HTML tables to fit many screen sizes. Uses media-query and javascript. IE proof!" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<!-- MediaTable Plugin -->
<!-- This is all you need to copy in your page! -->
<link rel="stylesheet" href="jquery.mediaTable.css" />
<script src="jquery.mediaTable.js"></script>
<!-- Functional Script: this activate/deactivate MediaTable -->
<script type="text/javascript">
$(document).ready(function(){
$('#create').click(function(){ $('.mediaTable').mediaTable() });
$('#destroy').click(function(){ $('.mediaTable').mediaTable('destroy') });
$('.article a').click(function(e){
e.preventDefault();
$($(this).attr('href')).trigger('click');
});
});
</script>
<!-- Page Style, don't care about this code -->
<style type="text/css">
html { text-align:center; background: #fff; font-family: "Trebuchet MS"; font-size:1em; }
body { display:block; width:95%; margin:2em auto; text-align:left; }
a { color:#0063c5}
h1,h2 { margin:0; font-weight:normal; }
h2 { font-size:1em; margin-bottom:2em; }
.article { border-top:1px solid #444;border-bottom:1px solid #444;margin-bottom:2em;font-size:0.85em;line-height: 1.3em; color:#333; padding:0;}
.controls { text-align: center;margin-bottom:2em;}
.controls input { font-size:1em; padding:0.5em; }
#create { color:green }
#destroy { color:#900 }
.credits { margin-top:3em;text-align: center;font-size:0.8em; background: #ddd; text-shadow: 0 1px 0 #fff; padding:0.2em; }
.mediaTable { font-size:0.8em;}
</style>
<!--[if lt IE 9]>
<script src="respond.min.js"></script>
<![endif]-->
</head>
<body>
<h1>MediaTable</h1>
<h2>Responsive Table jQuery Plguin</h2>
<div class="article">
<h3>What does this plugin do?</h3>
<p>
<strong>MediaTable</strong> listen to screen size to define visible or hidden columns using <strong>CSS media query</strong>.<br>
You can choose what column to view with the automagically columns menu.
</p>
<p>
This is a usefull solution to display <strong>big data table into small screen devices</strong> allowing the user to display relevant data at the beginning then to <strong>choose what data to display</strong>.
</p>
<h3>How do I use this demo?</h3>
<ol>
<li>Look at the number of colums displayed in the table below</li>
<li>Click on <a href="#create">Enable MediaTable</a> to startup the widget</li>
<li>Look at the menu generated upon the table. You can choose what columns to display</li>
<li><strong>Resize the window</strong> (or change orientation on iPad) to see how table changes</li>
<li>Click on <a href="#destroy">Disable MediaTable</a> to completely remove the widget form the table</li>
</ol>
</div>
<!-- Example Controls -->
<div class="controls">
<input id="create" type="button" value="Enable MediaTable" />
<input id="destroy" type="button" value="Disable MediaTable" />
</div>
<!-- Example Data Table -->
<table class="mediaTable">
<thead>
<tr>
<th class="essential persist">Employee</th>
<th class="essential">xHTML</th>
<th class="optional">HTML5</th>
<th class="essential">CSS</th>
<th class="essential">JS</th>
<th class="optional">jQuery</th>
<th class="optional">jQueryUI</th>
<th>jQuery Mobile</th>
<th>Sencha Touch</th>
<th class="essential">PHP</th>
<th>PHP (OO)</th>
<th class="optional">CakePHP</th>
</tr>
</thead>
<tbody>
<tr>
<td>Marco Pegoraro</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
</tr>
<tr>
<td>Mario Rossi</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="no">n</td>
<td class="yes">y</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="no">n</td>
</tr>
<tr>
<td>Alberto Bianchi</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="yes">y</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
</tr>
</tbody>
</table>
<div class="credits">
<p>Created by <a href="http://marcopeg.github.io" title="Marco Pegoraro Personal Blog" target="_blank">Marco Pegoraro</a> | Based upon a <a href="http://filamentgroup.com/lab/responsive_design_approach_for_complex_multicolumn_data_tables/" target="_blank">Filament Group</a> article | Fork on <a href="https://github.com/thepeg/MediaTable" target="_blank">GitHub</a></p>
</div>
</body>
</html>