
@{ 
    ViewBag.Title = "مشاهده تمام تصاویر";
    Layout = "~/Views/Shared/_NonHeaderFooter.cshtml";
}

@model List<GheyasPlusShop.Models.Home.KalaPictureModel>
@using Utils;

@section styles
{
    <style>
        .quickReview-pic {
            height: 78px;
            border: 1px solid #ccc;
            border-radius: 4px;
            cursor: pointer;
            margin-bottom: 15px;
        }

        .quickReview-pic-select {
            border: 2px solid #c42060 !important;
        }

        .quickReview-pic img {
            width: 100%;
            height: 100%;
        }
    </style>
} 

<div class="col-12 no-padding">
    <div class="row">
        <div class="col-5 no-padding-right" style="height:400px;overflow:auto;">
            <div class="col-12 no-padding-right">
                <div class="row">
                    @for (var i = 0; i < Model.Count; i++)
                    {
                        <div class="col-4 no-padding-left">
                            <div class="col-12 no-padding quickReview-pic @(i==0? "quickReview-pic-select": "")">
                                <img src="@Model[i].Picture.ToBase64File()" />
                            </div>
                        </div>
                    }
                    </div>
            </div>
        </div>
        <div class="col-7 no-padding-left" style="border-right:1px dotted #ccc;">
            <div class="col-12">
                <img src="@Model[0].Picture.ToBase64File()" id="PicThumb" style="height:400px;width:100%;" />
            </div>
        </div>
    </div>
</div>

@section scripts{
    <script>

        $('.quickReview-pic').on("click", function () {
            $('.quickReview-pic').removeClass("quickReview-pic-select")
            $(this).addClass("quickReview-pic-select");
            $('#PicThumb').attr('src',$(this).find('img').attr('src'));
        });
    </script>
}