Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 391a399

Browse files
Ghislain BeaulacGhislain Beaulac
authored andcommitted
Update to latest Slickgrid version and add styling to checkbox selector
1 parent e68a1c9 commit 391a399

File tree

3 files changed

+22
-52
lines changed

3 files changed

+22
-52
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"jquery": "^3.2.1",
4848
"lodash": "^4.17.4",
4949
"moment-mini": "^2.18.1",
50-
"slickgrid": "^2.3.10",
50+
"slickgrid": "^2.3.12",
5151
"vinyl-paths": "^2.1.0"
5252
},
5353
"devDependencies": {

src/app/modules/angular-slickgrid/styles/_variables.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ $grid-menu-link-background-color: #ffffff !default;
9999
$grid-menu-box-shadow: 2px 2px 2px silver !default;
100100
$grid-menu-icon-font-size: 14px;
101101

102+
/* Checkbox Selector / Row Selection */
103+
$chekbox-selector-color: #31708F !default;
104+
$chekbox-selector-size: 13px !default;
105+
$chekbox-selector-icon: "\f00c" !default;
106+
$chekbox-selector-opacity: 0.15 !default;
107+
102108
/* Editors */
103109
$large-editor-background-color: #ffffff !default;
104110
$large-editor-border: 2px solid gray !default;

src/app/modules/angular-slickgrid/styles/slick-plugins.scss

Lines changed: 15 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -162,57 +162,21 @@ label {
162162
// Checkbox Selector Plugin
163163
// ----------------------------------------------
164164

165-
.slick-cell-checkboxsel {
166-
border: $row-checkbox-selector-border;
167-
background: $row-checkbox-selector-background;
168-
/*
169-
input[type="checkbox"]{
170-
display:none;
171-
}
172-
input[type="checkbox"] + label {
173-
color: #88E2E2;
174-
font-size: 25px;
175-
width: 25px;
176-
height: 25px;
177-
cursor: pointer;
178-
}
179-
input[type="checkbox"]:checked + label {
180-
background: #fff;
181-
}
182-
input[type="checkbox"] + label:before {
183-
display:inline-block;
184-
content: "\f096";
185-
cursor:pointer;
186-
}
187-
188-
input[type="checkbox"]:checked + label:before {
189-
content:"\f046";
190-
position: relative;
191-
left: 2px;
192-
}
193-
*/
165+
.slickgrid-container input[type=checkbox] {
166+
display:none; /* to hide the checkbox itself */
194167
}
195-
#selector-all-btn.slick-selector {
196-
border-right: $selector-border-right !important;
197-
.selector-checkbox {
198-
opacity: 0.1;
199-
font-size: ($font-size-base-value + 2px) !important;
200-
}
201-
.selected {
202-
.selector-checkbox {
203-
opacity: 1;
204-
}
205-
}
206-
}
207-
.slick-selector {
208-
border-right: $selector-border-right !important;
209-
.selector-checkbox {
210-
opacity: 0.1;
211-
font-size: ($font-size-base-value + 2px) !important;
168+
.slickgrid-container input[type=checkbox] + label:before {
169+
font-family: $icon-font-family;
170+
color: $chekbox-selector-color;
171+
font-weight: bold;
172+
display: inline-block;
173+
content: $chekbox-selector-icon;
174+
font-size: $chekbox-selector-size;
175+
cursor: pointer;
176+
}
177+
.slickgrid-container input[type=checkbox] + label:before {
178+
opacity: $chekbox-selector-opacity; /* unchecked icon */
212179
}
213-
}
214-
.slick-selector.selected {
215-
.selector-checkbox {
216-
opacity: 1;
180+
.slickgrid-container input[type=checkbox]:checked + label:before {
181+
opacity: 1; /* checked icon */
217182
}
218-
}

0 commit comments

Comments
 (0)