Skip to content

Commit b3e706a

Browse files
committed
Updated style used to enable/disable the Checkbox
1 parent 674dc68 commit b3e706a

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

src/checkbox/Checkbox.js

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,21 @@ javaxt.dhtml.Checkbox = function(parent, config) {
7171
display: "inline-block"
7272
},
7373

74+
/** Style for the checkbox
75+
*/
7476
box: {
7577
width: "13px",
7678
height: "13px",
77-
border: "1px solid #cccccc",
79+
border: "1px solid #ccc",
7880
borderRadius: "3px",
7981
backgroundColor: "#F6F6F6",
8082
cursor: "pointer",
8183
margin: "0px",
8284
color: "#2b2b2b"
8385
},
8486

87+
/** Style for the label next to the checkbox
88+
*/
8589
label: {
8690
fontFamily: "helvetica,arial,verdana,sans-serif",
8791
fontSize: "14px",
@@ -90,31 +94,35 @@ javaxt.dhtml.Checkbox = function(parent, config) {
9094
padding: "1px 0 0 5px"
9195
},
9296

97+
/** Style for the checkmark inside the checkbox
98+
*/
9399
check: {
94100
content: "",
95101
display: "block",
96102
width: "3px",
97103
height: "6px",
98-
border: "solid #ffffff",
104+
border: "solid #fff",
99105
borderWidth: "0 2px 2px 0",
100106
transform: "rotate(45deg)",
101107
margin: "1px 0 0 4px"
102108
},
103109

110+
/** Style for the checkbox when it is selected/checked
111+
*/
104112
select: {
105113
backgroundColor: "#007FFF",
106114
border: "1px solid #003EFF",
107-
color: "#FFFFFF"
115+
color: "#fff"
108116
},
109117

118+
/** Style for the mask used to disable the checkbox
119+
*/
110120
disable: {
111-
backgroundColor: "#ffffff",
112-
border: "1px solid #ffffff",
113-
borderRadius: "3px",
114-
cursor: "pointer",
115-
opacity: "0.5"
121+
cursor: "default"
116122
},
117123

124+
/** Style for the checkbox when mouse hovers over
125+
*/
118126
hover: {
119127
backgroundColor: "#ededed"
120128
}
@@ -169,6 +177,7 @@ javaxt.dhtml.Checkbox = function(parent, config) {
169177
table.style.textAlign = "inherit";
170178
table.style.color = "inherit";
171179
table.style.width = "";
180+
table.style.height = "";
172181
var tr = table.addRow();
173182

174183

@@ -303,6 +312,8 @@ javaxt.dhtml.Checkbox = function(parent, config) {
303312
*/
304313
this.enable = function(){
305314
mask.style.visibility = "hidden";
315+
box.style.opacity = "";
316+
label.style.opacity = "";
306317
};
307318

308319

@@ -327,6 +338,8 @@ javaxt.dhtml.Checkbox = function(parent, config) {
327338
var innerDiv = me.el.firstChild;
328339
innerDiv.insertBefore(mask, innerDiv.firstChild);
329340
}
341+
box.style.opacity = "0.5";
342+
label.style.opacity = "0.5";
330343
};
331344

332345

0 commit comments

Comments
 (0)