Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / pybind / mgr / dashboard / static / AdminLTE-2.3.7 / plugins / datatables / extensions / ColVis / examples / two_tables_identical.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4         <meta charset="utf-8">
5         <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
6         <meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
7
8         <title>ColVis example - Two tables with shared controls</title>
9         <link rel="stylesheet" type="text/css" href="../../../media/css/jquery.dataTables.css">
10         <link rel="stylesheet" type="text/css" href="../css/dataTables.colVis.css">
11         <link rel="stylesheet" type="text/css" href="../../../examples/resources/syntax/shCore.css">
12         <link rel="stylesheet" type="text/css" href="../../../examples/resources/demo.css">
13         <style type="text/css" class="init">
14
15         </style>
16         <script type="text/javascript" language="javascript" src="../../../media/js/jquery.js"></script>
17         <script type="text/javascript" language="javascript" src="../../../media/js/jquery.dataTables.js"></script>
18         <script type="text/javascript" language="javascript" src="../js/dataTables.colVis.js"></script>
19         <script type="text/javascript" language="javascript" src="../../../examples/resources/syntax/shCore.js"></script>
20         <script type="text/javascript" language="javascript" src="../../../examples/resources/demo.js"></script>
21         <script type="text/javascript" language="javascript" class="init">
22
23
24 $(document).ready(function() {
25         var tables = $('table.display').DataTable( {
26                 displayLength: 5
27         } );
28
29         // When the column visibility changes on the firs table, also change it on
30         // the others
31         tables.table(0).on('column-visibility', function ( e, settings, colIdx, visibility ) {
32                 tables.tables(':gt(0)').column( colIdx ).visible( visibility );
33         } );
34
35         // Create ColVis on the first table only
36         var colvis = new $.fn.dataTable.ColVis( tables.table(0) );
37         $( colvis.button() ).insertAfter('div.info');
38 } );
39
40
41         </script>
42 </head>
43
44 <body class="dt-example">
45         <div class="container">
46                 <section>
47                         <h1>ColVis example <span>Two tables with shared controls</span></h1>
48
49                         <div class="info">
50                                 <p>This example shows how the DataTables API can be used with ColVis to use a single ColVis control to effect other tables. This is done by applying ColVis to the
51                                 first table and then listening for the <a href="//datatables.net/reference/event/column-visibility"><code class="event" title=
52                                 "DataTables event">column-visibility<span>DT</span></code></a> event and updating all other tables when triggered.</p>
53
54                                 <p>This example makes use of the <a href="//datatables.net/reference/api/tables()"><code class="api" title=
55                                 "DataTables API method">tables()<span>DT</span></code></a> and <a href="//datatables.net/reference/api/table()"><code class="api" title=
56                                 "DataTables API method">table()<span>DT</span></code></a> methods for working with multiple tables, and also initialised ColVis using the <code>new
57                                 $.fn.dataTable.ColVis();</code> operator.</p>
58                         </div>
59
60                         <table id="" class="display" cellspacing="0" width="100%">
61                                 <thead>
62                                         <tr>
63                                                 <th>Name</th>
64                                                 <th>Position</th>
65                                                 <th>Office</th>
66                                                 <th>Age</th>
67                                                 <th>Salary</th>
68                                         </tr>
69                                 </thead>
70
71                                 <tfoot>
72                                         <tr>
73                                                 <th>Name</th>
74                                                 <th>Position</th>
75                                                 <th>Office</th>
76                                                 <th>Age</th>
77                                                 <th>Salary</th>
78                                         </tr>
79                                 </tfoot>
80
81                                 <tbody>
82                                         <tr>
83                                                 <td>Tiger Nixon</td>
84                                                 <td>System Architect</td>
85                                                 <td>Edinburgh</td>
86                                                 <td>61</td>
87                                                 <td>$320,800</td>
88                                         </tr>
89                                         <tr>
90                                                 <td>Cedric Kelly</td>
91                                                 <td>Senior Javascript Developer</td>
92                                                 <td>Edinburgh</td>
93                                                 <td>22</td>
94                                                 <td>$433,060</td>
95                                         </tr>
96                                         <tr>
97                                                 <td>Sonya Frost</td>
98                                                 <td>Software Engineer</td>
99                                                 <td>Edinburgh</td>
100                                                 <td>23</td>
101                                                 <td>$103,600</td>
102                                         </tr>
103                                         <tr>
104                                                 <td>Quinn Flynn</td>
105                                                 <td>Support Lead</td>
106                                                 <td>Edinburgh</td>
107                                                 <td>22</td>
108                                                 <td>$342,000</td>
109                                         </tr>
110                                         <tr>
111                                                 <td>Dai Rios</td>
112                                                 <td>Personnel Lead</td>
113                                                 <td>Edinburgh</td>
114                                                 <td>35</td>
115                                                 <td>$217,500</td>
116                                         </tr>
117                                         <tr>
118                                                 <td>Gavin Joyce</td>
119                                                 <td>Developer</td>
120                                                 <td>Edinburgh</td>
121                                                 <td>42</td>
122                                                 <td>$92,575</td>
123                                         </tr>
124                                         <tr>
125                                                 <td>Martena Mccray</td>
126                                                 <td>Post-Sales support</td>
127                                                 <td>Edinburgh</td>
128                                                 <td>46</td>
129                                                 <td>$324,050</td>
130                                         </tr>
131                                         <tr>
132                                                 <td>Jennifer Acosta</td>
133                                                 <td>Junior Javascript Developer</td>
134                                                 <td>Edinburgh</td>
135                                                 <td>43</td>
136                                                 <td>$75,650</td>
137                                         </tr>
138                                         <tr>
139                                                 <td>Shad Decker</td>
140                                                 <td>Regional Director</td>
141                                                 <td>Edinburgh</td>
142                                                 <td>51</td>
143                                                 <td>$183,000</td>
144                                         </tr>
145                                 </tbody>
146                         </table>
147
148                         <table id="" class="display" cellspacing="0" width="100%">
149                                 <thead>
150                                         <tr>
151                                                 <th>Name</th>
152                                                 <th>Position</th>
153                                                 <th>Office</th>
154                                                 <th>Age</th>
155                                                 <th>Salary</th>
156                                         </tr>
157                                 </thead>
158
159                                 <tfoot>
160                                         <tr>
161                                                 <th>Name</th>
162                                                 <th>Position</th>
163                                                 <th>Office</th>
164                                                 <th>Age</th>
165                                                 <th>Salary</th>
166                                         </tr>
167                                 </tfoot>
168
169                                 <tbody>
170                                         <tr>
171                                                 <td>Jena Gaines</td>
172                                                 <td>Office Manager</td>
173                                                 <td>London</td>
174                                                 <td>30</td>
175                                                 <td>$90,560</td>
176                                         </tr>
177                                         <tr>
178                                                 <td>Haley Kennedy</td>
179                                                 <td>Senior Marketing Designer</td>
180                                                 <td>London</td>
181                                                 <td>43</td>
182                                                 <td>$313,500</td>
183                                         </tr>
184                                         <tr>
185                                                 <td>Tatyana Fitzpatrick</td>
186                                                 <td>Regional Director</td>
187                                                 <td>London</td>
188                                                 <td>19</td>
189                                                 <td>$385,750</td>
190                                         </tr>
191                                         <tr>
192                                                 <td>Michael Silva</td>
193                                                 <td>Marketing Designer</td>
194                                                 <td>London</td>
195                                                 <td>66</td>
196                                                 <td>$198,500</td>
197                                         </tr>
198                                         <tr>
199                                                 <td>Bradley Greer</td>
200                                                 <td>Software Engineer</td>
201                                                 <td>London</td>
202                                                 <td>41</td>
203                                                 <td>$132,000</td>
204                                         </tr>
205                                         <tr>
206                                                 <td>Angelica Ramos</td>
207                                                 <td>Chief Executive Officer (CEO)</td>
208                                                 <td>London</td>
209                                                 <td>47</td>
210                                                 <td>$1,200,000</td>
211                                         </tr>
212                                         <tr>
213                                                 <td>Suki Burks</td>
214                                                 <td>Developer</td>
215                                                 <td>London</td>
216                                                 <td>53</td>
217                                                 <td>$114,500</td>
218                                         </tr>
219                                         <tr>
220                                                 <td>Prescott Bartlett</td>
221                                                 <td>Technical Author</td>
222                                                 <td>London</td>
223                                                 <td>27</td>
224                                                 <td>$145,000</td>
225                                         </tr>
226                                         <tr>
227                                                 <td>Timothy Mooney</td>
228                                                 <td>Office Manager</td>
229                                                 <td>London</td>
230                                                 <td>37</td>
231                                                 <td>$136,200</td>
232                                         </tr>
233                                         <tr>
234                                                 <td>Bruno Nash</td>
235                                                 <td>Software Engineer</td>
236                                                 <td>London</td>
237                                                 <td>38</td>
238                                                 <td>$163,500</td>
239                                         </tr>
240                                         <tr>
241                                                 <td>Hermione Butler</td>
242                                                 <td>Regional Director</td>
243                                                 <td>London</td>
244                                                 <td>47</td>
245                                                 <td>$356,250</td>
246                                         </tr>
247                                         <tr>
248                                                 <td>Lael Greer</td>
249                                                 <td>Systems Administrator</td>
250                                                 <td>London</td>
251                                                 <td>21</td>
252                                                 <td>$103,500</td>
253                                         </tr>
254                                 </tbody>
255                         </table>
256
257                         <ul class="tabs">
258                                 <li class="active">Javascript</li>
259                                 <li>HTML</li>
260                                 <li>CSS</li>
261                                 <li>Ajax</li>
262                                 <li>Server-side script</li>
263                         </ul>
264
265                         <div class="tabs">
266                                 <div class="js">
267                                         <p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
268         var tables = $('table.display').DataTable( {
269                 displayLength: 5
270         } );
271
272         // When the column visibility changes on the firs table, also change it on
273         // the others
274         tables.table(0).on('column-visibility', function ( e, settings, colIdx, visibility ) {
275                 tables.tables(':gt(0)').column( colIdx ).visible( visibility );
276         } );
277
278         // Create ColVis on the first table only
279         var colvis = new $.fn.dataTable.ColVis( tables.table(0) );
280         $( colvis.button() ).insertAfter('div.info');
281 } );</code>
282
283                                         <p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
284
285                                         <ul>
286                                                 <li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
287                                                 <li><a href="../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
288                                                 <li><a href="../js/dataTables.colVis.js">../js/dataTables.colVis.js</a></li>
289                                         </ul>
290                                 </div>
291
292                                 <div class="table">
293                                         <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
294                                 </div>
295
296                                 <div class="css">
297                                         <div>
298                                                 <p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
299                                                 additional CSS used is shown below:</p><code class="multiline language-css"></code>
300                                         </div>
301
302                                         <p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
303
304                                         <ul>
305                                                 <li><a href="../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li>
306                                                 <li><a href="../css/dataTables.colVis.css">../css/dataTables.colVis.css</a></li>
307                                         </ul>
308                                 </div>
309
310                                 <div class="ajax">
311                                         <p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
312                                         loaded.</p>
313                                 </div>
314
315                                 <div class="php">
316                                         <p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
317                                         processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
318                                         documentation</a>.</p>
319                                 </div>
320                         </div>
321                 </section>
322         </div>
323
324         <section>
325                 <div class="footer">
326                         <div class="gradient"></div>
327
328                         <div class="liner">
329                                 <h2>Other examples</h2>
330
331                                 <div class="toc">
332                                         <div class="toc-group">
333                                                 <h3><a href="./index.html">Examples</a></h3>
334                                                 <ul class="toc active">
335                                                         <li><a href="./simple.html">Basic initialisation</a></li>
336                                                         <li><a href="./new_init.html">`new` initialisation</a></li>
337                                                         <li><a href="./text.html">Custom button text</a></li>
338                                                         <li><a href="./exclude_columns.html">Exclude columns from list</a></li>
339                                                         <li><a href="./title_callback.html">Column button callback</a></li>
340                                                         <li><a href="./button_order.html">Button ordering</a></li>
341                                                         <li><a href="./mouseover.html">Mouseover activation</a></li>
342                                                         <li><a href="./group_columns.html">Group columns</a></li>
343                                                         <li><a href="./two_tables.html">Two tables with individual controls</a></li>
344                                                         <li class="active"><a href="./two_tables_identical.html">Two tables with shared controls</a></li>
345                                                         <li><a href="./restore.html">Restore / show all</a></li>
346                                                         <li><a href="./jqueryui.html">jQuery UI styling</a></li>
347                                                 </ul>
348                                         </div>
349                                 </div>
350
351                                 <div class="epilogue">
352                                         <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
353                                         Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
354                                         which extend the capabilities of DataTables.</p>
355
356                                         <p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
357                                         DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
358                                 </div>
359                         </div>
360                 </div>
361         </section>
362 </body>
363 </html>