}); $("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";
$("td > input:text").keyup(function (e) { if(e.keyCode==13) $(this).blur(); }); $("td > input:text").blur(function() { var fieldID = ' . $catalog['jng_sp_catalog_id'] . '; var fieldName = $(this).attr("name"); var fieldValue = $(this).val(); if(fieldValue!=tempValue) { $(this).css("background","#ff0"); $.post(url, { me_action: "UPDATECATALOG", id: fieldID, field_name: fieldName, field_value: fieldValue }, catalogUpdated, "xml"); } }); $(".apply-same-price").click(function() { var theRow = $(".table1").find("td").parent(); var def_price = $(theRow).find("input:text[name=price]").val(); var def_price_old = $(theRow).find("input:text[name=price_old]").val(); $(theRow).find("input:text").each(function() { var fieldName = $(this).attr("name"); if(fieldName.substring(0,12)=="pa-price_old") { $(this).val(def_price_old); $(this).blur(); } else if(fieldName.substring(0,8)=="pa-price"){ $(this).val(def_price); $(this).blur(); } }); }); $("td > input:text").css("width", "100%"); ' . $class_jc->drawCommentActionScript($catalog['jng_sp_catalog_id']) . ' '; $title = 'Monthly Total VC ' . $sp_info['name'] . ' Product ' . $product['p']['products_model'];