Subversion-Projekte lars-tiefland.faltradxxs.de

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
2 lars 1
 
2
 
3
 //
4
 // Colour customisation
5
 //
6
 
7
// Border between the header (and footer) and the table body
8
$table-header-border: 1px solid #111;
9
 
10
// Border of rows / cells
11
$table-body-border: 1px solid #ddd;
12
 
13
// Row background colour (hover, striping etc are all based on this colour and
14
// calculated automatically)
15
$table-row-background: #ffffff;
16
 
17
// Row colour, when selected (tr.selected)
18
$table-row-selected: #B0BED9;
19
 
20
// Text colour of the interaction control elements (info, filter, paging etc)
21
$table-control-color: #333;
22
 
23
// Highlight colour of the paging button for the current page
24
$table-paging-button-active: #dcdcdc;
25
 
26
// Hover colour of paging buttons on mouse over
27
$table-paging-button-hover: #111;
28
 
29
 
30
 
31
//
32
// Functions / mixins
33
//
34
@function tint( $color, $percent ) {
35
  @return mix(white, $color, $percent);
36
}
37
 
38
@function shade( $color, $percent ) {
39
  @return mix(black, $color, $percent);
40
}
41
 
42
@mixin gradient( $from, $to ) {
43
  background-color: $from;
44
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$from), color-stop(100%,$to)); /* Chrome,Safari4+ */
45
  background: -webkit-linear-gradient(top,     $from 0%, $to 100%); /* Chrome10+,Safari5.1+ */
46
  background:    -moz-linear-gradient(top,     $from 0%, $to 100%); /* FF3.6+ */
47
  background:     -ms-linear-gradient(top,     $from 0%, $to 100%); /* IE10+ */
48
  background:      -o-linear-gradient(top,     $from 0%, $to 100%); /* Opera 11.10+ */
49
  background:         linear-gradient(to bottom, $from 0%, $to 100%); /* W3C */
50
}
51
 
52
 
53
/*
54
 * Table styles
55
 */
56
table.dataTable {
57
  width: 100%;
58
  margin: 0 auto;
59
  clear: both;
60
  border-collapse: separate;
61
  border-spacing: 0;
62
 
63
  /*
64
   * Header and footer styles
65
   */
66
  thead,
67
  tfoot {
68
    th,
69
    td {
70
      padding: 4px 10px;
71
    }
72
 
73
    th {
74
      font-weight: bold;
75
    }
76
  }
77
 
78
  thead th,
79
  thead td {
80
    &:active {
81
      outline: none;
82
    }
83
  }
84
 
85
  // Sorting
86
  thead {
87
    .sorting_asc,
88
    .sorting_desc,
89
    .sorting {
90
      cursor: pointer;
91
      *cursor: hand;
92
    }
93
 
94
    th div.DataTables_sort_wrapper {
95
      position: relative;
96
      padding-right: 10px;
97
 
98
      span {
99
        position: absolute;
100
        top: 50%;
101
        margin-top: -8px;
102
        right: -5px;
103
      }
104
    }
105
 
106
    th.ui-state-default {
107
      border-right-width: 0;
108
 
109
      &:last-child {
110
        border-right-width: 1px;
111
      }
112
    }
113
  }
114
 
115
 
116
  /*
117
   * Body styles
118
   */
119
  tbody {
120
    tr {
121
      background-color: $table-row-background;
122
 
123
      &.selected {
124
        background-color: $table-row-selected;
125
      }
126
    }
127
 
128
    th,
129
    td {
130
      padding: 8px 10px;
131
    }
132
  }
133
 
134
  th.center,
135
  td.center,
136
  td.dataTables_empty {
137
    text-align: center;
138
  }
139
 
140
  th.right,
141
  td.right {
142
    text-align: right;
143
  }
144
 
145
 
146
  // Stripe classes - add "row-border" class to the table to activate
147
  &.row-border tbody,
148
  &.display tbody {
149
    th, td {
150
      border-top: $table-body-border;
151
    }
152
 
153
    tr:first-child th,
154
    tr:first-child td {
155
      border-top: none;
156
    }
157
  }
158
 
159
 
160
  // Stripe classes - add "cell-border" class to the table to activate
161
  &.cell-border tbody {
162
    th, td {
163
      border-top: $table-body-border;
164
      border-right: $table-body-border;
165
    }
166
 
167
    tr th:first-child,
168
    tr td:first-child {
169
      border-left: $table-body-border;
170
    }
171
 
172
    tr:first-child th,
173
    tr:first-child td {
174
      border-top: none;
175
    }
176
  }
177
 
178
 
179
  // Stripe classes - add "stripe" class to the table to activate
180
  &.stripe tbody,
181
  &.display tbody {
182
    tr.odd {
183
      background-color: shade($table-row-background, 2.35%); // shade by f9
184
 
185
      &.selected {
186
        background-color: shade($table-row-selected, 2.35%);
187
      }
188
    }
189
  }
190
 
191
 
192
  // Hover classes - add "hover" class to the table to activate
193
  &.hover tbody,
194
  &.display tbody {
195
    tr:hover,
196
    tr.odd:hover,
197
    tr.even:hover {
198
      background-color: shade($table-row-background, 3.6%); // shade by f5
199
 
200
      &.selected {
201
        background-color: shade($table-row-selected, 3.6%);
202
      }
203
    }
204
  }
205
 
206
 
207
  // Sort column highlighting - add "hover" class to the table to activate
208
  &.order-column,
209
  &.display {
210
    tbody {
211
      tr>.sorting_1,
212
      tr>.sorting_2,
213
      tr>.sorting_3 {
214
        background-color: shade($table-row-background, 2%); // shade by fa
215
      }
216
 
217
      tr.selected>.sorting_1,
218
      tr.selected>.sorting_2,
219
      tr.selected>.sorting_3 {
220
        background-color: shade($table-row-selected, 2%);
221
      }
222
    }
223
  }
224
 
225
  &.display tbody,
226
  &.order-column.stripe tbody {
227
    tr.odd {
228
      >.sorting_1 { background-color: shade($table-row-background, 5.4%); } // shade by f1
229
      >.sorting_2 { background-color: shade($table-row-background, 4.7%); } // shade by f3
230
      >.sorting_3 { background-color: shade($table-row-background, 3.9%); } // shade by f5
231
 
232
      &.selected {
233
        >.sorting_1 { background-color: shade($table-row-selected, 5.4%); }
234
        >.sorting_2 { background-color: shade($table-row-selected, 4.7%); }
235
        >.sorting_3 { background-color: shade($table-row-selected, 3.9%); }
236
      }
237
    }
238
 
239
    tr.even {
240
      >.sorting_1 { background-color: shade($table-row-background, 2%); } // shade by fa
241
      >.sorting_2 { background-color: shade($table-row-background, 1.2%); } // shade by fc
242
      >.sorting_3 { background-color: shade($table-row-background, 0.4%); } // shade by fe
243
 
244
      &.selected {
245
        >.sorting_1 { background-color: shade($table-row-selected, 2%); }
246
        >.sorting_2 { background-color: shade($table-row-selected, 1.2%); }
247
        >.sorting_3 { background-color: shade($table-row-selected, 0.4%); }
248
      }
249
    }
250
  }
251
 
252
  &.display tbody,
253
  &.order-column.hover tbody {
254
    tr:hover,
255
    tr.odd:hover,
256
    tr.even:hover {
257
      >.sorting_1 { background-color: shade($table-row-background, 8.2%); } // shade by ea
258
      >.sorting_2 { background-color: shade($table-row-background, 7.5%); } // shade by ec
259
      >.sorting_3 { background-color: shade($table-row-background, 6.3%); } // shade by ef
260
 
261
      &.selected {
262
        >.sorting_1 { background-color: shade($table-row-selected, 8.2%); }
263
        >.sorting_2 { background-color: shade($table-row-selected, 7.5%); }
264
        >.sorting_3 { background-color: shade($table-row-selected, 6.3%); }
265
      }
266
    }
267
  }
268
 
269
  &.nowrap {
270
    th, td {
271
      white-space: nowrap;
272
    }
273
  }
274
 
275
  &.compact {
276
    thead th,
277
    thead td {
278
      padding: 5px 9px;
279
    }
280
 
281
    tfoot th,
282
    tfoot td {
283
      padding: 5px 9px 3px 9px;
284
    }
285
 
286
    tbody th,
287
    tbody td {
288
      padding: 4px 5px;
289
    }
290
  }
291
 
292
 
293
  // Typography
294
  th.dt-left,
295
  td.dt-left {
296
    text-align: left;
297
  }
298
 
299
  th.dt-center,
300
  td.dt-center,
301
  td.dataTables_empty {
302
    text-align: center;
303
  }
304
 
305
  th.dt-right,
306
  td.dt-right {
307
    text-align: right;
308
  }
309
 
310
  th.dt-justify,
311
  td.dt-justify {
312
    text-align: justify;
313
  }
314
 
315
  th.dt-nowrap,
316
  td.dt-nowrap {
317
    white-space: nowrap;
318
  }
319
 
320
  thead,
321
  tfoot {
322
    th.dt-head-left,
323
    td.dt-head-left {
324
      text-align: left;
325
    }
326
 
327
    th.dt-head-center,
328
    td.dt-head-center{
329
      text-align: center;
330
    }
331
 
332
    th.dt-head-right,
333
    td.dt-head-right {
334
      text-align: right;
335
    }
336
 
337
    th.dt-head-justify,
338
    td.dt-head-justify {
339
      text-align: justify;
340
    }
341
 
342
    th.dt-head-nowrap,
343
    td.dt-head-nowrap {
344
      white-space: nowrap;
345
    }
346
  }
347
 
348
  tbody {
349
    th.dt-body-left,
350
    td.dt-body-left {
351
      text-align: left;
352
    }
353
 
354
    th.dt-body-center,
355
    td.dt-body-center {
356
      text-align: center;
357
    }
358
 
359
    th.dt-body-right,
360
    td.dt-body-right {
361
      text-align: right;
362
    }
363
 
364
    th.dt-body-justify,
365
    td.dt-body-justify {
366
      text-align: justify;
367
    }
368
 
369
    th.dt-body-nowrap,
370
    td.dt-body-nowrap {
371
      white-space: nowrap;
372
    }
373
  }
374
}
375
 
376
// Its not uncommon to use * {border-box} now, but it messes up the column width
377
// calculations, so use content-box for the table and cells
378
table.dataTable,
379
table.dataTable th,
380
table.dataTable td {
381
  -webkit-box-sizing: content-box;
382
     -moz-box-sizing: content-box;
383
          box-sizing: content-box;
384
}
385
 
386
 
387
 
388
/*
389
 * Control feature layout
390
 */
391
.dataTables_wrapper {
392
  position: relative;
393
  clear: both;
394
  *zoom: 1;
395
 
396
  // Page length options
397
  .dataTables_length {
398
    float: left;
399
  }
400
 
401
  // Filtering input
402
  .dataTables_filter {
403
    float: right;
404
    text-align: right;
405
 
406
    input {
407
      margin-left: 0.5em;
408
    }
409
  }
410
 
411
  // Table info
412
  .dataTables_info {
413
    clear: both;
414
    float: left;
415
    padding-top: 0.55em;
416
  }
417
 
418
  // Paging
419
  .dataTables_paginate {
420
    float: right;
421
    text-align: right;
422
 
423
    .fg-button {
424
      box-sizing: border-box;
425
      display: inline-block;
426
      min-width: 1.5em;
427
      padding: 0.5em;
428
      margin-left: 2px;
429
      text-align: center;
430
      text-decoration: none !important;
431
      cursor: pointer;
432
      *cursor: hand;
433
 
434
      color: $table-control-color !important;
435
      border: 1px solid transparent;
436
 
437
      &:active {
438
        outline: none;
439
      }
440
    }
441
 
442
    .fg-button:first-child {
443
      border-top-left-radius: 3px;
444
      border-bottom-left-radius: 3px;
445
    }
446
 
447
    .fg-button:last-child {
448
      border-top-right-radius: 3px;
449
      border-bottom-right-radius: 3px;
450
    }
451
  }
452
 
453
  // Processing
454
  .dataTables_processing {
455
    position: absolute;
456
    top: 50%;
457
    left: 50%;
458
    width: 100%;
459
    height: 40px;
460
    margin-left: -50%;
461
    margin-top: -25px;
462
    padding-top: 20px;
463
 
464
    text-align: center;
465
    font-size: 1.2em;
466
 
467
    background-color: white;
468
    background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba($table-row-background, 0)), color-stop(25%,rgba($table-row-background, 0.9)), color-stop(75%,rgba($table-row-background, 0.9)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */
469
    background: -webkit-linear-gradient(left,     rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* Chrome10+,Safari5.1+ */
470
    background:    -moz-linear-gradient(left,     rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* FF3.6+ */
471
    background:     -ms-linear-gradient(left,     rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* IE10+ */
472
    background:      -o-linear-gradient(left,     rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* Opera 11.10+ */
473
    background:         linear-gradient(to right, rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* W3C */
474
  }
475
 
476
  .dataTables_length,
477
  .dataTables_filter,
478
  .dataTables_info,
479
  .dataTables_processing,
480
  .dataTables_paginate {
481
    color: $table-control-color;
482
  }
483
 
484
  // Scrolling
485
  .dataTables_scroll {
486
    clear: both;
487
  }
488
 
489
  .dataTables_scrollBody {
490
    *margin-top: -1px;
491
    -webkit-overflow-scrolling: touch;
492
  }
493
 
494
 
495
  .ui-widget-header {
496
    font-weight: normal;
497
  }
498
 
499
  .ui-toolbar {
500
    padding: 8px;
501
  }
502
 
503
  // Self clear the wrapper
504
  &:after {
505
    visibility: hidden;
506
    display: block;
507
    content: "";
508
    clear: both;
509
    height: 0;
510
  }
511
  zoom: 1; // Poor old IE
512
}
513
 
514
 
515
// Collapse the two column display of the control elements when the screen is
516
// small
517
@media screen and (max-width: 767px) {
518
  .dataTables_wrapper {
519
    .dataTables_length,
520
    .dataTables_filter,
521
    .dataTables_info,
522
    .dataTables_paginate {
523
      float: none;
524
      text-align: center;
525
    }
526
 
527
    .dataTables_filter,
528
    .dataTables_paginate {
529
      margin-top: 0.5em;
530
    }
531
  }
532
}
533
 
534
 
535
 
536
/*
537
 * TableTools styling for jQuery UI
538
 */
539
div.DTTT_container {
540
  position: relative;
541
  float: left;
542
}
543
 
544
.DTTT_button {
545
  position: relative;
546
  float: left;
547
  margin-right: 3px;
548
  padding: 3px 10px;
549
  border: 1px solid #d0d0d0;
550
  background-color: #fff;
551
  color: #333;
552
  cursor: pointer;
553
}
554
 
555
.DTTT_button::-moz-focus-inner {
556
  border: none !important;
557
  padding: 0;
558
}
559
 
560
.DTTT_disabled {
561
  color: #999;
562
}
563
 
564
table.DTTT_selectable tbody tr {
565
  cursor: pointer;
566
}
567
 
568
div.DTTT_collection {
569
  width: 150px;
570
  background-color: #f3f3f3;
571
  overflow: hidden;
572
  z-index: 2002;
573
 
574
  box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
575
  -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
576
  -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
577
 
578
  button.DTTT_button,
579
  div.DTTT_button,
580
  a.DTTT_button {
581
    float: none;
582
    width: 100%;
583
    margin-bottom: -0.1em;
584
  }
585
}
586
 
587
div.DTTT_collection_background {
588
  background: black;
589
  z-index: 2001;
590
}
591
 
592
.DTTT_print_info {
593
  position: absolute;
594
  top: 50%;
595
  left: 50%;
596
  width: 400px;
597
  height: 150px;
598
  margin-left: -200px;
599
  margin-top: -75px;
600
  text-align: center;
601
  background-color: #3f3f3f;
602
  color: white;
603
  padding: 10px 30px;
604
 
605
  opacity: 0.9;
606
 
607
  border-radius: 5px;
608
  -moz-border-radius: 5px;
609
  -webkit-border-radius: 5px;
610
 
611
  box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
612
  -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
613
  -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
614
 
615
  .DTTT_print_info {
616
    h6 {
617
      font-weight: normal;
618
      font-size: 28px;
619
      line-height: 28px;
620
      margin: 1em;
621
    }
622
 
623
    p {
624
      font-size: 14px;
625
      line-height: 20px;
626
    }
627
  }
628
}
629