<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ClothesRetail.Models.Cloth>" %>
<%@ Import Namespace="ClothesRetail.Core" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Details
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script src="<%= AppHelper.ScriptsUrl("MicrosoftAjax.js") %>" type="text/javascript"> </script>
<script src="<%= AppHelper.ScriptsUrl("jquery-1.3.2.js") %>" type="text/javascript"></script>
<script src="<%= AppHelper.ScriptsUrl("MicrosoftMvcAjax.js") %>" type="text/javascript"></script>
<%--<script src="<%= AppHelper.ScriptsUrl("ClothDetails.js") %>" type="text/javascript"></script>
<link href="<%= AppHelper.CssUrl("SearchPageDesign.css") %>" rel="stylesheet" type="text/css" />--%>
<script language="javascript" type="text/javascript">
debugger
var modelID = document.getElementById("modelId").value;
alert(modelID);
var test = <%=Model.Id %>;
alert(test);
///
/// DDL Sizes
///
// $(document).ready(function() {
// $("#Sizes").change(function() {
// $("#Colors").css({
// 'width': '200px',
// 'backgroundImage': "url('../../Content/Pictures/indicator.gif')",
// 'backgroundRepeat': 'no-repeat',
// 'backgroundPosition': 'top center'
// });
// FillInCascadeDropdown({ modelid: modelID, sizes: $("#Sizes").find(":selected").val() },
// "#Colors", "/Catalog/GetColors");
// var categoryValue = $("#Colors").find(":selected").val();
// if (categoryValue) {// && categoryValue != "Select category") {
// $("#Colors").removeAttr("disabled");
// }
// else {
// $("#Colors").attr("disabled", "disabled");
// $('#Colors').find('option').remove().end();
// }
// $("#Colors").trigger('change');
// });
// $("#Colors").attr("disabled", "disabled");
// $("#Sizes").css({
// 'width': '200px',
// 'text-align': 'center'
// });
// });
// ///
// /// DDL Colors
// ///
// $(document).ready(function() {
// $("#Colors").css({
// 'width': '200px'
// });
// $("#Colors").change(function() {
// $("#Ammount").css({
// 'width': '200px',
// 'backgroundImage': "url('../../Content/Pictures/indicator.gif')",
// 'backgroundRepeat': 'no-repeat',
// 'backgroundPosition': 'top center'
// });
// FillInCascadeDropdown({ modelid: modelID, sizes: $("#Sizes").find(":selected").val(), colors: $("#Colors").find(":selected").val() },
// "#Ammount", "/Catalog/GetAmmount");
// var colorValue = $("#Colors").find(":selected").val();
// var sizeValue = $("#Sizes").find(":selected").val();
// if ((colorValue != undefined && colorValue != "Select color" && colorValue != "")
// || (sizeValue != undefined && sizeValue != "Select size" && sizeValue != "")) {
// $("#Ammount").removeAttr("disabled");
// }
// else {
// $("#Ammount").attr("disabled", "disabled");
// $('#Ammount').find('option').remove().end();
// }
// $("#Ammount").trigger('change');
// });
// });
// $(document).ready(function() {
// FillInCascadeDropdown(null, "#Sizes", "/Catalog/GetSizes");
// $("#Sizes").trigger('change');
// var brandValue = $("#Brands").find(":selected").val();
// var categoryValue = $("#Categories").find(":selected").val();
// if ((brandValue != undefined && brandValue != "Select brand" && brandValue != "")
// || (categoryValue != undefined && categoryValue != "Select category" && categoryValue != "")) {
// $("#ClothTypes").removeAttr("disabled");
// }
// var clothType = $("#ClothTypes").find(":selected").val();
// if (clothType != undefined && clothType != "Select type" && clothType != "") {
// $("#Sizes").removeAttr("disabled");
// }
// var sizeValue = $("#Sizes").find(":selected").val();
// if (sizeValue != undefined && sizeValue != "Select size" && sizeValue != "") {
// $("#Colors").removeAttr("disabled");
// }
// });
// function FillInCascadeDropdown(map, dropdown, action) {
// $(dropdown).empty();
// $.getJSON(action, map,
// function(result) {
// for (i = 0; i < result.length; i++) {
// $(dropdown).append("<option " + " value=" + "'" + result[i].Value + "'" + " id=" + "'" + result[i].Value + "' " + " >" + result[i].Text + "</option>");
// }
// });
// }
</script>
<% using (Html.BeginForm())
{%>
<input id="modelId" type="hidden" value=<%=Model.Id%> />
<h2 align="center">
<%=Model.Name%></h2>
<table align="center">
<tr>
<td>
<img alt="шмотка" src="<%=Model.PhotoLink %>" />
</td>
</tr>
<tr>
<td>
Размеры
</td>
</tr>
<tr>
<td>
<%--<%= Html.DropDownList("Sizes")%>--%>
</td>
</tr>
<tr>
<td>
Цвета
</td>
</tr>
<tr>
<td>
<%--<%= Html.DropDownList("Colors")%>--%>
</td>
</tr>
<tr>
<td>
<a href="/Catalog/Category/<%=Model.ClothCategory.Id %>">Назад</a>
</td>
</tr>
<tr>
<td>
<%=Html.ActionLink("Положить в корзину", "AddModelToBasket", "Basket", new { modelId = Model.Id, returnTo = "/Catalog/Details/" + Model.Id }, null)%>
</td>
</tr>
</table>
<%} %>
</asp:Content>