|
@@ -1488,13 +1488,17 @@ function checkbox()
|
|
|
$(this).unbind('click').bind('click', function()
|
|
|
{
|
|
|
var next = $(this).next();
|
|
|
-
|
|
|
+ var state = $(this).attr('data-state');
|
|
|
if($(this).get(0).checked == true)
|
|
|
{
|
|
|
- if ($("." + name + "-" + self.val()+":checked").length >= len) {
|
|
|
+ if (state == 2) {
|
|
|
self.get(0).checked = true;
|
|
|
+ } else {
|
|
|
+ if ($("." + name + "-" + self.val()+":checked").length >= len) {
|
|
|
+ self.get(0).checked = true;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(self.attr('type') == 'radio')
|
|
|
{
|
|
|
//如果父选项是radio类型,做下限制
|
|
@@ -1539,7 +1543,9 @@ function checkbox()
|
|
|
$("#mul_type").val(0);
|
|
|
}
|
|
|
|
|
|
- if (!$('#' + id).length) {
|
|
|
+ if (state == 2) {
|
|
|
+
|
|
|
+ } else if (!$('#' + id).length) {
|
|
|
self.parent().append('<input type="hidden" value="0" id="'+id+'" name="'+hidden+'" />');
|
|
|
}
|
|
|
} else {
|