<style type="text/css">
.album_type_list{ width:100%; min-height:350px; max-height:350px; overflow-x:scroll; overflow-y:scroll; float:left; }
</style>
<div class="album_type_list">
	<div class="atree_box">
		<div class="atree_box_one"><a href="javascript:;" data-id="0" class="ck"><i class="icon"></i><span>全部分类</span></a></div>
	</div> 
</div>
<input type="hidden" id="type_set_id" value="0"/>
<script type="text/javascript"> 
$(function(){  
	$(".album_type_list").album_tree({
		conhtml: function(pid){  
			$("#type_set_id").val(pid);
		}					
	}); 
});
function album_menu(pid){
	$.get(SELLER+'album/ajax_type?pid='+pid, function(result){ 
		data = jQuery.parseJSON(result);
		if(data.error == '0'){
			html = '<div class="atree_box">';
			$.each(data.list, function(i,k){
				html += '<div class="atree_box_one type_'+k.id+' ptype_'+k.pid+'"><a href="javascript:;" data-id="'+k.id+'"><i class="icon"></i><span>'+k.name+'</span></a></div>';
			});
			html += '</div>';
			if(pid == '0'){
				h_html ='<div class="atree_box">'+
							'<div class="atree_box_one type_0 ptype_0">'+
								'<a href="javascript:;" data-id="0" class="open ck"><i class="icon"></i><span>全部分类</span></a>';
				h_html += html;
				h_html += 	'</div>'+
						'</div>';
				$(".uimg_menu").html(h_html); 
			}else{ 
				$(".atree_box .type_"+pid+" a").after(html); 
			} 
		} 
	}); 
}
function ajax_submit(){ 
	var type = $("#type_set_id").val();
	if(type == ''){ 
		$.alert('请选择分类！'); return false;  
	}
 	var str=""; 
	$("input[name='ck_img']:checked").each(function(){ 
		str+=$(this).val()+','; 
	});
	ck_id = str.substring(0,str.length-1); 
	if(str){ 
		$.post(SELLER+'album/remove_type', {'type':type, 'ck_id':ck_id}, function(result){
			data = jQuery.parseJSON(result);
			if(data.error == '0'){
				$.alert('移动成功');  location.reload();
			}else{
				$.alert('移动失败');
			} 
		});
	}else{
		$.alert('没有选中图片');
	}
} 
</script>