<table class="etable"> 
	<tr>
		<td width="80">所属分类</td>
		<td><div class="cats_list"></div></td>
		<input type="hidden" name="cid" value="<{$row.cid}>" id="cid"/> 
	</tr> 
	<tr>
		<td>属性名</td>
		<td><input name="name" type="text" size="32" id="name" value="<{$row.name}>" placeholder="必填"/><i>必填</i>
			<p>批量添加需要逗号分开</p>
		</td>
	</tr>
	<tr>
		<td>排序</td>
		<td><input name="px" type="text" size="12" id="px" value="<{$row.px}>"/></td>
	</tr> 
</table> 
<script type="text/javascript"> 
<{if $row.cid}>
	category_list('<{$row.cid}>');	
<{else}>
	category_next('0');	
<{/if}>
function ajax_submit(){
	var cid = $("#cid").val(); 
	var name = $("#name").val();
	var px = $("#px").val();
	$.post('?m=category_attr&a=save',{<{if $row.id}>id:<{$row.id}>,<{/if}> cid:cid, name:name, px:px},function(result){ 
		data = jQuery.parseJSON(result); 
		if(data.error == '0'){
			parent.ajax_flush();
			parent.ajax_close();
		}else{
			parent.$.alert(data.msg);
		} 
	});
}
</script>