Skip to content

Commit 2098c4f

Browse files
committed
Angular directive and styles
1 parent 1da97c8 commit 2098c4f

File tree

2 files changed

+125
-0
lines changed

2 files changed

+125
-0
lines changed

ui-grid-bootstrap-styles.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
(function () {
2+
'use strict';
3+
4+
angular.module('ui.grid.bootstrap.style',[]);
5+
6+
angular
7+
.module('ui.grid.bootstrap.style')
8+
.directive('uiGridBootstrapStyles',
9+
function () {
10+
return {
11+
restrict: 'A',
12+
scope:false
13+
};
14+
})
15+
16+
})();
17+

ui-grid-bootstrap-styles.scss

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
[ui-grid-bootstrap-styles].ui-grid {
2+
margin-top: $form-group-margin-bottom;
3+
border: none!important;
4+
background-color:$table-bg;
5+
border-collapse:collapse!important;
6+
border-color: $table-border-color;
7+
font-size: 13px;
8+
}
9+
10+
[ui-grid-bootstrap-styles] .ui-grid-row {
11+
height: auto !important;
12+
border-color: inherit;
13+
border-bottom: 1px solid $table-border-color !important;
14+
> div {
15+
display: table-row;
16+
}
17+
.ui-grid-cell {
18+
display: table-cell;
19+
float: none;
20+
// vertical-align: middle;
21+
height: auto !important;
22+
border:none!important;
23+
padding: $table-cell-padding!important;
24+
line-height: 1.846;
25+
vertical-align: top;
26+
}
27+
}
28+
[ui-grid-bootstrap-styles] .ui-grid-row:nth-child(odd):hover .ui-grid-cell{
29+
background-color: $table-bg-hover!important;
30+
}
31+
[ui-grid-bootstrap-styles] .ui-grid-row:nth-child(odd) {
32+
background-color: $table-bg-active;
33+
}
34+
[ui-grid-bootstrap-styles] .ui-grid-row:nth-child(even) {
35+
background-color: $table-bg-accent;
36+
}
37+
[ui-grid-bootstrap-styles] .ui-grid-header{
38+
vertical-align: bottom;
39+
border-bottom: 2px solid #dddddd;
40+
41+
}
42+
43+
[ui-grid-bootstrap-styles] .ui-grid-header-cell{
44+
background-color: #FFFFFF!important;
45+
border-right: none!important;
46+
padding: $table-cell-padding!important;
47+
}
48+
//Pagination
49+
[ui-grid-bootstrap-styles] .ui-grid-pager-panel button{
50+
color:white!important;
51+
background-color:$brand-primary;
52+
border:2px solid $brand-primary;
53+
}
54+
55+
56+
[ui-grid-bootstrap-styles] .ui-grid-pager-control .first-triangle{
57+
border-color: transparent white transparent transparent!important;
58+
}
59+
60+
[ui-grid-bootstrap-styles] .ui-grid-pager-control .last-triangle{
61+
border-color: transparent transparent transparent white!important;
62+
}
63+
64+
[ui-grid-bootstrap-styles] .ui-grid-pager-panel{
65+
float:right;
66+
}
67+
[ui-grid-bootstrap-styles] .ui-grid-pager-control .last-bar {
68+
border-left: 2px solid white!important;
69+
}
70+
71+
[ui-grid-bootstrap-styles] .ui-grid-pager-control .first-bar {
72+
border-left: 2px solid white!important;
73+
}
74+
75+
[ui-grid-bootstrap-styles] .ui-grid-pager-panel input{
76+
text-align: center;
77+
padding-left: 3px;
78+
}
79+
80+
[ui-grid-bootstrap-styles] .ui-grid-pager-panel .ui-grid-pager-row-count-label{
81+
display: none;
82+
}
83+
84+
[ui-grid-bootstrap-styles] .ui-grid-pager-panel span{
85+
display: none;
86+
}
87+
88+
[ui-grid-bootstrap-styles] .ui-grid-viewport .ui-grid-row button.btn {
89+
margin-right: 5px;
90+
}
91+
92+
[ui-grid-bootstrap-styles] .ui-grid-menu-button {
93+
border: none!important;
94+
background-color: $table-bg;
95+
right: -5px;
96+
}
97+
98+
[ui-grid-bootstrap-styles] .ui-grid-top-panel {
99+
background: $table-bg;
100+
}
101+
102+
/** Resize Columns **/
103+
[ui-grid-bootstrap-styles],[ui-grid-resize-columns] .ui-grid-header-cell:hover {
104+
border-right: 1px solid $table-border-color !important;
105+
}
106+
[ui-grid-bootstrap-styles],[ui-grid-resize-columns] .ui-grid-header-cell:last-child .ui-grid-column-resizer.right {
107+
border-right: none !important;
108+
}

0 commit comments

Comments
 (0)