Skip to content

Commit 507d6cb

Browse files
committed
Add font awesome dependency, add LESS file
1 parent b686f1b commit 507d6cb

File tree

3 files changed

+305
-3
lines changed

3 files changed

+305
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ Or you can copy and include JS and CSS files directly to your HTML page:
1919

2020
Code dependencies:
2121

22-
* Bootstrap 3.* (include Font-Awesome)
22+
* Bootstrap 3.*
23+
* Font Awesome 4.*
2324
* jQuery DataTables plugin 1.10.*
2425

2526
Fork changes

bower.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
22
"name": "datatables-bootstrap3-plugin",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"main": [
55
"media/css/datatables-bootstrap3.css",
6+
"media/css/datatables-bootstrap3.less",
67
"media/js/datatables-bootstrap3.js"
78
],
89
"dependencies": {
910
"bootstrap": "3.3.x",
11+
"components-font-awesome": "4.2.x",
1012
"datatables": "1.10.x"
1113
},
1214
"description": "jQuery DataTables plugin and Bootstrap 3 integration",
@@ -19,6 +21,7 @@
1921
],
2022
"ignore": [
2123
".gitignore",
22-
"example"
24+
"example",
25+
"README.md"
2326
]
2427
}

media/css/datatables-bootstrap3.less

Lines changed: 298 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,298 @@
1+
div.dataTables_length {
2+
label {
3+
font-weight: normal;
4+
text-align: left;
5+
white-space: nowrap;
6+
}
7+
select {
8+
width: 75px;
9+
display: inline-block;
10+
}
11+
}
12+
div.dataTables_filter {
13+
text-align: right;
14+
label {
15+
font-weight: normal;
16+
white-space: nowrap;
17+
text-align: left;
18+
}
19+
input {
20+
margin-left: 0.5em;
21+
display: inline-block;
22+
}
23+
}
24+
div.dataTables_info {
25+
padding-top: 8px;
26+
white-space: nowrap;
27+
}
28+
div.dataTables_paginate {
29+
margin: 0;
30+
white-space: nowrap;
31+
text-align: right;
32+
ul.pagination {
33+
margin: 2px 0;
34+
white-space: nowrap;
35+
}
36+
li.first {
37+
a:before {
38+
content: "\f100";
39+
}
40+
}
41+
li.previous {
42+
a:before {
43+
content: "\f104";
44+
}
45+
}
46+
li.next {
47+
a:after {
48+
content: "\f105";
49+
}
50+
}
51+
li.last {
52+
a:after {
53+
content: "\f101";
54+
}
55+
}
56+
}
57+
div.dataTables_paginate li.first &>a,div.dataTables_paginate li.previous &>a {
58+
position: relative;
59+
padding-left: 24px;
60+
}
61+
div.dataTables_paginate li.next &>a,div.dataTables_paginate li.last &>a {
62+
position: relative;
63+
padding-right: 24px;
64+
}
65+
div.dataTables_paginate li.first a:before,div.dataTables_paginate li.previous a:before {
66+
position: absolute;
67+
top: 6px;
68+
left: 10px;
69+
display: block;
70+
font-family: FontAwesome;
71+
}
72+
div.dataTables_paginate li.next a:after,div.dataTables_paginate li.last a:after {
73+
position: absolute;
74+
top: 6px;
75+
right: 10px;
76+
display: block;
77+
font-family: FontAwesome;
78+
}
79+
table.dataTable td,table.dataTable th {
80+
-webkit-box-sizing: content-box;
81+
-moz-box-sizing: content-box;
82+
box-sizing: content-box;
83+
}
84+
table.dataTable {
85+
clear: both;
86+
margin-top: 6px !important;
87+
margin-bottom: 6px !important;
88+
max-width: none !important;
89+
thead {
90+
th {
91+
position: relative;
92+
background-image: none !important;
93+
}
94+
th.sorting:after {
95+
content: "\f0dc";
96+
color: #ddd;
97+
font-size: 0.8em;
98+
padding-top: 0.12em;
99+
}
100+
th.sorting_asc:after {
101+
content: "\f0de";
102+
}
103+
th.sorting_desc:after {
104+
content: "\f0dd";
105+
}
106+
& > tr {
107+
& > th {
108+
padding-left: 18px;
109+
padding-right: 18px;
110+
}
111+
}
112+
}
113+
th:active {
114+
outline: none;
115+
}
116+
}
117+
table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled {
118+
cursor: pointer;
119+
}
120+
table.dataTable thead th.sorting:after,table.dataTable thead th.sorting_asc:after,table.dataTable thead th.sorting_desc:after {
121+
position: absolute;
122+
top: 12px;
123+
right: 8px;
124+
display: block;
125+
font-family: FontAwesome;
126+
}
127+
div.dataTables_scrollBody table.dataTable thead th.sorting:after,div.dataTables_scrollBody table.dataTable thead th.sorting_asc:after,div.dataTables_scrollBody table.dataTable thead th.sorting_desc:after {
128+
content: "";
129+
}
130+
table.table thead th.sorting:after,table.table thead th.sorting_asc:after,table.table thead th.sorting_desc:after {
131+
top: 8px;
132+
}
133+
div.dataTables_scrollHead {
134+
table {
135+
margin-bottom: 0 !important;
136+
border-bottom-left-radius: 0;
137+
border-bottom-right-radius: 0;
138+
}
139+
table.table-bordered {
140+
border-bottom-width: 0;
141+
}
142+
}
143+
div.dataTables_scrollHead table thead tr:last-child th:first-child,div.dataTables_scrollHead table thead tr:last-child td:first-child {
144+
border-bottom-left-radius: 0 !important;
145+
border-bottom-right-radius: 0 !important;
146+
}
147+
div.dataTables_scrollBody {
148+
table {
149+
border-top: none;
150+
margin-top: 0 !important;
151+
margin-bottom: 0 !important;
152+
}
153+
}
154+
div.dataTables_scrollBody tbody tr:first-child th,div.dataTables_scrollBody tbody tr:first-child td {
155+
border-top: none;
156+
}
157+
div.dataTables_scrollFoot {
158+
table {
159+
margin-top: 0 !important;
160+
border-top: none;
161+
}
162+
}
163+
table.table-bordered.dataTable {
164+
border-collapse: separate !important;
165+
}
166+
table.table-bordered thead th,table.table-bordered thead td {
167+
border-left-width: 0;
168+
border-top-width: 0;
169+
}
170+
table.table-bordered tbody th,table.table-bordered tbody td {
171+
border-left-width: 0;
172+
border-bottom-width: 0;
173+
}
174+
table.table-bordered th:last-child,table.table-bordered td:last-child {
175+
border-right-width: 0;
176+
}
177+
.table.dataTable tbody tr.active td,.table.dataTable tbody tr.active th {
178+
background-color: #08C;
179+
color: white;
180+
}
181+
.table.dataTable tbody tr.active:hover td,.table.dataTable tbody tr.active:hover th {
182+
background-color: #0075b0 !important;
183+
}
184+
.table.dataTable tbody tr.active th &>a,.table.dataTable tbody tr.active td &>a {
185+
color: white;
186+
}
187+
.table-striped.dataTable tbody tr.active:nth-child(odd) td,.table-striped.dataTable tbody tr.active:nth-child(odd) th {
188+
background-color: #017ebc;
189+
}
190+
table.DTTT_selectable {
191+
tbody {
192+
tr {
193+
cursor: pointer;
194+
}
195+
}
196+
}
197+
div.DTTT {
198+
.btn:hover {
199+
text-decoration: none !important;
200+
}
201+
}
202+
ul.DTTT_dropdown.dropdown-menu {
203+
z-index: 2003;
204+
a {
205+
color: #333 !important;
206+
}
207+
li {
208+
position: relative;
209+
}
210+
li:hover {
211+
a {
212+
background-color: #0088cc;
213+
color: white !important;
214+
}
215+
}
216+
}
217+
div.DTTT_collection_background {
218+
z-index: 2002;
219+
}
220+
div.DTTT_print_info {
221+
position: fixed;
222+
top: 50%;
223+
left: 50%;
224+
width: 400px;
225+
height: 150px;
226+
margin-left: -200px;
227+
margin-top: -75px;
228+
text-align: center;
229+
color: #333;
230+
padding: 10px 30px;
231+
opacity: 0.95;
232+
background-color: white;
233+
border: 1px solid rgba(0, 0, 0, 0.2);
234+
border-radius: 6px;
235+
-webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5);
236+
box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5);
237+
h6 {
238+
font-weight: normal;
239+
font-size: 28px;
240+
line-height: 28px;
241+
margin: 1em;
242+
}
243+
p {
244+
font-size: 14px;
245+
line-height: 20px;
246+
}
247+
}
248+
div.dataTables_processing {
249+
position: absolute;
250+
top: 50%;
251+
left: 50%;
252+
width: 100%;
253+
height: 60px;
254+
margin-left: -50%;
255+
margin-top: -25px;
256+
padding-top: 20px;
257+
padding-bottom: 20px;
258+
text-align: center;
259+
font-size: 1.2em;
260+
background-color: white;
261+
background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));
262+
background: -webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);
263+
background: -moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);
264+
background: -ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);
265+
background: -o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);
266+
background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);
267+
}
268+
div.DTFC_LeftHeadWrapper table,div.DTFC_LeftFootWrapper table,div.DTFC_RightHeadWrapper table,div.DTFC_RightFootWrapper table,table.DTFC_Cloned tr.even {
269+
background-color: white;
270+
margin-bottom: 0;
271+
}
272+
div.DTFC_RightHeadWrapper table ,div.DTFC_LeftHeadWrapper table {
273+
border-bottom: none !important;
274+
margin-bottom: 0 !important;
275+
border-top-right-radius: 0 !important;
276+
border-bottom-left-radius: 0 !important;
277+
border-bottom-right-radius: 0 !important;
278+
}
279+
div.DTFC_RightHeadWrapper table thead tr:last-child th:first-child,div.DTFC_RightHeadWrapper table thead tr:last-child td:first-child,div.DTFC_LeftHeadWrapper table thead tr:last-child th:first-child,div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child {
280+
border-bottom-left-radius: 0 !important;
281+
border-bottom-right-radius: 0 !important;
282+
}
283+
div.DTFC_RightBodyWrapper table,div.DTFC_LeftBodyWrapper table {
284+
border-top: none;
285+
margin: 0 !important;
286+
}
287+
div.DTFC_RightBodyWrapper tbody tr:first-child th,div.DTFC_RightBodyWrapper tbody tr:first-child td,div.DTFC_LeftBodyWrapper tbody tr:first-child th,div.DTFC_LeftBodyWrapper tbody tr:first-child td {
288+
border-top: none;
289+
}
290+
div.DTFC_RightFootWrapper table,div.DTFC_LeftFootWrapper table {
291+
border-top: none;
292+
margin-top: 0 !important;
293+
}
294+
div.FixedHeader_Cloned {
295+
table {
296+
margin: 0 !important;
297+
}
298+
}

0 commit comments

Comments
 (0)