Issue 2443. checkbox 'check all' JS function added.

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11458 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ChanMyeong 2012-09-24 05:10:46 +00:00
parent d6c0f19bc2
commit e45155efad
2 changed files with 22 additions and 0 deletions

View file

@ -105,4 +105,15 @@ jQuery(function($){
}
multilingual();
$('.multilingual').change(multilingual);
// Check All
$('th>input[type="checkbox"]').change(function(){
var $this =$(this);
var $target = $this.closest('table').find('th>input[type="checkbox"], td>input[type="checkbox"]');
if($this.is(':checked')){
$target.attr('checked','checked');
} else {
$target.removeAttr('checked');
}
});
});

View file

@ -105,4 +105,15 @@ jQuery(function($){
}
multilingual();
$('.multilingual').change(multilingual);
// Check All
$('th>input[type="checkbox"]').change(function(){
var $this =$(this);
var $target = $this.closest('table').find('th>input[type="checkbox"], td>input[type="checkbox"]');
if($this.is(':checked')){
$target.attr('checked','checked');
} else {
$target.removeAttr('checked');
}
});
});