예제 #1
0
            });
            $("input[type=checkbox].cbmat").click(function() {
                    var max_sel_material = 5;
                    $("#status_material").focus();
                    var material_text = $("#status_material").val();
                    if($(this).attr("checked")) {
                            var count_selected = $("input[type=checkbox].cbmat:checked").size();
                            if(count_selected>max_sel_material) {
                                    alert("You can only select " + max_sel_material + " materials max");
                                    $(this).attr("checked", false);
                                    return true;
                            } else {
                                    if(material_text!="") material_text += ", ";
                                    material_text += this.value;
                            }
                    } else {
                            material_text = material_text.replace(", " + this.value + ", ", ", ");
                            material_text = material_text.replace(this.value + ", ", "");
                            material_text = material_text.replace(", " + this.value, "");
                            material_text = material_text.replace(this.value, "");
                    }
                    $("#status_material").val(material_text);
                    $("#status_material").blur();
            });
            ' . $class_pa->drawTableActionScript($product_id) . '
            ' . $class_jc->drawCommentActionScript($cid) . '
';
        }
    }
}
$title = "{$sp_title} Product Detail";