// JavaScript Document
fw.view  = {
    // クラスメソッド
	dispProducts: function(json,id)
	{
		jHtml = "";
		jHtml += "\n";//ソース上で確認するとき見やすいように

		jQuery.each(json.orderList,function(index,order)
		{
			jQuery.each(order.errMes,function(index,message)
			{
				jHtml += "<div class='errMes'>"
				jHtml += message;
				jHtml += "</div>\n";
			});
		});

		jQuery.each(json.products,function(index,product)
		{
			jHtml += "    <div class=\"orderitem\">";
			jHtml += "      <img class=\"orderitemphoto\" src=\"" + json.imgPath + "/" + product.main_list_image + "\">\n";
			jHtml += "      <h3><span class=\"product_code\">商品番号：" + product.product_code +"</span><br>" + product.name + "</h3>\n";
			//jHtml += "      <div class=\"orderitemrightblock\">\n";
			jHtml += "      <ul><li class=\"product_status\"><!--商品ステータス--></li></ul>\n";
			jHtml += "      <p class=\"listcomment\">" + product.main_list_comment + "</p>\n";
			jHtml += "      <p class=\"price\">価格(税込)：" + product.price02 + "円</p>\n";
			//jHtml += "      </div>\n";
			if(product.stock == "0" && product.stock_unlimited != "1"){
				jHtml += "      <p class=\"soldout\" style=\"font-size:16px; margin-bottom:5px;\"><em>申し訳ございませんが、只今品切れ中です。</em></p>\n";
			}
			jHtml += "      <div class=\"both\"></div>\n";
			jHtml += "    </div>\n";
		});
		

		$("#orderitemarea").html(jHtml);
		$("#orderinput").hide();
		$("#confirm").hide();
		$(".backinputform").show();
		$(".addCart").show();
		//$("#display").before("<input id=\"backinputform\" type=\"button\" value=\"入力フォームへ戻る\">");
		//$(".sammaryItem").css("background-color", "#eeeee0");
		//$(".errMes").css("background-color", "#ff9999");
	},
	
	dispInputform: function()
	{
		$("#orderitemarea").html("");
		$("#confirm").show();
		$("#orderinput").show();
		$(".backinputform").hide();
		$(".addCart").hide();
	}
}
