Issue 2589 fixed. :radio :checkbox - .checked class added.

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11739 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ChanMyeong 2012-10-16 09:17:07 +00:00
parent 87d8a52397
commit 618180b4f6
4 changed files with 22 additions and 6 deletions

View file

@ -58,11 +58,11 @@ body>.x,.x label,.x table,.x input,.x textarea,.x select,.x button{font-size:13p
.x .x_table:first-child{margin-top:0} .x .x_table:first-child{margin-top:0}
.x .x_table>caption{text-align:left;padding:8px 0} .x .x_table>caption{text-align:left;padding:8px 0}
.x .x_inline{display:inline-block;*display:inline;*zoom:1} .x .x_inline{display:inline-block;*display:inline;*zoom:1}
.x label[for], .x label.checked,
.x .x_form-horizontal .x_control-label{font-weight:bold} .x input:checked+label,
.x label:only-of-type{font-weight:bold}
.x input[type="radio"]+label, .x input[type="radio"]+label,
.x input[type="checkbox"]+label{font-weight:normal} .x input[type="checkbox"]+label{font-weight:normal}
.x input:checked+label{font-weight:bold}
.x label.x_inline{margin-right:16px} .x label.x_inline{margin-right:16px}
.x .x_input-append .x_add-on, .x .x_input-append .x_add-on,
.x .x_input-prepend .x_add-on{height:16px;line-height:16px} .x .x_input-prepend .x_add-on{height:16px;line-height:16px}

View file

@ -58,11 +58,11 @@ body>.x,.x label,.x table,.x input,.x textarea,.x select,.x button{font-size:13p
.x .x_table:first-child{margin-top:0} .x .x_table:first-child{margin-top:0}
.x .x_table>caption{text-align:left;padding:8px 0} .x .x_table>caption{text-align:left;padding:8px 0}
.x .x_inline{display:inline-block;*display:inline;*zoom:1} .x .x_inline{display:inline-block;*display:inline;*zoom:1}
.x label[for], .x label.checked,
.x .x_form-horizontal .x_control-label{font-weight:bold} .x input:checked+label,
.x label:only-of-type{font-weight:bold}
.x input[type="radio"]+label, .x input[type="radio"]+label,
.x input[type="checkbox"]+label{font-weight:normal} .x input[type="checkbox"]+label{font-weight:normal}
.x input:checked+label{font-weight:bold}
.x label.x_inline{margin-right:16px} .x label.x_inline{margin-right:16px}
.x .x_input-append .x_add-on, .x .x_input-append .x_add-on,
.x .x_input-prepend .x_add-on{height:16px;line-height:16px} .x .x_input-prepend .x_add-on{height:16px;line-height:16px}

View file

@ -178,6 +178,14 @@ jQuery(function($){
$this.attr('for', value).children(input).not(id).eq(0).attr('id', value); $this.attr('for', value).children(input).not(id).eq(0).attr('id', value);
} }
}); });
// :radio, :checkbox checked class
$(':radio, :checkbox').change(function(){
var $this = $(this);
if($this.is(':checked')){
$this.parent('label').addClass('checked');
}
$(':radio, :checkbox').not(':checked').parent('label').removeClass('checked');
}).change();
}); });
// Modal Window // Modal Window
jQuery(function($){ jQuery(function($){

View file

@ -178,6 +178,14 @@ jQuery(function($){
$this.attr('for', value).children(input).not(id).eq(0).attr('id', value); $this.attr('for', value).children(input).not(id).eq(0).attr('id', value);
} }
}); });
// :radio, :checkbox checked class
$(':radio, :checkbox').change(function(){
var $this = $(this);
if($this.is(':checked')){
$this.parent('label').addClass('checked');
}
$(':radio, :checkbox').not(':checked').parent('label').removeClass('checked');
}).change();
}); });
// Modal Window // Modal Window
jQuery(function($){ jQuery(function($){