Line 1: #pragma checksum "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "9704127FC1602BFE54E045CA4241E07D190588D6"
Line 2: //------------------------------------------------------------------------------
Line 3: // <auto-generated>
Line 4: // This code was generated by a tool.
Line 5: // Runtime Version:4.0.30319.42000
Line 6: //
Line 7: // Changes to this file may cause incorrect behavior and will be lost if
Line 8: // the code is regenerated.
Line 9: // </auto-generated>
Line 10: //------------------------------------------------------------------------------
Line 11:
Line 12: namespace ASP {
Line 13: using System;
Line 14: using System.Collections.Generic;
Line 15: using System.IO;
Line 16: using System.Linq;
Line 17: using System.Net;
Line 18: using System.Web;
Line 19: using System.Web.Helpers;
Line 20: using System.Web.Security;
Line 21: using System.Web.UI;
Line 22: using System.Web.WebPages;
Line 23: using Our.Umbraco.PropertyConverters.Models;
Line 24: using System.Web.Mvc;
Line 25: using System.Web.Mvc.Ajax;
Line 26: using System.Web.Mvc.Html;
Line 27: using System.Web.Routing;
Line 28: using Umbraco.Web;
Line 29: using Umbraco.Core;
Line 30: using Umbraco.Core.Models;
Line 31: using Umbraco.Web.Mvc;
Line 32: using umbraco;
Line 33: using Examine;
Line 34: using Umbraco.Web.PublishedContentModels;
Line 35:
Line 36: #line 1 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 37: using Umbraco.Core.Logging;
Line 38:
Line 39: #line default
Line 40: #line hidden
Line 41:
Line 42: #line 2 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 43: using triphq.data.Models;
Line 44:
Line 45: #line default
Line 46: #line hidden
Line 47:
Line 48: #line 3 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 49: using triphq.data.Services;
Line 50:
Line 51: #line default
Line 52: #line hidden
Line 53:
Line 54: #line 4 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 55: using triphq.data.Helpers;
Line 56:
Line 57: #line default
Line 58: #line hidden
Line 59: using WebMatrix.Data;
Line 60: using WebMatrix.WebData;
Line 61: using Microsoft.Web.Helpers;
Line 62:
Line 63:
Line 64: public class _Page_Views_PageCityBasePage_cshtml : Umbraco.Web.Mvc.UmbracoTemplatePage {
Line 65:
Line 66: #line hidden
Line 67:
Line 68: public _Page_Views_PageCityBasePage_cshtml() {
Line 69: }
Line 70:
Line 71: protected ASP.global_asax ApplicationInstance {
Line 72: get {
Line 73: return ((ASP.global_asax)(Context.ApplicationInstance));
Line 74: }
Line 75: }
Line 76:
Line 77: public override void Execute() {
Line 78: WriteLiteral("\r\n");
Line 79:
Line 80:
Line 81: #line 7 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 82:
Line 83: Layout = "WebSite.cshtml";
Line 84:
Line 85: var ContentTypeAliases = triphq.data.Configs.ContentTypeAliases.Default;
Line 86:
Line 87: var currentPage = CurrentPage as IPublishedContent;
Line 88: var city = currentPage.AncestorOrSelf(ContentTypeAliases.PageCity);
Line 89:
Line 90: var currentUser = Membership.GetUser();
Line 91: if (currentUser == null)
Line 92: {
Line 93: if (currentPage.Id != city.Id)
Line 94: {
Line 95: Response.Redirect(city.Url + "/?referralurl=" + currentPage.Url);
Line 96: return;
Line 97: }
Line 98: }
Line 99:
Line 100: var pageTitle = ViewBag.PageTitle;
Line 101: if (string.IsNullOrWhiteSpace(pageTitle))
Line 102: {
Line 103: pageTitle = currentPage.GetPropertyValue<string>("title");
Line 104: if (string.IsNullOrWhiteSpace(pageTitle))
Line 105: {
Line 106: pageTitle = currentPage.Name;
Line 107: }
Line 108: }
Line 109:
Line 110: var memberID = Umbraco.MembershipHelper.GetCurrentMemberId();
Line 111: var cityID = CurrentPage.Parent.Id;
Line 112: var countryID = CurrentPage.Parent.Parent.Id;
Line 113: var preference = MemberPeferenceService.GetPreference(memberID);
Line 114: var tempType = 1802;
Line 115:
Line 116: if (memberID > 0 && preference != null)
Line 117: {
Line 118: tempType = preference.temperature;
Line 119: }
Line 120:
Line 121: if(CurrentPage.DocumentTypeAlias == "PageCity")
Line 122: {
Line 123: cityID = CurrentPage.Id;
Line 124: countryID = CurrentPage.Parent.Id;
Line 125: }
Line 126:
Line 127: var latitude = (city.HasProperty("latitude") && city.HasValue("latitude") && city.GetPropertyValue("latitude").TryConvertTo<decimal>().Success) ? city.GetPropertyValue("latitude").TryConvertTo<decimal>().Result : 0;
Line 128: var longitude = (city.HasProperty("longitude") && city.HasValue("longitude") && city.GetPropertyValue("longitude").TryConvertTo<decimal>().Success) ? city.GetPropertyValue("longitude").TryConvertTo<decimal>().Result : 0;
Line 129:
Line 130:
Line 131: #line default
Line 132: #line hidden
Line 133: WriteLiteral("\r\n \r\n<div");
Line 134:
Line 135: WriteLiteral(" class=\"city\"");
Line 136:
Line 137: WriteLiteral(">\t\r\n");
Line 138:
Line 139: WriteLiteral(" ");
Line 140:
Line 141:
Line 142: #line 57 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 143: Write(Html.Partial("[City]MainPanel"));
Line 144:
Line 145:
Line 146: #line default
Line 147: #line hidden
Line 148: WriteLiteral("\r\n \r\n");
Line 149:
Line 150: WriteLiteral("\t");
Line 151:
Line 152:
Line 153: #line 59 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 154: Write(RenderSection("mainSlider", required: false));
Line 155:
Line 156:
Line 157: #line default
Line 158: #line hidden
Line 159: WriteLiteral(" \r\n \r\n");
Line 160:
Line 161: WriteLiteral("\t");
Line 162:
Line 163:
Line 164: #line 61 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 165: Write(Html.Partial("[City]MainDropdownMenu"));
Line 166:
Line 167:
Line 168: #line default
Line 169: #line hidden
Line 170: WriteLiteral("\r\n \r\n\t<span");
Line 171:
Line 172: WriteLiteral(" style=\"display:none\"");
Line 173:
Line 174: WriteLiteral("> ");
Line 175:
Line 176:
Line 177: #line 63 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 178: Write(RenderSection("cssTitle", required: true));
Line 179:
Line 180:
Line 181: #line default
Line 182: #line hidden
Line 183: WriteLiteral("</span>\r\n\t\r\n <div");
Line 184:
Line 185: WriteLiteral(" class=\"city-page container\"");
Line 186:
Line 187: WriteLiteral(">\r\n");
Line 188:
Line 189: WriteLiteral("\t\t");
Line 190:
Line 191:
Line 192: #line 66 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 193: Write(RenderBody());
Line 194:
Line 195:
Line 196: #line default
Line 197: #line hidden
Line 198: WriteLiteral(" \r\n </div> \r\n</div>\r\n\r\n");
Line 199:
Line 200: DefineSection("pageScriptsBotton", () => {
Line 201:
Line 202: WriteLiteral("\r\n <script>\r\n GetCurrentTime(\"");
Line 203:
Line 204:
Line 205: #line 73 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 206: Write(latitude);
Line 207:
Line 208:
Line 209: #line default
Line 210: #line hidden
Line 211: WriteLiteral("\", \"");
Line 212:
Line 213:
Line 214: #line 73 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 215: Write(longitude);
Line 216:
Line 217:
Line 218: #line default
Line 219: #line hidden
Line 220: WriteLiteral("\");\r\n GetCurrentTemperature(\"");
Line 221:
Line 222:
Line 223: #line 74 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 224: Write(latitude);
Line 225:
Line 226:
Line 227: #line default
Line 228: #line hidden
Line 229: WriteLiteral("\", \"");
Line 230:
Line 231:
Line 232: #line 74 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 233: Write(longitude);
Line 234:
Line 235:
Line 236: #line default
Line 237: #line hidden
Line 238: WriteLiteral("\",\"");
Line 239:
Line 240:
Line 241: #line 74 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 242: Write(tempType);
Line 243:
Line 244:
Line 245: #line default
Line 246: #line hidden
Line 247: WriteLiteral("\");\r\n\t\r\n");
Line 248:
Line 249:
Line 250: #line 76 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 251:
Line 252:
Line 253: #line default
Line 254: #line hidden
Line 255:
Line 256: #line 76 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 257: if(currentUser == null)
Line 258: {
Line 259:
Line 260:
Line 261: #line default
Line 262: #line hidden
Line 263: WriteLiteral(" ");
Line 264:
Line 265: WriteLiteral("$(\'#loginModal\').modal(\'show\');");
Line 266:
Line 267: WriteLiteral("\r\n");
Line 268:
Line 269:
Line 270: #line 79 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 271: }
Line 272:
Line 273:
Line 274: #line default
Line 275: #line hidden
Line 276: WriteLiteral(" </script>\r\n\r\n");
Line 277:
Line 278: WriteLiteral("\t");
Line 279:
Line 280:
Line 281: #line 82 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 282: Write(RenderSection("pageScriptsBotton", required: false));
Line 283:
Line 284:
Line 285: #line default
Line 286: #line hidden
Line 287: WriteLiteral("\r\n");
Line 288:
Line 289: });
Line 290:
Line 291: WriteLiteral("\r\n<div");
Line 292:
Line 293: WriteLiteral(" style=\"display:none;\"");
Line 294:
Line 295: WriteLiteral(" id=\"memID\"");
Line 296:
Line 297: WriteLiteral(">");
Line 298:
Line 299:
Line 300: #line 85 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 301: Write(memberID);
Line 302:
Line 303:
Line 304: #line default
Line 305: #line hidden
Line 306: WriteLiteral("</div>\r\n<div");
Line 307:
Line 308: WriteLiteral(" style=\"display:none;\"");
Line 309:
Line 310: WriteLiteral(" id=\"countryID\"");
Line 311:
Line 312: WriteLiteral(">");
Line 313:
Line 314:
Line 315: #line 86 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 316: Write(countryID);
Line 317:
Line 318:
Line 319: #line default
Line 320: #line hidden
Line 321: WriteLiteral("</div>\r\n<div");
Line 322:
Line 323: WriteLiteral(" style=\"display:none;\"");
Line 324:
Line 325: WriteLiteral(" id=\"cityID\"");
Line 326:
Line 327: WriteLiteral(">");
Line 328:
Line 329:
Line 330: #line 87 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 331: Write(cityID);
Line 332:
Line 333:
Line 334: #line default
Line 335: #line hidden
Line 336: WriteLiteral(@"</div>
Line 337:
Line 338: <script>
Line 339: $( document ).ready(function()
Line 340: {
Line 341: var memberID = $('#memID').html();
Line 342:
Line 343: GetFavourites(memberID);
Line 344: });
Line 345:
Line 346: $(""a.fav-icon"").click(function()
Line 347: {
Line 348: var nodeID = $(this).attr(""data-node"");
Line 349: var imgId = ""img-"" + nodeID;
Line 350: var favimage = document.getElementById(imgId);
Line 351: var memberID = $('#memID').html();
Line 352: var countryID = $('#countryID').html();
Line 353: var cityID = $('#cityID').html();
Line 354:
Line 355: if($(favimage).hasClass(""selected""))
Line 356: {
Line 357: $(favimage).removeClass(""selected"");
Line 358: favimage.src = ""/assets/img/icons/briefcase1.png"";
Line 359: favimage.title = ""Save to My Briefcase"";
Line 360: Deletefavourites(memberID, countryID, cityID, nodeID);
Line 361: }
Line 362: else
Line 363: {
Line 364: $(favimage).addClass(""selected"");
Line 365: favimage.src = ""/assets/img/icons/briefcase1_selected.png"";
Line 366: favimage.title = ""Remove from My Briefcase"";
Line 367: Addfavourites(memberID, countryID, cityID, nodeID);
Line 368: }
Line 369: });
Line 370:
Line 371: function Addfavourites(memberID, countryID, cityID, nodeID)
Line 372: {
Line 373: var postData =
Line 374: {
Line 375: memberID: memberID,
Line 376: countryID: countryID,
Line 377: cityID: cityID,
Line 378: nodeID: nodeID
Line 379: };
Line 380:
Line 381: $('#loading-image').show();
Line 382: $('#loading-image').css(""z-index"", ""99999"");
Line 383:
Line 384: $.ajax({
Line 385: cache: false,
Line 386: type: ""POST"",
Line 387: url: """);
Line 388:
Line 389:
Line 390: #line 138 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 391: Write(Url.Action("AddFavourites", "MemberFavourites"));
Line 392:
Line 393:
Line 394: #line default
Line 395: #line hidden
Line 396: WriteLiteral(@""",
Line 397: data: postData,
Line 398: success: function(result)
Line 399: {
Line 400: console.log(""successfully added"");
Line 401: },
Line 402: error: function(xhr, textStatus, error)
Line 403: {
Line 404: if (typeof console == ""object"")
Line 405: {
Line 406: console.log(xhr.status + "","" + xhr.responseText + "","" + textStatus + "","" + error);
Line 407: }
Line 408: },
Line 409: complete: function()
Line 410: {
Line 411: $('#loading-image').hide();
Line 412: }
Line 413: });
Line 414: }
Line 415:
Line 416: function Deletefavourites(memberID, countryID, cityID, nodeID)
Line 417: {
Line 418: var postData =
Line 419: {
Line 420: memberID: memberID,
Line 421: countryID: countryID,
Line 422: cityID: cityID,
Line 423: nodeID: nodeID
Line 424: };
Line 425:
Line 426: $('#loading-image').show();
Line 427: $('#loading-image').css(""z-index"", ""99999"");
Line 428:
Line 429: $.ajax({
Line 430: cache: false,
Line 431: type: ""POST"",
Line 432: url: """);
Line 433:
Line 434:
Line 435: #line 174 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 436: Write(Url.Action("DeleteFavourites", "MemberFavourites"));
Line 437:
Line 438:
Line 439: #line default
Line 440: #line hidden
Line 441: WriteLiteral(@""",
Line 442: data: postData,
Line 443: success: function(result)
Line 444: {
Line 445: console.log(""successfully deleted"");
Line 446: },
Line 447: error: function(xhr, textStatus, error)
Line 448: {
Line 449: if (typeof console == ""object"")
Line 450: {
Line 451: console.log(xhr.status + "","" + xhr.responseText + "","" + textStatus + "","" + error);
Line 452: }
Line 453: },
Line 454: complete: function()
Line 455: {
Line 456: $('#loading-image').hide();
Line 457: }
Line 458: });
Line 459: }
Line 460:
Line 461: function GetFavourites(memberID)
Line 462: {
Line 463: var postData =
Line 464: {
Line 465: memberID: memberID
Line 466: };
Line 467:
Line 468: $('#loading-image').show();
Line 469: $('#loading-image').css(""z-index"", ""99999"");
Line 470:
Line 471: $.ajax({
Line 472: cache: false,
Line 473: type: ""GET"",
Line 474: url: """);
Line 475:
Line 476:
Line 477: #line 207 "E:\HostingSpaces\triphqco\triphq.com_PygghjSa\wwwroot\Views\PageCityBasePage.cshtml"
Line 478: Write(Url.Action("GetFavourites", "MemberFavourites"));
Line 479:
Line 480:
Line 481: #line default
Line 482: #line hidden
Line 483: WriteLiteral(@""",
Line 484: data: postData,
Line 485: success: function(result)
Line 486: {
Line 487: $.each(result.favourites, function(index, item)
Line 488: {
Line 489: var imgId = ""img-"" + item;
Line 490: var favimage = document.getElementById(imgId);
Line 491:
Line 492: if(favimage != null)
Line 493: {
Line 494: $(favimage).addClass(""selected"");
Line 495:
Line 496: favimage.src = ""/assets/img/icons/briefcase1_selected.png"";
Line 497: favimage.title = ""Remove from My Briefcase"";
Line 498: }
Line 499: });
Line 500: },
Line 501: error: function(xhr, textStatus, error)
Line 502: {
Line 503: if(typeof console == ""object"")
Line 504: {
Line 505: console.log(xhr.status + "","" + xhr.responseText + "","" + textStatus + "","" + error);
Line 506: }
Line 507: },
Line 508: complete: function()
Line 509: {
Line 510: $('#loading-image').hide();
Line 511: }
Line 512: });
Line 513: }
Line 514: </script>");
Line 515:
Line 516: }
Line 517: }
Line 518: }
Line 519:
|