PageRenderTime 22ms CodeModel.GetById 3ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 1ms

/Stylaaa.Web/Views/Shared/_profile.cshtml

https://bitbucket.org/imperoitproject3/stylaaa2.0
Razor | 1111 lines | 1002 code | 97 blank | 12 comment | 123 complexity | 55948142d757a63fbf6e73d616b4a2a0 MD5 | raw file
   1@using Stylaaa.Services
   2@{
   3    /**/
   4
   5    ViewBag.Title = "About";
   6    Layout = "~/Views/Shared/_Layout.cshtml";
   7    ViewUserDetail userdetail = new ViewUserDetail();
   8    if (ViewBag.UserProfile != null)
   9    {
  10        userdetail = ViewBag.UserProfile as ViewUserDetail;
  11    }
  12    string logeduserId = User.Identity.GetUserId();
  13    GeneralServices generalSer = new GeneralServices();
  14    bool IsFollow = generalSer.CheckFollowing(userdetail.Id, logeduserId);
  15}
  16@section metatags
  17{
  18    @if (!User.Identity.IsAuthenticated)
  19    {
  20        <meta property="og:title" content="@userdetail.Role" />
  21        <meta property="og:description" content="@userdetail.Name" />
  22        <meta property="og:image" content="@GlobalConfig.UserImageUrl@userdetail.ProfileImageName" />
  23    }
  24    else
  25    {
  26        <title>@Html.Raw(Resource.metaAboutTitle)</title>
  27        <meta name="description" content="@Html.Raw(Resource.metaAboutname)">
  28        <meta name="Keywords" content="@Html.Raw(Resource.metaAboutKeyWord)">
  29        <meta property="og:url" content="@Html.Raw(Resource.metaAbouturl)" />
  30    }
  31}
  32
  33<section class="middle-section-admin">
  34    <div class="table">
  35        <div class="left-admin mobile-none">
  36            <div class="ipad-block">
  37                <a href="#" title="" class="ipad-leftbar open-leftbar">+</a>
  38                <a href="#" title="" class="ipad-leftbar close-leftbar">-</a>
  39            </div>
  40            @{
  41                string strstyle = "";
  42                if (!String.IsNullOrWhiteSpace(userdetail.ProfileImageName))
  43                {
  44                    strstyle = "background:url('" + userdetail.ProfileImageUrl + "') no-repeat  center center;background-size: contain!important;";
  45                }
  46
  47                <div class="ps-relative">
  48                    <div class="profile-pic" id="user-profile-image" style="border:0px #fff; @strstyle">
  49                        <div class="ps-table" style="border:0px #fff;">
  50                            <div class="table" style="border:0px #fff;">
  51                                <div class="table-cell" style="border:0px # fff;">
  52                                    @if (String.IsNullOrWhiteSpace(userdetail.ProfileImageName))
  53                                    {
  54                                        <img width="110" class="default-img" title="profile image" style="border:0px #fff;" src="@Url.Content("~/Content/images/profile-placeholder.png")">
  55                                    }
  56                                </div>
  57                            </div>
  58                        </div>
  59                        @if (User.Identity.IsAuthenticated && userdetail.Id == User.Identity.GetUserId())
  60                        {
  61                            <a href="#profile-pic-pp" title="" class="camera-img fancybox">
  62                                <img class="upload-button" src="@Url.Content("~/Content/images/camera.svg")" alt="" />
  63                            </a>
  64                        }
  65                        @if (userdetail.IsPremium)
  66                        {
  67                            <a href="#" title="" style="position: absolute;right: 20px; top: 20px;   display: inline-block;    padding: 8px; border-radius: 4px;" class="premium-user"><img src="@Url.Content("~/Content/images/premium-user.svg")" alt="" /></a>
  68                        }
  69                        <div class="profile-content" style="background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.7));">
  70                            <h4>@(userdetail != null ? userdetail.Name : string.Empty)</h4>
  71                            <a class="pf-link" href="#" title="@(userdetail != null ? userdetail.UserName : string.Empty)">@(userdetail != null ? userdetail.UserName : string.Empty)</a>
  72                        </div>
  73                    </div>
  74
  75                    <div class="left-admin-content">
  76                        <P>@userdetail.AboutMe</P>
  77                    </div>
  78                    <div class="admin-menu">
  79                        <input type="hidden" id="profileusername" value="@userdetail.UserName" />
  80                        <ul>
  81                            @if (userdetail.Role == Role.Stylist)
  82                            {
  83
  84                                <li><a href="@Url.RouteUrl("Stylist", new { @username = userdetail.UserName, action = "Post" })" title="@Resource.post">@Resource.post</a></li>
  85
  86                                if (User.Identity.IsAuthenticated)
  87                                {
  88                                    <li class="active"><a href="@Url.RouteUrl("Stylist", new { @username = userdetail.UserName, action = "About" })" title="@Resource.about">@Resource.about</a></li>
  89                                    if (userdetail.Id == User.Identity.GetUserId())
  90                                    {
  91                                        <li><a href="@Url.RouteUrl("Chat", new { @username = userdetail.UserName, action = "ChatJob" })" title="@Resource.Messages">@Resource.Messages</a></li>
  92                                    }
  93                                    <li><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "Following" })" title="@Resource.following">@Resource.following</a></li>
  94                                    <li><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "Followers" })" title="@Resource.followers">@Resource.followers</a></li>
  95                                    if (userdetail.Id == User.Identity.GetUserId())
  96                                    {
  97                                        <li id="setting"><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "MyReview" })" title="@Resource.myReview">@Resource.myReview</a></li>
  98                                        <li><a href="@Url.RouteUrl("StylistChangePassword", new { username = userdetail.UserName, action = "UserEditPassword" })" title="@Resource.Settings">@Resource.Settings</a></li>
  99                                        <li><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "UpdateToPremium" })" title="@Resource.update @Resource.premium">@Resource.update @Resource.premium</a></li>
 100                                        <li><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "PaymentHistory" })" title="@Resource.paymenthistory @Resource.paymenthistory1">@Resource.paymenthistory @Resource.paymenthistory1</a></li>
 101                                        <li><a href="@Url.RouteUrl("Stylist", new { @username = userdetail.UserName, action = "JobCredit" })" title="Job Credit">Job Credits</a></li>
 102                                    }
 103                                    else
 104                                    {
 105                                        <li id="setting"><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "StylistReview" })" title="@Resource.review">@Resource.review</a></li>
 106                                    }
 107                                }
 108                                else
 109                                {
 110
 111                                    <li class="active"><a href="@Url.RouteUrl("Stylist", new { @username = userdetail.UserName, action = "About" })" title="@Resource.AboutLink">@Resource.AboutLink</a></li>
 112                                }
 113                            }
 114                            else
 115                            {
 116                                <li><a href="@Url.RouteUrl("User", new { @username = userdetail.UserName, action = "Post" })" title="@Resource.post">@Resource.post</a></li>
 117                                if (userdetail.Id == User.Identity.GetUserId())
 118                                {
 119                                    <li><a href="@Url.RouteUrl("User", new { @username = userdetail.UserName, action = "Job" })" title="@Resource.MenuMyJobs">@Resource.MenuMyJobs</a></li>
 120                                }
 121
 122                                if (User.Identity.IsAuthenticated)
 123                                {
 124
 125                                    <li class="active"><a href="@Url.RouteUrl("User", new { @username = userdetail.UserName, action = "About" })" title=@Resource.about>@Resource.about</a></li>
 126
 127                                    if (userdetail.Id == User.Identity.GetUserId())
 128                                    {
 129                                        <li><a href="@Url.RouteUrl("Chat", new { @username = userdetail.UserName, action = "ChatJob" })" title="@Resource.Messages">@Resource.Messages</a></li>
 130                                    }
 131                                    <li><a href="@Url.RouteUrl("User", new { username = userdetail.UserName, action = "Following" })" title=@Resource.following>@Resource.following</a></li>
 132                                    <li><a href="@Url.RouteUrl("User", new { username = userdetail.UserName, action = "Followers" })" title=@Resource.followers>@Resource.followers</a></li>
 133
 134                                    if (userdetail.Id == User.Identity.GetUserId())
 135                                    {
 136                                        <li><a href="@Url.RouteUrl("UserChangePassword", new { username = userdetail.UserName, action = "UserEditPassword" })" title="@Resource.Settings">@Resource.Settings</a></li>
 137                                    }
 138                                }
 139                                else
 140                                {
 141                                    <li class="active"><a href="@Url.RouteUrl("User", new { @username = userdetail.UserName, action = "About" })" title=@Resource.AboutLink>@Resource.AboutLink</a></li>
 142                                }
 143                            }
 144                        </ul>
 145                    </div>
 146                </div>
 147            }
 148        </div>
 149        <div class="right-admin">
 150            <div class="background-full">
 151                <div class="background-img">
 152                    @if (string.IsNullOrEmpty(userdetail.CoverPicName))
 153                    {
 154                        <div class="bacround-ps-img mobile-none" style="background:url('@Url.Content("~/Content/images/default-coverpic.jpg")') no-repeat  center center; background-color: #f5f5f5;"></div>
 155                        /*background-size: contain!important;*/
 156                        <img class="mobile-block background-img-pic" title="background image" src="@Url.Content("~/Content/images/default-coverpic.jpg")" alt="" />
 157                    }
 158                    else
 159                    {
 160                        <div class="bacround-ps-img mobile-none" style="background:url('@userdetail.CoverPicUrl') no-repeat  center center;"></div>
 161                        /*background-size: contain!important;*/
 162                        <img class="mobile-block background-img-pic" title="background image" src="@(GlobalConfig.UserCoverPicUrl + userdetail.CoverPicName)" alt="" />
 163                    }
 164
 165                    @if (User.Identity.IsAuthenticated && userdetail.Id == User.Identity.GetUserId())
 166                    {
 167                        <a href="#change-cover-photo" title="" class="camera-img-second fancybox">
 168                            <img src="@Url.Content("~/Content/images/camera.svg")" alt="" />
 169                            <span>@Resource.changeCoverPicText</span>
 170                        </a>
 171                    }
 172
 173                    <div class="responsive-box">
 174                        <div class="profile-pic mobile-block">
 175                            <div class="mobile-pf">
 176                                <div class="ps-table" style="border: 0px #fff !important;">
 177                                    <div class="table" id="mobile-user-profile" style="border: 0px #fff !important;">
 178                                        @if (String.IsNullOrWhiteSpace(userdetail.ProfileImageName))
 179                                        {
 180                                            <div class="table-cell" style="border: 0px #fff !important;">
 181                                                <img width="80" style="border:0px #fff;" title="profile image" class="default-img" src="@Url.Content("~/Content/images/profile-placeholder.png")">
 182                                            </div>
 183                                        }
 184                                        else
 185                                        {
 186                                            <div class="table-cell" style="border:0px #fff !important; background:url('@userdetail.ProfileImageUrl') no-repeat  center center;background-size: contain!important;">
 187                                            </div>
 188                                        }
 189                                    </div>
 190                                </div>
 191                                @*<img class="profile-pic-img" src="" alt="" />*@
 192                                @if (User.Identity.IsAuthenticated && userdetail.Id == User.Identity.GetUserId())
 193                                {
 194                                    <a href="#profile-pic-pp" title="" class="camera-img fancybox">
 195                                        <img class="upload-button" src="@Url.Content("~/Content/images/camera.svg")" alt="" />
 196                                    </a>
 197                                }
 198                                @if (userdetail.IsPremium)
 199                                {
 200                                    <a href="#" title="" style="position: absolute;right: 6px; top:6px;padding:4px;max-width:24px;" class="premium-user"><img src="@Url.Content("~/Content/images/premium-user.svg")" alt="" /></a>
 201                                }
 202                            </div>
 203                            <div class="profile-content mobile-block">
 204                                <h4>@(userdetail.Name != null ? userdetail.Name : string.Empty)</h4>
 205                                <a class="pf-link" href="#" title="@userdetail.UserName">@(userdetail.UserName != null ? userdetail.UserName : string.Empty)</a>
 206                            </div>
 207                        </div>
 208                        <div class="bottom-bar container">
 209                            <div class="table">
 210                                <div class="left-bttom">
 211                                    <ul>
 212                                        @if (User.Identity.IsAuthenticated)
 213                                        {
 214                                            if (userdetail.Role == Role.Stylist)
 215                                            {
 216                                                <li><a href="@Url.RouteUrl("Stylist", new { @username = userdetail.UserName, action = "Post" })" title="">@userdetail.PostCount <span>@Resource.post</span></a></li>
 217                                                <li><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "Following" })" title="">@userdetail.FollowingCount <span>@Resource.following</span></a></li>
 218                                                <li>
 219                                                    <a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "Followers" })" title="">
 220                                                        @userdetail.FollowerCount
 221                                                        @if (userdetail.FollowerCount > 1)
 222                                                        {
 223                                                            <span> @Resource.followers</span>
 224                                                        }
 225                                                        else
 226                                                        {
 227                                                            <span>@Resource.followers</span>
 228                                                        }
 229                                                    </a>
 230                                                </li>
 231                                            }
 232                                            else
 233                                            {
 234                                                <li><a href="@Url.RouteUrl("User", new { @username = userdetail.UserName, action = "Post" })" title="">@userdetail.PostCount <span>@Resource.post</span></a></li>
 235                                                <li><a href="@Url.RouteUrl("User", new { username = userdetail.UserName, action = "Following" })" title="">@userdetail.FollowingCount <span>@Resource.following</span></a></li>
 236                                                <li>
 237                                                    <a href="@Url.RouteUrl("User", new { username = userdetail.UserName, action = "Followers" })" title="">
 238                                                        @userdetail.FollowerCount
 239                                                        @if (userdetail.FollowerCount > 1)
 240                                                        {
 241                                                            <span> @Resource.followers</span>
 242                                                        }
 243                                                        else
 244                                                        {
 245                                                            <span> @Resource.followers</span>
 246                                                        }
 247                                                    </a>
 248                                                </li>
 249                                            }
 250                                        }
 251                                    </ul>
 252                                </div>
 253                                @if (User.Identity.IsAuthenticated)
 254                                {
 255                                    if (userdetail.Id != User.Identity.GetUserId())
 256                                    {
 257                                        <div class="right-bottom mobile-none">
 258                                            <a href="#send-message" title="@Resource.SendMessage" class="share-profile fancybox">@Resource.SendMessage</a>
 259                                        </div>
 260
 261                                        <div class="right-bottom mobile-none">
 262                                            <a href="javascript:;" data-id="@userdetail.Id" title="@Resource.ShareProfileBtn" class="share-profile buttonfollow">@(IsFollow == true ? Resource.following : Resource.follow)</a>
 263                                        </div>
 264                                    }
 265
 266                                    <div class="right-bottom mobile-none">
 267                                        <a href="#share-profile" title="@Resource.ShareProfileBtn" class="share-profile fancybox">@Resource.ShareProfileBtn </a>
 268                                    </div>
 269                                }
 270                            </div>
 271                        </div>
 272                        <div class="left-admin-content mobile-block">
 273                            <P>@userdetail.AboutMe</P>
 274                            @if (User.Identity.IsAuthenticated)
 275                            {
 276                                <div class="right-bottom mobile-block">
 277                                    @if (userdetail.Id != User.Identity.GetUserId())
 278                                    {
 279                                        <a href="#send-message" title="@Resource.SendMessage" class="share-profile fancybox">@Resource.SendMessage </a>
 280
 281                                        <a href="javaScript:;" data-id="@userdetail.Id" title="@Resource.SendMessage" class="share-profile buttonfollow">@(IsFollow == true ? Resource.following : Resource.follow)</a>
 282                                    }
 283                                    <a href="#share-profile" title="Share Profile" class="share-profile fancybox">@Resource.ShareProfileBtn</a>
 284                                </div>
 285                            }
 286                        </div>
 287                    </div>
 288                </div>
 289            </div>
 290            <div class="mobile-block">
 291                <div class="admin-menu-mobile">
 292                    <div class="inner-slide">
 293                        @if (userdetail.Role == Role.Stylist)
 294                        {
 295                            <div class="item"><a href="@Url.RouteUrl("Stylist", new { @username = userdetail.UserName, action = "Post" })" title="@Resource.post">@Resource.post</a></div>
 296
 297                            if (User.Identity.IsAuthenticated)
 298                            {
 299                                <div class="item"><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "About" })" title="@Resource.about">@Resource.about</a></div>
 300                                if (userdetail.Id == User.Identity.GetUserId())
 301                                {
 302                                    <div class="item">
 303                                        <a href="@Url.RouteUrl("Chat", new { @username = userdetail.UserName, action = "ChatJob" })" title="@Resource.Messages">@Resource.Messages</a>
 304                                    </div>
 305                                }
 306                                <div class="item"><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "Following" })" title=@Resource.following>@Resource.following</a></div>
 307                                <div class="item"><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "Followers" })" title=@Resource.followers>@Resource.followers</a></div>
 308
 309                                if (userdetail.Id == User.Identity.GetUserId())
 310                                {
 311                                    <div class="item"><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "MyReview" })" title=@Resource.myReview>@Resource.myReview</a></div>
 312                                    <div class="item"><a href="@Url.RouteUrl("StylistChangePassword", new { username = User.Identity.GetUserName(), action = "UserEditPassword" })" title="@Resource.Settings">@Resource.Settings</a></div>
 313                                    <div class="item"><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "UpdateToPremium" })" title=@Resource.updateToPremiumText>@Resource.update<br />@Resource.premium</a></div>
 314                                    <div class="item"><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "PaymentHistory" })" title=@Resource.paymenthistory @Resource.paymenthistory1>@Resource.paymenthistory<br />@Resource.paymenthistory1</a></div>
 315
 316                                    <div class="item"><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "JobCredit" })" title="JobCredit" @Resource.paymenthistory1>Job Credits</a></div>
 317                                }
 318                                else
 319                                {
 320                                    <div class="item"><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "StylistReview" })" title=@Resource.review>@Resource.review</a></div>
 321                                }
 322                            }
 323                            else
 324                            {
 325                                <div class="item"><a href="@Url.RouteUrl("Stylist", new { username = userdetail.UserName, action = "About" })" title="@Resource.AboutLink">@Resource.AboutLink</a></div>
 326                            }
 327                        }
 328                        else
 329                        {
 330                            <div class="item"><a href="@Url.RouteUrl("User", new { @username = userdetail.UserName, action = "Post" })" title=@Resource.post>@Resource.post</a></div>
 331
 332                            if (userdetail.Id == User.Identity.GetUserId())
 333                            {
 334                                <div class="item"><a href="@Url.RouteUrl("User", new { @username = userdetail.UserName, action = "Job" })" title="@Resource.MenuMyJobs">@Resource.MenuMyJobs</a></div>
 335                            }
 336                            if (User.Identity.IsAuthenticated)
 337                            {
 338                                <div class="item"><a class="active" href="@Url.RouteUrl("User", new { username = userdetail.UserName, action = "About" })" title=@Resource.about>@Resource.about</a></div>
 339                                if (userdetail.Id == User.Identity.GetUserId())
 340                                {
 341                                    <div class="item"><a href="@Url.RouteUrl("Chat", new { @username = userdetail.UserName, action = "MobileJobChat" })" title="@Resource.Messages">@Resource.Messages</a></div>
 342                                }
 343                                <div class="item"><a href="@Url.RouteUrl("User", new { username = userdetail.UserName, action = "Following" })" title=@Resource.following>@Resource.following</a></div>
 344
 345                                @*<div class="item"><a href="@Url.RouteUrl("User", new { username = userdetail.UserName, action = "Following" })" title="Following">Following</a></div>*@
 346                                <div class="item"><a href="@Url.RouteUrl("User", new { username = userdetail.UserName, action = "Followers" })" title=@Resource.followers>@Resource.followers</a></div>
 347                                if (userdetail.Id == User.Identity.GetUserId())
 348                                {
 349                                    <div class="item"><a href="@Url.RouteUrl("UserChangePassword", new { username = userdetail.UserName, action = "UserEditPassword" })" title="@Resource.Settings">@Resource.Settings</a></div>
 350
 351                                }
 352                            }
 353                            else
 354                            {
 355                                <div class="item"><a class="active" href="@Url.RouteUrl("User", new { username = userdetail.UserName, action = "About" })" title=@Resource.AboutLink>@Resource.AboutLink</a></div>
 356                            }
 357                        }
 358                    </div>
 359                </div>
 360            </div>
 361
 362            @RenderBody()
 363
 364        </div>
 365    </div>
 366</section>
 367<!-- change cover photo popup -->
 368<div class="popup-box">
 369    <div id="change-cover-photo" class="popup-max about-pp">
 370        <div class="popup-had">
 371            <h4>@Resource.changeCoverPicText</h4>
 372            <a href="#" title="" class="cancel-pp" data-fancybox-close="true"><img src="@Url.Content("~/Content/images/close.svg")" alt="" /></a>
 373        </div>
 374        <div class="tabs-full-popup">
 375            <div class="upload-image">
 376                <div id="image-container">
 377                    <canvas id="canvas" class="canvas img-upload-max"></canvas>
 378                </div>
 379                <div><p>@Resource.ChangeCoverpicImageValid 990X480</p></div>
 380                <div class="ps-upload hide">
 381                    <div class="bt-crop">
 382                        <input type="button" id="btnLeftRotate" value="@Resource.Crop" title="rotate left" onclick="rotateLeft()" />
 383                        <img id="btnCrop" src="@Url.Content("~/Content/images/rotate-left.svg")" title="rotate left" alt="rotate left" style="width: 40px;height: 40px;" />
 384                    </div>
 385                    <div class="bt-crop">
 386                        <input type="button" id="btnRightRotate" value="@Resource.Crop" title="rotate right" onclick="rotateRight()" />
 387                        <img id="btnCrop" src="@Url.Content("~/Content/images/rotate-right.svg")" title="rotate right" alt="rotate right" style="width: 40px;height: 40px;" />
 388                    </div>
 389                    <div class="bt-crop">
 390                        <input type="button" title="@Resource.Save" id="btnCrop-CoverPic" value="@Resource.Crop" />
 391                        <img src="@Url.Content("~/Content/images/crop-right.svg")" alt="" />
 392                    </div>
 393                    <div class="bt-crop-rs">
 394                        <input type="button" title="@Resource.Restore" id="btnRestore-CoverPic" value="@Resource.Restore" />
 395                        <img src="@Url.Content("~/Content/images/crop-cancel.svg")" alt="" />
 396                    </div>
 397                </div>
 398            </div>
 399            <div class="upload-button">
 400                <a href="#" title=@Resource.Upload @Resource.Coverphoto class="btn-yellow">
 401                    @Resource.ChangeCoverpicBtn
 402                    <input class="file-input" id="file-input-coverpic" type="file">
 403                </a>
 404            </div>
 405            <button class="btn save hide">@Resource.Save</button>
 406        </div>
 407    </div>
 408</div>
 409
 410<!-- profile-pic photo popup -->
 411<div class="popup-box">
 412    <div id="profile-pic-pp" class="popup-max about-pp">
 413        <div class="popup-had">
 414            <h4>@Resource.editprofileChangePic</h4>
 415            <a href="#" title="" class="cancel-pp" data-fancybox-close="true"><img src="@Url.Content("~/Content/images/close.svg")" alt="" /></a>
 416        </div>
 417        <div class="tabs-full-popup">
 418            <div class="upload-image">
 419                <div id="image-container">
 420                    <canvas id="profile-canvas" class="canvas img-upload-max"></canvas>
 421                </div>
 422                <div class="ps-upload hide">
 423                    <div class="bt-crop">
 424                        <input type="button" id="btnLeftRotate" value="@Resource.Crop" title="rotate left" onclick="rotateLeftProfilePic()" style="width: 40px;height: 40px;" />
 425                        <img id="btnCrop" src="@Url.Content("~/Content/images/rotate-left.svg")" title="rotate left" alt="rotate left" style="width: 40px;height: 40px;" />
 426                    </div>
 427                    <div class="bt-crop">
 428                        <input type="button" id="btnRightRotate" value="@Resource.Crop" title="rotate right" onclick="rotateRightProfilePic()" />
 429                        <img id="btnCrop" src="@Url.Content("~/Content/images/rotate-right.svg")" title="rotate right" alt="rotate right" style="width: 40px;height: 40px;" />
 430                    </div>
 431                    <div class="bt-crop">
 432                        <input type="button" title="@Resource.Crop" id="btnCrop-ProfilePic" value="@Resource.Crop" />
 433                        <img src="@Url.Content("~/Content/images/crop-right.svg")" alt="" />
 434                    </div>
 435                    <div class="bt-crop-rs">
 436                        <input type="button" title="@Resource.Restore" id="btnRestore-ProfilePic" value="@Resource.Restore" />
 437                        <img src="@Url.Content("~/Content/images/crop-cancel.svg")" alt="" />
 438                    </div>
 439                </div>
 440                <div><p>@Resource.ChangeCoverpicImageValid 350X350</p></div>
 441            </div>
 442            <div class="upload-button">
 443                <a href="#" title="Upload Photo" class="btn-yellow">
 444                    @Resource.ChangeProfileBtn
 445                    <input class="file-input-profile-pic" id="file-input-profile-pic" type="file">
 446                </a>
 447            </div>
 448            <button class="btn save hide">@Resource.Save</button>
 449        </div>
 450    </div>
 451</div>
 452
 453<!-- share profile popup -->
 454<div class="popup-box">
 455    <div id="share-profile" class="popup-max">
 456        <div class="popup-had">
 457            <h4>@Resource.ShareProfileBtn</h4>
 458            <P>@Resource.ShareProfileText</P>
 459            <a href="#" title="" class="cancel-pp" data-fancybox-close="true"><img src="@Url.Content("~/Content/images/close.svg")" alt="" /></a>
 460        </div>
 461        @*<form>
 462        *@
 463        <div class="popup-middle" style="min-height: auto !important;">
 464            <div class="field-rs">
 465                <label>@Resource.ShareProfileBtn</label>
 466                <div class="copy-link">
 467                    <div class="table">
 468                        <div class="table-cell">
 469                            <input type="text" id="share-profile-link" value="@userdetail.profileUrl">
 470                        </div>
 471                        <div class="table-cell">
 472                            <button class="copy-button" type="button">@Resource.copy</button>
 473                        </div>
 474                    </div>
 475                </div>
 476            </div>
 477        </div>
 478        <div class="popup-footer">
 479            <button id="profile-share-button" style="float:left;" class="button share-button">@Resource.Share</button>
 480            <a href="javascript:void(0);" title="@Resource.cancel" data-fancybox-close="true" class="button cancel-button">@Resource.forgotpasswordCancel</a>
 481        </div>
 482        @*
 483            </form>*@
 484    </div>
 485</div>
 486
 487<!-- share-profile popup-->
 488<div class="popup-box">
 489    <div id="share-post" class="popup-max">
 490        <div class="popup-had">
 491            <h4>@Resource.profile @Resource.Share.ToLower()</h4>
 492            <a href="#" title="" class="cancel-pp" data-fancybox-close="true"><img src="~/Content/images/close.svg" alt="" /></a>
 493        </div>
 494        <div class="popup-middle" style="min-height: auto !important;">
 495            <div class="share-mrg">
 496                <div class="addthis_toolbox addthis_inline_share_toolbox" addthis:url="THE URL" addthis:title="THE TITLE" addthis:description="THE DESCRIPTION" addthis:media="THE IMAGE"></div>
 497
 498            </div>
 499        </div>
 500    </div>
 501</div>
 502
 503
 504<!-- send message popup -->
 505<div class="popup-box">
 506    <div id="send-message" class="popup-max">
 507        <div class="popup-had">
 508            <h4>@Resource.SendMessage</h4>
 509            <a href="#" title="" class="cancel-pp" data-fancybox-close="true"><img src="@Url.Content("~/Content/images/close.svg")" alt="" /></a>
 510        </div>
 511        <div class="popup-middle" style="min-height: 100px !important;">
 512            <div class="field-rs">
 513                @*<label>@Resource.message</label>*@
 514                <textarea id="ReportPostReasonText" name="ReportPostReasonText" placeholder="@Resource.typeMsgHere"></textarea>
 515            </div>
 516        </div>
 517        <div class="popup-footer single-btn">
 518            <a href="javascript:;" id="sendtextId" data-sid="@userdetail.Id" title=@Resource.send class="button share-button">@Resource.send</a>
 519        </div>
 520    </div>
 521</div>
 522
 523@section Partialscripts{
 524    @Scripts.Render("~/scripts/profile")
 525
 526    <script>
 527
 528        $(".buttonfollow").on('click', function () {
 529            var sid = $(this).data('id');
 530            var control = $(this);
 531            $.post('@Url.Action("FollowTransaction", "Home")', { StylishId: sid })
 532                .done(function (result) {
 533                    if (result) {
 534                        if (result == "Follow" || result == "Folgen") {
 535                            $(control).text(result);
 536                            //$(control).addClass("btn-profileFollow");
 537                            //$(control).removeClass("share-profile");
 538                            window.location.reload();
 539                        }
 540                        else if (result == "Following" || result == "Abonniert") {
 541
 542                            $(control).text(result);
 543                            //$(control).removeClass("share-profile");
 544                            //$(control).addClass("btn-profileFollow");
 545                            window.location.reload();
 546                        }
 547                        else {
 548                            toastr.error(result.Message, '@Resource.loginMust');
 549                        }
 550                    }
 551                    else
 552                        toastr.error(result.Message,'@Resource.loginMust');
 553                }).fail(function (error) {
 554            });
 555        });
 556
 557
 558        $(document).ready(function () {
 559            if ($("#RecentPostPageIndex").val() == $("#RecentPostPageCount").val()) {
 560                $(".view-all").hide();
 561            }
 562        });
 563
 564        var hrefUrl = "https://www.stylaaa.com/?hashtag=dfg";
 565        var hrefMediaUrl = "https://www.stylaaa.com/Files/PostImages/254291db-9d23-4a7a-a10f-12d07b1a0820_XmfC4HPr7E-4f1KhBjFTxg_12062018113247.jpeg";
 566        var addthis_share = {
 567            url: hrefUrl,
 568            title: "THE TITLE",
 569            description: "THE DESCRIPTION",
 570            media: hrefMediaUrl
 571        };
 572
 573        var addthis_config = {
 574            data_track_clickback: true
 575        };
 576
 577        $("#profile-share-button").click(function () {
 578            $.fancybox.close();
 579
 580            addthis.update('share', 'url', '@userdetail.profileUrl');
 581            addthis.url = '@userdetail.profileUrl';
 582            addthis.update('share', 'title', "stylaaa profile title");
 583            addthis.title = "stylaaa profile title";
 584            addthis.update('share', 'description', "THE DESCRIPTION");
 585            addthis.description = "THE DESCRIPTION";
 586            addthis.update('share', 'media', '@GlobalConfig.UserImageUrl@userdetail.ProfileImageName');
 587            addthis.media = '@GlobalConfig.UserImageUrl@userdetail.ProfileImageName';
 588            addthis.toolbox(".addthis_toolbox");
 589
 590            $.fancybox.open({
 591                src: '#share-post',
 592                type: 'inline',
 593                modal: true,
 594                helpers: {
 595                    overlay: { closeClick: false }
 596                }
 597            });
 598            $(".addthis_toolbox").attr("data-url", '@userdetail.profileUrl');
 599            $(".addthis_toolbox").attr("data-media", '@GlobalConfig.UserImageUrl@userdetail.ProfileImageName');
 600        });
 601
 602    $('#btnCrop-ProfilePic').click(function () {
 603        // Get a string base 64 data url
 604        //var croppedImageDataURL = canvas2.cropper('getCroppedCanvas').toDataURL("image/png");
 605        //$result.append($('.profile-pic-img').attr('src', croppedImageDataURL));
 606        //$result.append($('.profile-pic').css('background', 'url(' + croppedImageDataURL + ') no-repeat  center center'));
 607        //$('.profile-pic').addClass('active');
 608        //$('.ps-table ').addClass('hide');
 609
 610        $.fancybox.close();
 611        displayWhiteOverlay();
 612
 613        $("#profile-pic-pp .ps-upload").addClass("hide");
 614
 615        var cropcanvas = canvas2.cropper('getCroppedCanvas');
 616        var croppng = cropcanvas.toDataURL("image/png");
 617
 618        // Create FormData object
 619        var formData = new FormData();
 620        formData.append('pngimageData', croppng);
 621        formData.append('filename', 'test.png');
 622
 623        var url = '@Url.Action("UpdateProfileImage", "Stylist")';
 624        $.ajax({
 625            url: url,
 626            type: "POST",
 627            contentType: false, // Not to set any content header
 628            processData: false, // Not to process data
 629            data: formData,
 630            success: function (result) {
 631                removeWhiteOverlay();
 632                if (result.Result != "1" || result.Result != "0") {
 633
 634                    $('#user-profile-image').attr('style', 'background: url(' + result.Message + ') no-repeat  center center;background-size: contain!important;');/* background-size: contain!important;*/
 635                    $('#mobile-user-profile .table-cell').attr('style', 'background: url(' + result.Message + ') no-repeat  center center; background-size: contain!important;'); /*background-size: contain!important;*/
 636                    //$('#mobile-user-profile .table-cell img').attr('src', result.Message);
 637
 638                    $('#profile-pic-pp .profile-pic').addClass('active');
 639                    $('#profile-pic-pp .ps-table').addClass('hide');
 640
 641                    $("#profile-pic-pp .ps-upload").removeClass("hide");
 642
 643                    $(".default-img").remove();
 644
 645                    ShowToastr('success', '@Resource.profilepicUploadsuccess', '');
 646                }
 647            },
 648            error: function (err) {
 649                removeWhiteOverlay();
 650                ShowToastr('error', "fail::" + err.statusText, '');
 651            }
 652        });
 653    });
 654
 655            $('#btnCrop-CoverPic').click(function () {
 656                //    // Get a string base 64 data url
 657                //    var croppedImageDataURL = canvas.cropper('getCroppedCanvas').toDataURL("image/png");
 658                //    $result.append($('.background-img-pic').attr('src', croppedImageDataURL));
 659                //    $result.append($('.bacround-ps-img').css('background', 'url(' + croppedImageDataURL + ') no-repeat  center center'));
 660
 661                $.fancybox.close();
 662                displayWhiteOverlay();
 663
 664                $("#change-cover-photo .ps-upload").addClass("hide");
 665
 666                var cropcanvas = canvas.cropper('getCroppedCanvas');
 667                var croppng = cropcanvas.toDataURL("image/png");
 668
 669                // Create FormData object
 670                var formData = new FormData();
 671                formData.append('pngimageData', croppng);
 672                formData.append('filename', 'test.png');
 673
 674                var url = '@Url.Action("UpdateCoverPic", "Stylist")';
 675                $.ajax({
 676                    url: url,
 677                    type: "POST",
 678                    contentType: false, // Not to set any content header
 679                    processData: false, // Not to process data
 680                    data: formData,
 681                    success: function (result) {
 682                        removeWhiteOverlay();
 683                        if (result.Result != "1" || result.Result != "0") {
 684                            $('.background-img-pic').attr('src', result.Message);
 685                            $('.bacround-ps-img').attr('style', 'background: url(' + result.Message + ') no-repeat  center center;'); /*background-size: contain!important;*/
 686
 687                            $("#change-cover-photo .ps-upload").removeClass("hide");
 688
 689                            ShowToastr('success', '@Resource.CoverpicUploadSuccess', '');
 690                        }
 691                    },
 692                    error: function (err) {
 693                        removeWhiteOverlay();
 694                        ShowToastr('error', "fail::" + err.statusText, '');
 695                    }
 696                });
 697            });
 698
 699            $(window).bind("load", function () {
 700                var strUserName = $("#UserName").val();
 701                if (strUserName != null && strUserName != undefined && strUserName != '') {
 702                    var url = window.location.pathname;
 703                    var arrayurl = url.split("/");
 704                    if (arrayurl[arrayurl.length - 1] != "About") {
 705                        url = url.replace(arrayurl[arrayurl.length - 1], strUserName);
 706                    }
 707                    else {
 708                        url = url.replace(arrayurl[arrayurl.length - 2], strUserName);
 709                    }
 710                    history.pushState(null, null, url);
 711                    //$("#lnkmyprofile").attr("href", url);
 712
 713                }
 714            });
 715
 716        $(".stylist_username").change(function (e) {
 717            var strUserName = $(this).val();
 718            if (strUserName == null || strUserName == undefined || strUserName == "") {
 719                $(".stylist_username").focus();
 720                $(".stylist_username").attr("style", "border: 1px solid #ff0000;");
 721                ShowToastr('error', '@Resource.UsernameFieldIsRequired', '');
 722            }
 723            else {
 724                var strurl = '@Url.RouteUrl("Stylist", new { username = User.Identity.GetUserName(), action = "IsUserExists" })';
 725                var formdata = new FormData();
 726                formdata.append("strUserName", strUserName);
 727
 728                $.ajax({
 729                    url: strurl,
 730                    type: "Post",
 731                    data: formdata,
 732                    contentType: false, // Not to set any content header
 733                    processData: false, // Not to process data
 734                    success: function (result) {
 735                        if (result == true) {
 736                            $(".stylist_username").val("");
 737                            $(".stylist_username").focus();
 738                            $(".stylist_username").attr("style", "border: 1px solid #ff0000;");
 739                            ShowToastr('error', '@Resource.usernameAlreadyinUse', '');
 740                        }
 741                        else {
 742                            ShowToastr('success', 'This username is available', '');
 743                            $(".stylist_username").attr("style", "border: 1px solid #dcdcdc;");
 744                        }
 745                    },
 746                    error: function (err) {
 747                        ShowToastr('error', "fail::" + err.statusText, '');
 748                    }
 749                });
 750            }
 751        });
 752
 753         $(".user_username").change(function (e) {
 754             var strUserName = $(this).val();
 755             if (strUserName == null || strUserName == undefined || strUserName == "") {
 756                 $(".user_username").focus();
 757                 $(".user_username").attr("style", "border: 1px solid #ff0000;");
 758                 ShowToastr('error', '@Resource.UsernameFieldIsRequired', '');
 759             }
 760             {
 761                 var strurl = '@Url.RouteUrl("Stylist", new { username = User.Identity.GetUserName(), action = "IsUserExists" })';
 762                 var formdata = new FormData();
 763                 formdata.append("strUserName", strUserName);
 764
 765                 $.ajax({
 766                     url: strurl,
 767                     type: "Post",
 768                     data: formdata,
 769                     contentType: false, // Not to set any content header
 770                     processData: false, // Not to process data
 771                     success: function (result) {
 772                         if (result == true) {
 773                             $(".user_username").val("");
 774                             $(".user_username").focus();
 775                             $(".user_username").attr("style", "border: 1px solid #ff0000;");
 776                             ShowToastr('error', '@Resource.usernameAlreadyinUse', '');
 777                         }
 778                         else {
 779                             ShowToastr('success', 'This username is available', '');
 780                             $(".user_username").attr("style", "border: 1px solid #dcdcdc;");
 781                         }
 782                     },
 783                     error: function (err) {
 784                         ShowToastr('error', "fail::" + err.statusText, '');
 785                     }
 786                 });
 787             }
 788        });
 789
 790         var demsg = 'it will be deleted after 30 days from the system, during this time you can login and activate your account again';
 791         var deactivemsg = 'Yes Deactivate it!';
 792         if (varLang == 'de') {
 793             demsg = 'Dein Konto wird innerhalb von 30 Tagen gelöscht.In dieser Zeit kannst du dich wieder einloggen und dein Konto aktivieren';
 794             var deactivemsg = 'Bestätigen!';
 795         }
 796
 797        function fnOpenDeactiveAccount(url, logouturl) {
 798            swal({
 799                title: '@Html.Raw(Resource.SureDeleteAccountText)',
 800                text: demsg,
 801                type: "warning",
 802                showCancelButton: true,
 803                confirmButtonClass: "btn-danger",
 804                confirmButtonText: deactivemsg,
 805                closeOnConfirm: false,
 806                allowOutsideClick: false
 807            },
 808                function () {
 809                    $.ajax({
 810                        type: 'GET',
 811                        url: url,
 812                        cache: false,
 813                        contentType: false,
 814                        processData: false,
 815                        success: function (result) {
 816                            if (result.Status == "1") {
 817
 818                                //swal(result.Message)
 819                                ShowToastr('success', result.Message, '');
 820                                setTimeout(function () {
 821                                    var pathname = window.location.pathname;
 822                                    var fullurl = window.location.href;
 823
 824                                    logouturl = fullurl.replace(pathname, logouturl);
 825
 826                                    window.location.replace(logouturl);
 827                                }, 1500);
 828                            }
 829                            else {
 830                                ShowToastr('error', result.Message, '');
 831                            }
 832                            swal.close();
 833                        },
 834                        error: function (err) {
 835                            ShowToastr('error', "err::" + err, '');
 836                        }
 837                    });
 838                });
 839        }
 840
 841
 842        var deletepostMsg = 'Are you sure to delete this Post?';
 843        var deletepostmessage = 'Yes delete it';
 844        var dltmsg = "Deleted";
 845        if (varLang == 'de') {
 846            deletepostMsg = 'Willst du diesen Post löschen?';
 847            deletepostmessage = 'löschen';
 848            dltmsg = "löschen";
 849        }
 850        function deleteProfilePost(url) {
 851            //displayOverlay();
 852
 853            swal({
 854                title: deletepostMsg,
 855                //text: "Your will not be able to recover this post!",
 856                type: "warning",
 857                showCancelButton: true,
 858                confirmButtonClass: "btn-danger",
 859                confirmButtonText: deletepostmessage,
 860                closeOnConfirm: false,
 861                allowOutsideClick: false,
 862            },
 863                function () {
 864                    $.ajax({
 865                        type: 'POST',
 866                        url: url,
 867                        cache: false,
 868                        contentType: false,
 869                        processData: false,
 870                        success: function (result) {
 871                            $.fancybox.close();
 872                            removeWhiteOverlay();
 873                            //swal("Deleted!", "Post has been Deleted.", "success");
 874                            swal(dltmsg, "", "success");
 875                            var loadPostUrl = '@Url.Action("PartialPost", "Post")?intPageIndex=1&username=' + $("#profileusername").val();
 876                            loadProfileAllPostList(loadPostUrl, false);
 877                        },
 878                        error: function (err) {
 879                            removeWhiteOverlay();
 880                            ShowToastr('error', "err::" + err, '');
 881                        }
 882                    });
 883                });
 884        }
 885
 886        function OnSuccess(response) {
 887            displayWhiteOverlay();
 888            if (response.Status == '1') {
 889                $.fancybox.close();
 890                removeWhiteOverlay();
 891                var url = '@Url.Action("PartialPost", "Post")?intPageIndex=1&username=' + $("#profileusername").val();
 892                loadProfileAllPostList(url, true);
 893            }
 894            else {
 895                ShowToastr('error', response.Message, '');
 896                removeWhiteOverlay();
 897            }
 898        }
 899
 900        function OnSuccessJob(response) {
 901            displayWhiteOverlay();
 902            if (response.Status == '1') {
 903                $.fancybox.close();
 904                removeWhiteOverlay();
 905                var url = '@Url.Action("PartialJob", "Job")?intPageIndex=1&username=' + $("#profileusername").val();
 906                loadProfileAllJobList(url, true);
 907            }
 908            else {
 909                ShowToastr('error', response.Message, '');
 910                removeWhiteOverlay();
 911            }
 912        }
 913
 914        function OnSuccessJobStatus(response) {
 915            displayWhiteOverlay();
 916            if (response.Status == '1') {
 917                removeWhiteOverlay();
 918                var url = '@Url.Action("PartialJob", "Job")?intPageIndex=1&username=' + $("#profileusername").val();
 919                loadProfileAllJobList(url, true);
 920            }
 921            else {
 922                ShowToastr('error', response.Message, '');
 923                removeWhiteOverlay();
 924            }
 925        }
 926
 927
 928        function loadProfileAllPostList(url, addpost) {
 929            $.ajax({
 930                url: url,
 931                type: 'GET',
 932                cache: false,
 933                contentType: false,
 934                processData: false,
 935                success: function (result) {
 936                    removeWhiteOverlay();
 937                    $('#profile-post').html(result);
 938
 939                    if (addpost == true) {
 940                        ShowToastr('success', '@Resource.PostuploadSuccess', '');
 941                    }
 942                    $("a[href='#new-post']").attr("class", "active");
 943                    $("a[href='#popular-post']").removeClass("active");
 944                },
 945                error: function (err) {
 946                    removeWhiteOverlay();
 947                    ShowToastr('error', "err::" + err, '');
 948                }
 949            });
 950        }
 951
 952            function loadMorePost() {
 953                var pCount = parseInt($("#RecentPostPageCount").val());
 954                var pIndex = parseInt($("#RecentPostPageIndex").val());
 955
 956                if (pCount > pIndex) {
 957                    var pagenum = pIndex + 1;
 958                    var url = '@Url.Action("PartialPost", "Post")?intPageIndex=' + pagenum + '&username=' + $("#profileusername").val();
 959                    loadMorePostList(url, pagenum);
 960                }
 961        }
 962
 963
 964            $("#sendtextId").on('click', function () {
 965                var control = $(this);
 966                var recieverId = $(control).data('sid')
 967                var message = $(control).parent().parent().find('textarea').val();
 968                if (message)
 969                {
 970                    $.post('@Url.Action("SendMessage", "Chat")', { ReceiverID: recieverId, MessageText: message })
 971                    .done(function (result) {
 972                        if (result) {
 973                            $(control).parent().parent().find('textarea').val('');
 974                            toastr.success('@Resource.SendMessageSuccess');
 975                            $.fancybox.close();
 976                        }
 977                        else
 978                            toastr.error('@Resource.SendmsgFailed');
 979                        }).fail(function (error) {
 980                    });
 981                }
 982                else {
 983                    toastr.error('@Resource.SendmsgEnterText');
 984                }
 985        });
 986
 987        $("#tblPaymentHistory").mCustomScrollbar({
 988            theme: "dark",
 989            autoHideScrollbar: true,
 990            //mouseWheel: { enable: true },
 991            mouseWheel: { preventDefault: true },
 992            callbacks: {
 993                onTotalScroll: function () {
 994                    var ntfIndex = parseInt($("#hdnPaymentHistoryIndex").val());
 995                    var ntfCount = parseInt($("#hdnPaymentHistorySize").val());
 996
 997                    if (ntfCount > ntfIndex) {
 998                        displaySearchOverlay();
 999                        ntfIndex = ntfIndex + 1;
1000
1001                        var formData = new FormData();
1002                        formData.append('index', ntfIndex);
1003
1004                        var url = '@Url.Action("GetPaymentHistory", "Stylist")';
1005                        $.ajax({
1006                            url: url,
1007                            type: 'POST',
1008                            data: formData,
1009                            cache: false,
1010                            contentType: false,
1011                            processData: false,
1012                            success: function (result) {
1013                                removeSearchOverlay();
1014                                $('#tbody').append(result);
1015                                $("#hdnPaymentHistoryIndex").val(ntfIndex);
1016                            },
1017                            error: function (err) {
1018                                removeSearchOverlay();
1019                                ShowToastr('error', err, '');
1020                            }
1021                        });
1022                    }
1023                }
1024            },
1025            advanced: {
1026                updateOnContentResize: true
1027            }
1028        });
1029
1030        $('.chatbuddylist').mCustomScrollbar({
1031            theme: "dark",
1032            scrollbarPosition: "outside",
1033            autoHideScrollbar: true,
1034            mouseWheel: { preventDefault: true }
1035        });
1036
1037        //////////////Job related
1038
1039        var deleteJobMsg = 'Are you sure to delete this job?';
1040        var deletejobmessage = 'Yes delete it';
1041        var deleted = "Deleted";
1042        if (varLang == 'de') {
1043            deleteJobMsg = 'Willst du diesen Job löschen?';
1044            deletejobmessage = 'Löschen';
1045            deleted = "Löschen";
1046        }
1047        function deleteProfileJob(url) {
1048            //displayOverlay();
1049
1050            swal({
1051                title: deleteJobMsg,
1052                //text: "Your will not be able to recover this job!",
1053                type: "warning",
1054                showCancelButton: true,
1055                confirmButtonClass: "btn-danger",
1056                confirmButtonText: deletejobmessage,
1057                closeOnConfirm: false,
1058                allowOutsideClick: false
1059            },
1060                function () {
1061                    $.ajax({
1062                        type: 'POST',
1063                        url: url,
1064                        cache: false,
1065                        contentType: false,
1066                        processData: false,
1067                        success: function (result) {
1068                            $.fancybox.close();
1069                            removeWhiteOverlay();
1070                            //swal("Deleted!", "Post has been Deleted.", "success");
1071                            swal(deleted, "", "success");
1072                            var loadPostUrl = '@Url.Action("PartialJob", "Job")?intPageIndex=1&username=' + $("#profileusername").val();
1073                            loadProfileAllJobList(loadPostUrl, false);
1074                        },
1075                        error: function (err) {
1076                            removeWhiteOverlay();
1077                            ShowToastr('error', "err::" + err, '');
1078                        }
1079                    });
1080                });
1081        }
1082
1083        function loadProfileAllJobList(url, addpost) {
1084            $.ajax({
1085                url: url,
1086                type: 'GET',
1087                cache: false,
1088                contentType: false,
1089                processData: false,
1090                success: function (result) {
1091                    removeWhiteOverlay();
1092                    $('#profile-job').html(result);
1093                    if (addpost == true) {
1094                        ShowToastr('success', '@Resource.jobSuccessUpdate', '');
1095                    }
1096                    //$("a[href='#new-post']").attr("class", "active");
1097                    //$("a[href='#popular-post']").removeClass("active");
1098                },
1099                error: function (err) {
1100                    removeWhiteOverlay();
1101                    ShowToastr('error', "err::" + err, '');
1102                }
1103            });
1104        }
1105
1106    </script>
1107
1108
1109}
1110
1111@RenderSection("profilelayoutscript", required: false)