Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
875 lars 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>Select example - Internationalisation</title>
9
	<link rel="stylesheet" type="text/css" href="../../../../media/css/jquery.dataTables.css">
10
	<link rel="stylesheet" type="text/css" href="../../css/select.dataTables.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="//code.jquery.com/jquery-1.11.3.min.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.select.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
 
25
$(document).ready(function() {
26
	$('#example').DataTable( {
27
		select: true,
28
		language: {
29
			select: {
30
				rows: {
31
					_: "You have selected %d rows",
32
					0: "Click a row to select it",
33
					1: "Only 1 row selected"
34
				}
35
			}
36
		}
37
	} );
38
} );
39
 
40
 
41
 
42
	</script>
43
</head>
44
 
45
<body class="dt-example">
46
	<div class="container">
47
		<section>
48
			<h1>Select example <span>Internationalisation</span></h1>
49
 
50
			<div class="info">
51
				<p>The DataTables information element (<a href="//datatables.net/reference/option/info"><code class="option" title=
52
				"DataTables initialisation option">info</code></a>) shows the end user summary information about the tables state. Generally this is information about the table's
53
				paging state, but Select has the ability to augment that information with details about the items selected in the table.</p>
54
 
55
				<p>By default Select will show a count for the number of rows, columns and cells selected in the table (only if one or more items are selected). The text shown can
56
				be configured through the <a href="//datatables.net/reference/option/language.select.rows"><code class="option" title=
57
				"Select initialisation option">language.select.rows</code></a>, <a href="//datatables.net/reference/option/language.select.columns"><code class="option" title=
58
				"Select initialisation option">language.select.columns</code></a> and <a href="//datatables.net/reference/option/language.select.cells"><code class="option" title=
59
				"Select initialisation option">language.select.cells</code></a> options allowing it to be fully internationalised or simply customised to your needs.</p>
60
 
61
				<p>The value for each option can be given as a simple string, but more usefully as an object with parameters for the strings to be used the number of items
62
				selected. This example uses a default string of <code class="string" title="String">Selected %d rows</code> (<code>%d</code> is replaced by the number) for all but
63
 
64
 
65
				<p>The display of selected item summary information can be disabled using the <a href="//datatables.net/reference/option/select.info"><code class="option" title=
66
				"Select initialisation option">select.info</code></a> option.</p>
67
			</div>
68
 
69
			<table id="example" class="display" cellspacing="0" width="100%">
70
				<thead>
71
					<tr>
72
						<th>Name</th>
73
						<th>Position</th>
74
						<th>Office</th>
75
						<th>Age</th>
76
						<th>Start date</th>
77
						<th>Salary</th>
78
					</tr>
79
				</thead>
80
 
81
				<tfoot>
82
					<tr>
83
						<th>Name</th>
84
						<th>Position</th>
85
						<th>Office</th>
86
						<th>Age</th>
87
						<th>Start date</th>
88
						<th>Salary</th>
89
					</tr>
90
				</tfoot>
91
 
92
				<tbody>
93
					<tr>
94
						<td>Tiger Nixon</td>
95
						<td>System Architect</td>
96
						<td>Edinburgh</td>
97
						<td>61</td>
98
						<td>2011/04/25</td>
99
						<td>$320,800</td>
100
					</tr>
101
					<tr>
102
						<td>Garrett Winters</td>
103
						<td>Accountant</td>
104
						<td>Tokyo</td>
105
						<td>63</td>
106
						<td>2011/07/25</td>
107
						<td>$170,750</td>
108
					</tr>
109
					<tr>
110
						<td>Ashton Cox</td>
111
						<td>Junior Technical Author</td>
112
						<td>San Francisco</td>
113
						<td>66</td>
114
						<td>2009/01/12</td>
115
						<td>$86,000</td>
116
					</tr>
117
					<tr>
118
						<td>Cedric Kelly</td>
119
						<td>Senior Javascript Developer</td>
120
						<td>Edinburgh</td>
121
						<td>22</td>
122
						<td>2012/03/29</td>
123
						<td>$433,060</td>
124
					</tr>
125
					<tr>
126
						<td>Airi Satou</td>
127
						<td>Accountant</td>
128
						<td>Tokyo</td>
129
						<td>33</td>
130
						<td>2008/11/28</td>
131
						<td>$162,700</td>
132
					</tr>
133
					<tr>
134
						<td>Brielle Williamson</td>
135
						<td>Integration Specialist</td>
136
						<td>New York</td>
137
						<td>61</td>
138
						<td>2012/12/02</td>
139
						<td>$372,000</td>
140
					</tr>
141
					<tr>
142
						<td>Herrod Chandler</td>
143
						<td>Sales Assistant</td>
144
						<td>San Francisco</td>
145
						<td>59</td>
146
						<td>2012/08/06</td>
147
						<td>$137,500</td>
148
					</tr>
149
					<tr>
150
						<td>Rhona Davidson</td>
151
						<td>Integration Specialist</td>
152
						<td>Tokyo</td>
153
						<td>55</td>
154
						<td>2010/10/14</td>
155
						<td>$327,900</td>
156
					</tr>
157
					<tr>
158
						<td>Colleen Hurst</td>
159
						<td>Javascript Developer</td>
160
						<td>San Francisco</td>
161
						<td>39</td>
162
						<td>2009/09/15</td>
163
						<td>$205,500</td>
164
					</tr>
165
					<tr>
166
						<td>Sonya Frost</td>
167
						<td>Software Engineer</td>
168
						<td>Edinburgh</td>
169
						<td>23</td>
170
						<td>2008/12/13</td>
171
						<td>$103,600</td>
172
					</tr>
173
					<tr>
174
						<td>Jena Gaines</td>
175
						<td>Office Manager</td>
176
						<td>London</td>
177
						<td>30</td>
178
						<td>2008/12/19</td>
179
						<td>$90,560</td>
180
					</tr>
181
					<tr>
182
						<td>Quinn Flynn</td>
183
						<td>Support Lead</td>
184
						<td>Edinburgh</td>
185
						<td>22</td>
186
						<td>2013/03/03</td>
187
						<td>$342,000</td>
188
					</tr>
189
					<tr>
190
						<td>Charde Marshall</td>
191
						<td>Regional Director</td>
192
						<td>San Francisco</td>
193
						<td>36</td>
194
						<td>2008/10/16</td>
195
						<td>$470,600</td>
196
					</tr>
197
					<tr>
198
						<td>Haley Kennedy</td>
199
						<td>Senior Marketing Designer</td>
200
						<td>London</td>
201
						<td>43</td>
202
						<td>2012/12/18</td>
203
						<td>$313,500</td>
204
					</tr>
205
					<tr>
206
						<td>Tatyana Fitzpatrick</td>
207
						<td>Regional Director</td>
208
						<td>London</td>
209
						<td>19</td>
210
						<td>2010/03/17</td>
211
						<td>$385,750</td>
212
					</tr>
213
					<tr>
214
						<td>Michael Silva</td>
215
						<td>Marketing Designer</td>
216
						<td>London</td>
217
						<td>66</td>
218
						<td>2012/11/27</td>
219
						<td>$198,500</td>
220
					</tr>
221
					<tr>
222
						<td>Paul Byrd</td>
223
						<td>Chief Financial Officer (CFO)</td>
224
						<td>New York</td>
225
						<td>64</td>
226
						<td>2010/06/09</td>
227
						<td>$725,000</td>
228
					</tr>
229
					<tr>
230
						<td>Gloria Little</td>
231
						<td>Systems Administrator</td>
232
						<td>New York</td>
233
						<td>59</td>
234
						<td>2009/04/10</td>
235
						<td>$237,500</td>
236
					</tr>
237
					<tr>
238
						<td>Bradley Greer</td>
239
						<td>Software Engineer</td>
240
						<td>London</td>
241
						<td>41</td>
242
						<td>2012/10/13</td>
243
						<td>$132,000</td>
244
					</tr>
245
					<tr>
246
						<td>Dai Rios</td>
247
						<td>Personnel Lead</td>
248
						<td>Edinburgh</td>
249
						<td>35</td>
250
						<td>2012/09/26</td>
251
						<td>$217,500</td>
252
					</tr>
253
					<tr>
254
						<td>Jenette Caldwell</td>
255
						<td>Development Lead</td>
256
						<td>New York</td>
257
						<td>30</td>
258
						<td>2011/09/03</td>
259
						<td>$345,000</td>
260
					</tr>
261
					<tr>
262
						<td>Yuri Berry</td>
263
						<td>Chief Marketing Officer (CMO)</td>
264
						<td>New York</td>
265
						<td>40</td>
266
						<td>2009/06/25</td>
267
						<td>$675,000</td>
268
					</tr>
269
					<tr>
270
						<td>Caesar Vance</td>
271
						<td>Pre-Sales Support</td>
272
						<td>New York</td>
273
						<td>21</td>
274
						<td>2011/12/12</td>
275
						<td>$106,450</td>
276
					</tr>
277
					<tr>
278
						<td>Doris Wilder</td>
279
						<td>Sales Assistant</td>
280
						<td>Sidney</td>
281
						<td>23</td>
282
						<td>2010/09/20</td>
283
						<td>$85,600</td>
284
					</tr>
285
					<tr>
286
						<td>Angelica Ramos</td>
287
						<td>Chief Executive Officer (CEO)</td>
288
						<td>London</td>
289
						<td>47</td>
290
						<td>2009/10/09</td>
291
						<td>$1,200,000</td>
292
					</tr>
293
					<tr>
294
						<td>Gavin Joyce</td>
295
						<td>Developer</td>
296
						<td>Edinburgh</td>
297
						<td>42</td>
298
						<td>2010/12/22</td>
299
						<td>$92,575</td>
300
					</tr>
301
					<tr>
302
						<td>Jennifer Chang</td>
303
						<td>Regional Director</td>
304
						<td>Singapore</td>
305
						<td>28</td>
306
						<td>2010/11/14</td>
307
						<td>$357,650</td>
308
					</tr>
309
					<tr>
310
						<td>Brenden Wagner</td>
311
						<td>Software Engineer</td>
312
						<td>San Francisco</td>
313
						<td>28</td>
314
						<td>2011/06/07</td>
315
						<td>$206,850</td>
316
					</tr>
317
					<tr>
318
						<td>Fiona Green</td>
319
						<td>Chief Operating Officer (COO)</td>
320
						<td>San Francisco</td>
321
						<td>48</td>
322
						<td>2010/03/11</td>
323
						<td>$850,000</td>
324
					</tr>
325
					<tr>
326
						<td>Shou Itou</td>
327
						<td>Regional Marketing</td>
328
						<td>Tokyo</td>
329
						<td>20</td>
330
						<td>2011/08/14</td>
331
						<td>$163,000</td>
332
					</tr>
333
					<tr>
334
						<td>Michelle House</td>
335
						<td>Integration Specialist</td>
336
						<td>Sidney</td>
337
						<td>37</td>
338
						<td>2011/06/02</td>
339
						<td>$95,400</td>
340
					</tr>
341
					<tr>
342
						<td>Suki Burks</td>
343
						<td>Developer</td>
344
						<td>London</td>
345
						<td>53</td>
346
						<td>2009/10/22</td>
347
						<td>$114,500</td>
348
					</tr>
349
					<tr>
350
						<td>Prescott Bartlett</td>
351
						<td>Technical Author</td>
352
						<td>London</td>
353
						<td>27</td>
354
						<td>2011/05/07</td>
355
						<td>$145,000</td>
356
					</tr>
357
					<tr>
358
						<td>Gavin Cortez</td>
359
						<td>Team Leader</td>
360
						<td>San Francisco</td>
361
						<td>22</td>
362
						<td>2008/10/26</td>
363
						<td>$235,500</td>
364
					</tr>
365
					<tr>
366
						<td>Martena Mccray</td>
367
						<td>Post-Sales support</td>
368
						<td>Edinburgh</td>
369
						<td>46</td>
370
						<td>2011/03/09</td>
371
						<td>$324,050</td>
372
					</tr>
373
					<tr>
374
						<td>Unity Butler</td>
375
						<td>Marketing Designer</td>
376
						<td>San Francisco</td>
377
						<td>47</td>
378
						<td>2009/12/09</td>
379
						<td>$85,675</td>
380
					</tr>
381
					<tr>
382
						<td>Howard Hatfield</td>
383
						<td>Office Manager</td>
384
						<td>San Francisco</td>
385
						<td>51</td>
386
						<td>2008/12/16</td>
387
						<td>$164,500</td>
388
					</tr>
389
					<tr>
390
						<td>Hope Fuentes</td>
391
						<td>Secretary</td>
392
						<td>San Francisco</td>
393
						<td>41</td>
394
						<td>2010/02/12</td>
395
						<td>$109,850</td>
396
					</tr>
397
					<tr>
398
						<td>Vivian Harrell</td>
399
						<td>Financial Controller</td>
400
						<td>San Francisco</td>
401
						<td>62</td>
402
						<td>2009/02/14</td>
403
						<td>$452,500</td>
404
					</tr>
405
					<tr>
406
						<td>Timothy Mooney</td>
407
						<td>Office Manager</td>
408
						<td>London</td>
409
						<td>37</td>
410
						<td>2008/12/11</td>
411
						<td>$136,200</td>
412
					</tr>
413
					<tr>
414
						<td>Jackson Bradshaw</td>
415
						<td>Director</td>
416
						<td>New York</td>
417
						<td>65</td>
418
						<td>2008/09/26</td>
419
						<td>$645,750</td>
420
					</tr>
421
					<tr>
422
						<td>Olivia Liang</td>
423
						<td>Support Engineer</td>
424
						<td>Singapore</td>
425
						<td>64</td>
426
						<td>2011/02/03</td>
427
						<td>$234,500</td>
428
					</tr>
429
					<tr>
430
						<td>Bruno Nash</td>
431
						<td>Software Engineer</td>
432
						<td>London</td>
433
						<td>38</td>
434
						<td>2011/05/03</td>
435
						<td>$163,500</td>
436
					</tr>
437
					<tr>
438
						<td>Sakura Yamamoto</td>
439
						<td>Support Engineer</td>
440
						<td>Tokyo</td>
441
						<td>37</td>
442
						<td>2009/08/19</td>
443
						<td>$139,575</td>
444
					</tr>
445
					<tr>
446
						<td>Thor Walton</td>
447
						<td>Developer</td>
448
						<td>New York</td>
449
						<td>61</td>
450
						<td>2013/08/11</td>
451
						<td>$98,540</td>
452
					</tr>
453
					<tr>
454
						<td>Finn Camacho</td>
455
						<td>Support Engineer</td>
456
						<td>San Francisco</td>
457
						<td>47</td>
458
						<td>2009/07/07</td>
459
						<td>$87,500</td>
460
					</tr>
461
					<tr>
462
						<td>Serge Baldwin</td>
463
						<td>Data Coordinator</td>
464
						<td>Singapore</td>
465
						<td>64</td>
466
						<td>2012/04/09</td>
467
						<td>$138,575</td>
468
					</tr>
469
					<tr>
470
						<td>Zenaida Frank</td>
471
						<td>Software Engineer</td>
472
						<td>New York</td>
473
						<td>63</td>
474
						<td>2010/01/04</td>
475
						<td>$125,250</td>
476
					</tr>
477
					<tr>
478
						<td>Zorita Serrano</td>
479
						<td>Software Engineer</td>
480
						<td>San Francisco</td>
481
						<td>56</td>
482
						<td>2012/06/01</td>
483
						<td>$115,000</td>
484
					</tr>
485
					<tr>
486
						<td>Jennifer Acosta</td>
487
						<td>Junior Javascript Developer</td>
488
						<td>Edinburgh</td>
489
						<td>43</td>
490
						<td>2013/02/01</td>
491
						<td>$75,650</td>
492
					</tr>
493
					<tr>
494
						<td>Cara Stevens</td>
495
						<td>Sales Assistant</td>
496
						<td>New York</td>
497
						<td>46</td>
498
						<td>2011/12/06</td>
499
						<td>$145,600</td>
500
					</tr>
501
					<tr>
502
						<td>Hermione Butler</td>
503
						<td>Regional Director</td>
504
						<td>London</td>
505
						<td>47</td>
506
						<td>2011/03/21</td>
507
						<td>$356,250</td>
508
					</tr>
509
					<tr>
510
						<td>Lael Greer</td>
511
						<td>Systems Administrator</td>
512
						<td>London</td>
513
						<td>21</td>
514
						<td>2009/02/27</td>
515
						<td>$103,500</td>
516
					</tr>
517
					<tr>
518
						<td>Jonas Alexander</td>
519
						<td>Developer</td>
520
						<td>San Francisco</td>
521
						<td>30</td>
522
						<td>2010/07/14</td>
523
						<td>$86,500</td>
524
					</tr>
525
					<tr>
526
						<td>Shad Decker</td>
527
						<td>Regional Director</td>
528
						<td>Edinburgh</td>
529
						<td>51</td>
530
						<td>2008/11/13</td>
531
						<td>$183,000</td>
532
					</tr>
533
					<tr>
534
						<td>Michael Bruce</td>
535
						<td>Javascript Developer</td>
536
						<td>Singapore</td>
537
						<td>29</td>
538
						<td>2011/06/27</td>
539
						<td>$183,000</td>
540
					</tr>
541
					<tr>
542
						<td>Donna Snider</td>
543
						<td>Customer Support</td>
544
						<td>New York</td>
545
						<td>27</td>
546
						<td>2011/01/25</td>
547
						<td>$112,000</td>
548
					</tr>
549
				</tbody>
550
			</table>
551
 
552
			<ul class="tabs">
553
				<li class="active">Javascript</li>
554
				<li>HTML</li>
555
				<li>CSS</li>
556
				<li>Ajax</li>
557
				<li>Server-side script</li>
558
			</ul>
559
 
560
			<div class="tabs">
561
				<div class="js">
562
					<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
563
	$('#example').DataTable( {
564
		select: true,
565
		language: {
566
			select: {
567
				rows: {
568
					_: &quot;You have selected %d rows&quot;,
569
					0: &quot;Click a row to select it&quot;,
570
					1: &quot;Only 1 row selected&quot;
571
				}
572
			}
573
		}
574
	} );
575
} );</code>
576
 
577
					<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
578
 
579
					<ul>
580
						<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.js</a></li>
581
						<li><a href="../../../../media/js/jquery.dataTables.js">../../../../media/js/jquery.dataTables.js</a></li>
582
						<li><a href="../../js/dataTables.select.js">../../js/dataTables.select.js</a></li>
583
					</ul>
584
				</div>
585
 
586
				<div class="table">
587
					<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
588
				</div>
589
 
590
				<div class="css">
591
					<div>
592
						<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
593
						additional CSS used is shown below:</p><code class="multiline language-css"></code>
594
					</div>
595
 
596
					<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
597
 
598
					<ul>
599
						<li><a href="../../../../media/css/jquery.dataTables.css">../../../../media/css/jquery.dataTables.css</a></li>
600
						<li><a href="../../css/select.dataTables.css">../../css/select.dataTables.css</a></li>
601
					</ul>
602
				</div>
603
 
604
				<div class="ajax">
605
					<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
606
					loaded.</p>
607
				</div>
608
 
609
				<div class="php">
610
					<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
611
					processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
612
					documentation</a>.</p>
613
				</div>
614
			</div>
615
		</section>
616
	</div>
617
 
618
	<section>
619
		<div class="footer">
620
			<div class="gradient"></div>
621
 
622
			<div class="liner">
623
				<h2>Other examples</h2>
624
 
625
				<div class="toc">
626
					<div class="toc-group">
627
						<h3><a href="./index.html">Initialisation</a></h3>
628
						<ul class="toc active">
629
							<li><a href="./simple.html">Simple initialisation</a></li>
630
							<li><a href="./single.html">Single item selection</a></li>
631
							<li><a href="./multi.html">Multi item selection</a></li>
632
							<li><a href="./cells.html">Cell selection</a></li>
633
							<li><a href="./checkbox.html">Checkbox selection</a></li>
634
							<li class="active"><a href="./i18n.html">Internationalisation</a></li>
635
							<li><a href="./blurable.html">Blur selection</a></li>
636
							<li><a href="./deferRender.html">Defer rendering</a></li>
637
							<li><a href="./buttons.html">Buttons</a></li>
638
							<li><a href="./reload.html">Retain selection on reload</a></li>
639
						</ul>
640
					</div>
641
 
642
					<div class="toc-group">
643
						<h3><a href="../styling/index.html">Styling</a></h3>
644
						<ul class="toc">
645
							<li><a href="../styling/bootstrap.html">Bootstrap styling</a></li>
646
							<li><a href="../styling/foundation.html">Foundation styling</a></li>
647
							<li><a href="../styling/jqueryui.html">jQuery UI styling</a></li>
648
						</ul>
649
					</div>
650
 
651
					<div class="toc-group">
652
						<h3><a href="../api/index.html">API</a></h3>
653
						<ul class="toc">
654
							<li><a href="../api/events.html">Events</a></li>
655
							<li><a href="../api/get.html">Get selected items</a></li>
656
							<li><a href="../api/select.html">Select items</a></li>
657
						</ul>
658
					</div>
659
				</div>
660
 
661
				<div class="epilogue">
662
					<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
663
					Additionally, there are a wide range of <a href="http://www.datatables.net/extensions">extensions</a> and <a href=
664
					"http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of DataTables.</p>
665
 
666
					<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
667
					DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
668
				</div>
669
			</div>
670
		</div>
671
	</section>
672
</body>
673
</html>